Difference between revisions of "API List Users"

From IVS Wiki
Jump to: navigation, search
(Created page with "This API provides a list of all currently configured users. ===Resource URL=== <pre>http://valt.example.com/api/v3/admin/users</pre> ===Resource Information=== {|class="wiki...")
 
(No difference)

Latest revision as of 13:23, 14 April 2020

This API provides a list of all currently configured users.

Resource URL

http://valt.example.com/api/v3/admin/users

Resource Information

Method GET
Response Type JSON
Authentication Required Yes

Parameters

No parameters can be passed to this call.

Response

Code Reason
200 Request Successful
401 Unauthorized
JSON Response
data
The return from this call contains an array of JSON objects.
id User ID
name User Name
display_name User Display Name
user_group User Display Name
id User Group ID
name User Group name
card_number RFID Card Number or PIN Code for Keypad
video_access User Display Name
user_groups
id User Group ID
name User Group Name
users
id User ID
name User Name

Examples

Request

https://ivstest1.ad.ipivs.com/api/v3/admin/users?access_token=e82632d19c523678fea3d1016c6df9e9

Successful Response

Sample response is shown with line breaks to make it more readable. Actual responses will not include line breaks.

"data":[
{
"id": 1,
"name": "admin",
"display_name": null,
"user_group":{"id": 1, "name": "Administrators"},
"card_number": "326577",
"video_access":
{"user_groups":[
{
"id": 1,
"name": "Administrators",
"users":[
{
"id": 1,
"name": "admin"
},
{
"id": 7,
"name": "comma, test,"
}
]
}
},
{
"id": 2,
"name": "fstest2",
"display_name": "fstest2 fstest2",
"user_group":{"id": 1, "name": "Administrators"},
"card_number": null
},
{
"id": 3,
"name": "test",
"display_name": "FStest FSTest",
"user_group":{"id": 1, "name": "Administrators"},
"card_number": null
}
]
}

Failure Response

{"error":{"code":401,"message":"No API key provided"}}