Version 2021

List resources

Lists the resources in your physical access control system (PACS), such as doors, that can be accessed with Badge. For example, this call lists the doors that can be unlocked by Badge.

If a user is specified, the web service lists the resources that the user has access to.
If no user is specified, the web service lists all resources in the system.

Request format


HTTP method

GET

Resource URL

/resource/list_resources?user-id=user-id

Parameters

Parameter Required? Description
user-id Optional The user's ID. The value of user ID is decided by your Badge network configuration. It is meant to map one of your identity management system fields, such as a field in Microsoft Active Directory®, to a field in your PACS to uniquely identify the user. It could be an ID number, an email address, or another field that uniquely identifies a user.

Response format


Response header

Content-Type:application/json

Response body

Success response

{
"json_version": "2.0",
"status": "SUCCESS",
"resources": [
{
"resource_id": "...",
"resource_name": "..."
},
...
]
}

Failure response

{
"json_version": "2.0",
"status": "ERROR",
"message": "<error_message>"
}

Example

Request

http://localhost:8080/Usher.svc/resource/list_resources?user=6388

Response

Copy
{
"json_version": "2.0",
"status": "SUCCESS",
"resources": [
{
"resource_id": "2959fa5d-feeb-47d7-9df1-0c76080b912e",
"resource_name": "Main Door"
},
{
"resource_id": "3ec66926-4feb-4d21-9fc9-7daaccdb7be5",
"resource_name": "Lobby Entrance"
},
{
"resource_id": "8f68b69a-8d16-4e39-8a51-eb20ee5117b6",
"resource_name": "Rear Entrance"
}
]
}