HTTP API
2N® Access Commander API v2
[ Base URL: /api/v2 ]
Important note
This documentation file purpose is to help Access Commander development team as a reference manual.
This file IS NOT the official Access Commander API reference manual and might NOT always reflect the actual
version of the API endpoints. If you find any bug please report it to your distributor and he will schedule a
fix into future releases.
Address
The URL of AccessCommander's API is versioned and uses https, i.e. the url looks like https://serveraddress/api/v2/endpoint
, where:
serveraddress
is IP address of AC,
endpoint
- see section Paths.
HTTP
Http commands used for communication with the server:
GET
lists entities (getting the list of entities with parameter values)
PUT
updates the entity (change of some parameters typically)
POST
creates a new entity
DELETE
deletes the entity
Data Structure
Server Response
Response structure:
{
"data": {
...
}
}
Every response is wrapped in the object "data". This arrangement offers the advantage of sending metadata in the response, for instance:
{
"meta": {
"code": 200
},
"data": {
...
},
"pagination": {
"next_url": "...",
"next_max_id": "13872296"
}
}
Errors
401
unauthorized
500 and higher
server errors, the structure looks like this:
{
"data": {
errornumber:123456
errortext:"example"
}
}
Authentication
The user sends a request containing username and password to the endpoint /login
.
If the pair is valid, the server creates the cookie and sends it back to the browser.
All consequent requests are sent to the server along with the cookie. The server always verifies
if the cookie is valid. If it is not, it returns 401 in response. The cookie is deleted by sending
request to the endpoint /logout
.
Version Number and Tags
companiesCompany entity
Company entity
zonesZone entity
Zone entity
groupsGroup entity
Group entity
usersUser entity
User entity
devicesDevice entity
Device entity
authLogging in and out
Logging in and out
accessrulesAccess Rule entity
Access Rule entity
timeprofilesTime Profile entity
Time Profile entity
attendanceAttendance entity
Attendance entity
presencePresence entity
Presence entity
systemSystem entity
System entity
notificationsNotification entity
Notification entity
daysDay entity
Day entity
intervalsInterval entity
Interval entity
ldapLdapSettings entity
LdapSettings entity
snapshotsSnapshot entity
Snapshot entity
eventtypesEventType entity
EventType entity
cardsCard entity
Card entity
visitorcardsVisitor Card entity
Visitor Card entity
visitorsVisitor entity
Visitor entity
synchronizationSynchronization
Synchronization
userRightRight of ordinary user
Right of ordinary user
adminRightAdministrator right
Administrator right
accessManagerRightRight of manager of access
Right of manager of access
userManagerRightRight of manager of users
Right of manager of users
attendanceManagerRightRight of manager of attendance
Right of manager of attendance
anonymousLogin is not required to access the endpoint
Login is not required to access the endpoint
TODOSolve before release!
Solve before release!