API User Details

From IVS Wiki
Jump to: navigation, search

This API provides detailed information for a specified user.

Resource URL

http://valt.example.com/api/v3/admin/users/{userid}

Replace {userid} with the actual id number of the user. Users are numbered sequentially when added to VALT.

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
404 Specified User Not Found
JSON Response
data
id User ID Number
name User Name
Display Name User Display Name
user_group User's Current Primary Group
id Group ID
name Group Name
card number RFID Card number or PIN Code for Keypad
video_access Array of users and group who's videos the specified user group is allowed to view.
user_groups
id User Group ID
name User Group Name
users Users are categorized under their primary group.
id User ID
name User Name

Examples

Request

https://ivstest1.ad.ipivs.com/api/v3/admin/users/1?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": 5,
"name": "Denis Test"
},
{
"id": 6,
"name": "JoeDon Calhoun"
}
]
},
{
"id": 2,
"name": "test",
"users":[
{
"id": 25,
"name": "test1"
}
]
},
{
"id": 3,
"name": "Test sharing",
"users":[
]
},
{
"id": 4,
"name": "IoGroup",
"users":[
]
}
]
}
}
}

Failure Response

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