Professional Documents
Culture Documents
Intelli MAccessv2.1RESTAPI
Intelli MAccessv2.1RESTAPI
Version 2.1
infinias Confidential
page 1
Table of Contents
1.0 GENERAL DESCRIPTION...............................................................................4
1.1
2.0 DOORS....................................................................................................... 4
2.1
GET
2.2
LOCK
ONE OR MORE
2.3
LOCK
ALL
2.4
UNLOCK
ONE OR MORE
2.5
UNLOCK
ALL
2.6
REVERT
ONE OR MORE
2.7
REVERT
ALL
2.8
ENERGIZE
2.9
DE-ENERGIZE
DOOR....................................................................................5
DOORS (ALLOW
DOORS (ALLOW
CARD SWIPES)................................................................6
CARD SWIPES)..............................................................................6
DOORS........................................................................................... 6
DOORS......................................................................................................... 7
DOORS
DOORS
TO SCHEDULE.........................................................................7
TO SCHEDULE.......................................................................................7
ONE OR MORE
DOOR
ONE OR MORE
OUTPUTS..............................................................................8
DOOR
DOOR
OUTPUTS.........................................................................8
2.10
ACTIVATE
2.11
DE-ACTIVATE
2.12
AND
2.13
AND
ONE OR MORE
ONE OR MORE
INPUTS...............................................................................8
DOOR
INPUTS..........................................................................9
3.0 ZONES...................................................................................................... 10
3.1
LOCK
ONE OR MORE
ZONES (ALLOW
3.2
LOCK
ALL
3.3
UNLOCK
ONE OR MORE
3.4
UNLOCK
ALL
3.5
REVERT
ONE OR MORE
3.6
REVERT
ALL
3.7
AND
3.8
AND
ZONES (ALLOW
CARD SWIPES)...............................................................10
CARD SWIPES).............................................................................11
ZONES..........................................................................................11
ZONES........................................................................................................ 11
ZONES
ZONES
TO SCHEDULE........................................................................12
TO SCHEDULE......................................................................................12
4.0 PEOPLE.................................................................................................... 15
4.1
GET
4.2
GET DETAILS
4.3
4.4
4.5
UPDATE PERSON............................................................................................................ 22
4.6
DELETE PERSON............................................................................................................. 22
4.7
GETPERSONIMAGE.......................................................................................................... 23
ON A
PERSON.............................................................................................. 16
FIELDS POPULATED)....................................................................18
FIELDS POPULATED)...........................................................................20
infinias Confidential
page 2
5.0 EVENTS.................................................................................................... 24
5.1
GET EVENTS
BY
CREATED DATETIME..................................................................................24
5.2
GET EVENTS
BY
EVENTID.................................................................................................25
5.3
GENERATE
5.4
RAISE ALARM................................................................................................................ 26
AN
EVENT...................................................................................................... 26
infinias Confidential
page 3
1.0
General Description
The Intelli-M Access REST API is patterned after the HTTP REST API standard, whose
definition can be found here. The API has no authentication requirements (meaning you can
connect to this API without providing credentials). However, since its merely a wrapper
around Intelli-M Access, you must provide real Intelli-M Access credentials with each REST
call using the argument names username and password. If the call is a GET or DELETE,
the credentials must be supplied as part of the query string as parameters, and if the call is
POST or PUT, the credentials must be part of the Body. Parameters passed in the Body must
be URL encoded.
This API can also be viewed by opening your web browser and entering
http://hostname:18779/intellimaccess/ruleaction/discovery into the web browser's URL text
box (where hostname is the name of the computer on which you installed Intelli-M Access.
The browser will display Xml data with links to the highest-level API Resources, which in turn
will provide links to the API for each Resource. In Intelli-M Access, a Resource is a Door, a
Person, a Zone, an Email, or an Event.
The following section describes each Resource, and the calls you can make to each
Resource. In each case, you will replace the hostname keyword with the actual name or IP
Address of the computer on which you installed Intelli-M Access.
1.1 GET Result Format
The default format for data returned from a GET is varied, but Xml format can be requested
by adding the URI parameter format=xml and JSON can be requested by adding the
parameter format=json.
2.0
Doors
The Doors API provides the capability to lock or unlock Doors, return them to the current lock
schedule, energize or de-energize one or more Door outputs, and activate or de-activate one
or more Door inputs. You must know the Door Id as understood by Intelli-M Access in order
to perform work on a Door. Use the "Get Doors' Names and Values" Command to obtain the
Door Id for the name you seek to modify.
infinias Confidential
page 4
http://hostname:18779/infinias/ia/Doors
Method
GET
URI Parameters
DoorIds=1
Returns
Example
http://localhost:18779/infinias/ia/doors?
username=admin&password=admin&doorids=1
infinias Confidential
page 5
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
LockStatus=Locked&
DoorIds=1,2,3&
Duration=10&
Username=admin&
Password=admin
Returns
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
LockStatus=Locked&
Duration=10&
username=admin&password=admin
Returns
http://hostname/infinias/ia/Doors
Method
PUT
Body
LockStatus=Unlocked&
DoorIds=1,2,3&
Duration=10&
username=admin&password=admin
Returns
infinias Confidential
page 6
200 OK
2.5 Unlock all Doors
URI
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
LockStatus=Unlocked&
Duration=10&
username=admin&password=admin
Returns
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
LockStatus=Normal&
DoorIds=1,2,3&
username=admin&password=admin
Returns
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
LockStatus=Normal&
username=admin&password=admin
Returns
infinias Confidential
page 7
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
DoorIds=1,2,3&
IONames=Output 1&
Energized=true&
username=admin&password=admin
Returns
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
DoorIds=1,2,3&
IONames=Output 1&
Energized=false&
username=admin&password=admin
Returns
2.10
URI
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
DoorIds=1,2,3&
IONames=Input 1&
Energized=true&
username=admin&password=admin
Returns
infinias Confidential
page 8
2.11
URI
http://hostname:18779/infinias/ia/Doors
Method
PUT
Body
DoorIds=1,2,3&
IONames=Input 1&
Energized=false&
username=admin&password=admin
Returns
2.12
URI
http://hostname:18779/infinias/ia/Doors/Names/Values
Method
GET
URI Parameters
Start=0
Pagesize=100
Returns
Example
http://localhost:18779/infinias/ia/events?
username=admin&password=admin&start=0&pagesize=100&format=xml
infinias Confidential
page 9
2.13
URI
http://hostname:18779/infinias/ia/Doors/Names/Values
Method
GET
URI Parameters
Start=0
Pagesize=100
Returns
Example
3.0
http://localhost:18779/infinias/ia/events?
username=admin&password=admin&start=0&pagesize=100&format=json
Zones
http://hostname:18779/infinias/ia/zones
Method
PUT
Body
LockStatus=Locked&
ZoneIds=1,2,3&
Duration=10&
username=admin&password=admin
Returns
infinias Confidential
page 10
http://hostname:18779/infinias/ia/zones
Method
PUT
Body
LockStatus=Locked&
Duration=10&
username=admin&password=admin
Returns
http://hostname/infinias/ia/zones
Method
PUT
Body
LockStatus=Unlocked&
ZoneIds=1,2,3&
Duration=10&
username=admin&password=admin
Returns
http://hostname:18779/infinias/ia/zones
Method
PUT
Data (example
values)
LockStatus=Unlocked&
Duration=10&
username=admin&password=admin
Returns
infinias Confidential
page 11
http://hostname:18779/infinias/ia/zones
Method
PUT
Body
LockStatus=Normal&
ZoneIds=1,2,3&
username=admin&password=admin
Returns
http://hostname:18779/infinias/ia/zones
Method
PUT
Body
LockStatus=Normal&
username=admin&password=admin
Returns
infinias Confidential
page 12
http://hostname:18779/infinias/ia/zones/Names/Values
Method
GET
URI
Parameters
Start=0
Pagesize=100
Returns
Example
http://localhost:18779/infinias/ia/zones/Names/Values?
username=admin&password=admin&start=0&pagesize=100&start=0&page
size=100&format=xml
infinias Confidential
page 13
http://hostname:18779/infinias/ia/zones/Names/Values
Method
GET
URI
Parameters
Start=0
Pagesize=100
Returns
Example
http://localhost:18779/infinias/ia/zones/Names/Values?
username=admin&password=admin&start=0&pagesize=100&format=json
infinias Confidential
page 14
4.0
People
http://hostname:18779/infinias/ia/People
Method
GET
URI
Parameters
Start=0
pagesize=50
Returns
Example
http://localhost:18779/infinias/ia/People?
username=admin&password=admin&start=0& pagesize =50
infinias Confidential
page 15
http://hostname:18779/infinias/ia/People/Details
Method
GET
URI
Parameters
Id=2 (or)
ExternalId=12345
Returns
infinias Confidential
page 16
"ExpirationTime":null,
"Disabled":false,
"SiteCode":"31",
"CardIssueCode":"16271",
"Id":2},
"IsSystemUser":false,
"RoleInfo":{"Role":null,
"Username":null,
"PasswordChanged":false,
"Password":null,"Id":0},
"SaveImage":false,
"Id":2}],
"errorList":null}
Example
http://localhost:18779/infinias/ia/People?
username=admin&password=admin&id=2
infinias Confidential
page 17
http://hostname:18779/infinias/ia/People
Method
POST
Body
data.Id=0&
data.SaveImage=False&
data.ImageFilename=&
data.KeepImageAspect=False&
data.IsCredentialHolder=True&
data.IsSystemUser=True&
data.PersonalInfo.Id=0&
data.PersonalInfo.FirstName=Mike&
data.PersonalInfo.MiddleInitial=&
data.PersonalInfo.LastName=Jones&
data.PersonalInfo.DisplayName=&
data.PersonalInfo.EmployeeId=&
data.PersonalInfo.Title=&
data.PersonalInfo.Suffix=&
data.PersonalInfo.Department=&
data.PersonalInfo.ExternalId=100&
data.ContactInfo.PrimaryEmail=&
data.ContactInfo.SecondaryEmail=&
data.ContactInfo.Company=&
data.ContactInfo.Office=&
data.ContactInfo.Building=&
data.ContactInfo.Position=&
data.ContactInfo.LicensePlateNumber=&
data.ContactInfo.Notes=&
data.ContactInfo.PrimaryPhoneNumber=&
data.ContactInfo.PrimaryExtension=&
data.ContactInfo.CellPhoneNumber=&
data.GroupInfo.AddGroups=1&
data.GroupInfo.RemoveGroups=&
data.GroupInfo.GroupsToAdd=1&
data.GroupInfo.GroupsToRemove=&
data.CustomFields=&
data.BadgeInfo.TimeZoneBias=0&
data.BadgeInfo.Disabled=False&
data.BadgeInfo.ExpirationDate=&
data.BadgeInfo.ExpirationTime=&
data.BadgeInfo.ActivationDate=7/30/2010&
data.BadgeInfo.ActivationTime=12:00 AM&
data.BadgeInfo.SiteCode=31&
data.BadgeInfo.CardIssueCode=18777&
data.BadgeInfo.PinCode=&
data.BadgeInfo.Id=0&
data.RoleInfo.Role=&
data.RoleInfo.Username=&
data.RoleInfo.Password=&
data.RoleInfo.PasswordConfirm=&
data.RoleInfo.PasswordChanged=True
infinias Confidential
page 18
Returns
infinias Confidential
page 19
http://hostname:18779/infinias/ia/People
Method
POST
Body
data.Id=0&
data.SaveImage=True&
data.ImageFilename=C:\\Users\\Pictures\\image.jpg&
data.KeepImageAspect=True&
data.IsCredentialHolder=True&
data.IsSystemUser=True&
data.PersonalInfo.Id=0&
data.PersonalInfo.FirstName=John&
data.PersonalInfo.MiddleInitial=L&
data.PersonalInfo.LastName=Smith&
data.PersonalInfo.DisplayName=&
data.PersonalInfo.EmployeeId=0&
data.PersonalInfo.Title=Mr.&
data.PersonalInfo.Suffix=Jr.&
data.PersonalInfo.Department=Engineering&
data.PersonalInfo.ExternalId=101&
data.ContactInfo.PrimaryEmail=username@company.com&
data.ContactInfo.SecondaryEmail=username@gmail.com&
data.ContactInfo.Company=Acme, Ltd.&
data.ContactInfo.Office=Indy&
data.ContactInfo.Building=Building 1&
data.ContactInfo.Position=Software&
data.ContactInfo.LicensePlateNumber=IA-1&
data.ContactInfo.Notes=This is a note&
data.ContactInfo.PrimaryPhoneNumber=555-1212&
data.ContactInfo.PrimaryExtension=99&
data.ContactInfo.CellPhoneNumber=555-9999&
data.GroupInfo.AddGroups=1&
data.GroupInfo.RemoveGroups=&
data.GroupInfo.GroupsToAdd=1&
data.GroupInfo.GroupsToRemove=&
data.CustomFields=&
data.BadgeInfo.TimeZoneBias=0&
data.BadgeInfo.Disabled=False&
data.BadgeInfo.ExpirationDate=01/01/2099&
data.BadgeInfo.ExpirationTime=12:00:00 AM&
data.BadgeInfo.ActivationDate=01/01/2000&
data.BadgeInfo.ActivationTime=12:00:00 AM&
data.BadgeInfo.SiteCode=31&
data.BadgeInfo.CardIssueCode=18778&
data.BadgeInfo.PinCode=6666&
data.BadgeInfo.Id=0&
data.RoleInfo.Role=User&
data.RoleInfo.Username=user&
data.RoleInfo.Password=password&
data.RoleInfo.PasswordConfirm=password&
data.RoleInfo.PasswordChanged=True
infinias Confidential
page 20
Returns
infinias Confidential
page 21
http://hostname:18779/infinias/ia/People
Method
PUT
Body
Returns
http://hostname:18779/infinias/ia/People
Method
DELETE
URI
Parameters
id
Returns
infinias Confidential
page 22
4.7 GetPersonImage
URI
http://localhost:18779/infinias/ia/people/image
Method
Get
URI
Parameters
id
Returns
Example
http://localhost:18779/infinias/ia/people/image?
username=admin&password=admin&id=2
infinias Confidential
page 23
5.0
Events
The Events API provides the capability to get events or generate a new event into Intelli-M
Access, which can then be configured on the Rules page to do whatever you wish. You can
also raise the event level of an existing event, for example turning ordinary events into
alarms. You'll need to know the Intelli-M Access event ID from the database to raise an
event level.
5.1 Get Events by Created DateTime
URI
http://hostname:18779/infinias/ia/events
Method
GET
URI
Parameters
Description
Returns
start
pagesize
Example
http://localhost:18779/infinias/ia/events?
infinias Confidential
page 24
username=admin&password=admin&start=2014-0711T15:02:14&pagesize=1
5.2 Get Events by EventId
URI
http://hostname:18779/infinias/ia/events
Method
GET
URI
Parameters
lastid
pagesize
Description
Returns
infinias Confidential
page 25
Example
http://localhost:18779/infinias/ia/events?
username=admin&password=admin&lastid=101&pagesize=1
infinias Confidential
page 26
http://hostname:18779/infinias/ia/events
Method
POST
Body
Returns
Manufacturer=acme&
Action=Granted
Category=Access&
Reason=Invalid Credentials
Device=none&
Result=success&
Username=admin&password=admin
404 Not Found
401 Unauthorized
200 OK
{"success":true,"RecordId":999,"wrap":false,"logout":false,"e
rrors":[]}
http://hostname:18779/infinias/ia/events
Method
PUT
Body
Returns
eventId=999&
severity=128&
Username=admin&password=admin
404 Not Found
401 Unauthorized
200 OK
infinias Confidential
page 27