API User Group Details
Revision as of 13:22, 14 April 2020 by IVSWikiBlue (talk | contribs) (Created page with "This API provides detailed information for a specified user group. ===Resource URL=== <pre>http://valt.example.com/api/v3/admin/user_groups/{groupid}</pre> ''Replace {groupi...")
This API provides detailed information for a specified user group.
Contents
Resource URL
http://valt.example.com/api/v3/admin/user_groups/{groupid}
Replace {groupid} with the actual id number of the user group. User groups 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 Group Not Found |
data | ||||
---|---|---|---|---|
id | Group ID Number | |||
name | Group Name | |||
marker | Currently selected primary marker template. | |||
information | Currently selected primary information template. | |||
rights | List of all rights currently enabled for the specified user group. | |||
name | Right Category Name (This should correspond to the right categories in the Users & Groups section of VALT) | |||
sub-rights | Array of all rights in the above category currently enabled for the specified user group. | |||
max_record_duration | Maximum record duration in minutes defined for the user group. | |||
rooms | List of rooms the user group is allowed access to. | |||
id | Room ID | |||
name | Room Name | |||
video_access | List 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 | |||
retention | Default retention period for any videos belonging to users in the specified user group. | |||
until | Date videos will be retained until. If another retention type is set, will return 0. | |||
date | Date videos will be deleted on. | |||
timezone_type | ||||
timezone | Timezone used to calculate date for retention | |||
for | ||||
days | Number of days a video will be retained for. If another retention type is set, will return 0. | |||
hours | Number of hours a video will be retained for. If another retention type is set, will return 0. | |||
minutes | Number of minutes a video will be retained for. If another retention type is set, will return 0. | |||
type | Retention Type (Possible values: until, infinitely, days, hours, minutes) |
Examples
Request
https://ivstest1.ad.ipivs.com/api/v3/admin/user_groups/6?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": 6, "name": "Justin testing", "marker": 2, "information": 1, "rights":[ { "name": "general", "sub_rights":[ "general--home", "general--alert", "general--edit-profile", "general--change-password", "general--notifications" ] }, { "name": "monitoring", "sub_rights":[ "monitoring--talkback", "monitoring--ptz", "monitoring--ptz--ptz-control", "monitoring--ptz--can-ptz-all-authors", "monitoring--ptz--edit-presets", "monitoring--ptz--use-presets", "monitoring--lock-rooms", "monitoring--unlock-all-users", "monitoring--views", "monitoring--recording", "monitoring--recording--start-recording", "monitoring--recording--stop-all-authors", "monitoring--recording--stop-confirmation", "monitoring--recording--sharing", "monitoring--recording--retention", "monitoring--recording--reassign-author", "monitoring--recording--prepare-recording", "monitoring--recording--pause-recording", "monitoring--recording--pause-all-authors", "monitoring--recording--resume-all-authors", "monitoring--view--recording", "monitoring--recording--evaluation", "monitoring--recording--evaluation--view-option-values", "monitoring--recording--evaluation--view-field-values", "monitoring--recording--evaluation--view-total-value", "monitoring--recording--options", "monitoring--recording--options-all-authors" ] } ], "max_record_duration": 0, "rooms":[ { "id": 37, "name": "Test" }, { "id": 39, "name": "Fixed Dome" }, { "id": 40, "name": "Wall PTZ" }, { "id": 41, "name": "Ceiling PTZ" }, { "id": 42, "name": "Covert F41" }, { "id": 43, "name": "Fixed Box" }, { "id": 44, "name": "Q Series" } ], "video_access":{ "user_groups":[ { "id": 6, "name": "Justin testing", "users":[ ] } ] }, "retention":{ "until": 0, "for":{ "days": 300, "hours": 0, "minutes": 0 }, "type": "days" } } }
Failure Response
{"error":{"code":401,"message":"No API key provided"}}