Request to get the settings:
https://[address_server]:[port]/settings/users/?sid=[id_session]
Response:
{
"name" : "users",
"type" : "UsersFolder",
"subdirs" : [
"Admin",
"Demo",
"IXWkytqU",
"Script",
"XZoJlPC2",
"user_add"
],
"values" : [
"local_operator",
"local_operator_logout"
]
} Table 182.
| subdirs | Description | Software version |
|---|---|---|
| Admin | Admin user settings | ≥3.1 |
| Demo | Demo user settings | ≥3.1 |
| Script | Settings of Script user | ≥3.1 |
| [GUID_user] | User settings | ≥3.1 |
| [GUID_group] | Settings of group user rights | ≥3.1 |
| user_add | Create new user or new group | ≥3.1 |
Request to get settings for a user group:
https://[address_server]:[port]/settings/users/[GUID_group]/?sid=[id_session]
Response:
{
"name" : "IXWkytqU",
"type" : "Group",
"subdirs" : [
],
"values" : [
"acl",
"archive_speed_limit",
"base_rights",
"can_change_password",
"icon",
"name",
"notes",
"ptz_priority",
"saveable_icon",
"settings_button",
"shutdown_button",
"templates_managing",
"templates_sharing",
"view_button"
]
} Request to get user settings:
https://[address_server]:[port]/settings/users/[GUID_user]/?sid=[id_session]
Response:
{
"name" : "XZoJlPC2",
"type" : "User",
"subdirs" : [
],
"values" : [
"acl",
"analytics_rights",
"archive_speed_limit",
"base_rights",
"can_change_password",
"cloud_login_offline_ttl_sec",
"cloud_utc_offset_minutes",
"enable_analytics",
"enable_local",
"enable_remote",
"enable_web",
"from_cloud",
"group",
"group_changed",
"icon",
"internal_revision",
"last_login_address",
"last_login_time",
"name",
"notes",
"password",
"password_empty_warning",
"ptz_priority",
"random_passwords",
"roles",
"saveable_icon",
"settings_button",
"shutdown_button",
"templates_managing",
"templates_sharing",
"timer_id",
"view_button"
]
} Retrieve a value (R):
https://[address_server]:[port]/settings/users/[GUID_group]/[setting]?sid=[id_session] https://[address_server]:[port]/settings/users/[GUID_user]/[setting]?sid=[id_session]
Write a value (W):
https://[address_server]:[port]/settings/users/GUID_group/[setting]=[value]?sid=[id_session] https://[address_server]:[port]/settings/users/[GUID_user]/[setting]=[value]?sid=[id_session]
Table 183.
| values | Description | Type | Software version | |
|---|---|---|---|---|
| acl |
User rights for individual objects, written in the following format: /[object1_GUID]/channels.[rights_values_sum1],/[object2_GUID]/channels.rights_values_sum2] |
string | RW | ≥3.1 |
| analytics_rights | User rights for analytics | string | RW | ≥4.0 |
| archive_speed_limit | Archive writing speed limit | integer | RW | ≥4.0 |
| base_rights | Group/user basic rights | integer | RW | ≥3.1 |
| can_change_password |
User/user group is allowed to change password 0 - no, 1 - yes |
integer | RW | ≥3.3 |
| cloud_login_offline_ttl_sec | integer | R | ≥4.0 | |
| cloud_utc_offset_minutes | integer | R | ≥4.0 | |
| enable_analytics |
User is allowed network analytics: 0 - no, 1 - yes |
integer | RW | ≥4.0 |
| enable_local |
User is allowed local login: 0 - no, 1 - yes |
integer | RW | ≥3.1 |
| enable_remote |
User is allowed remote connection: 0 - no, 1 - yes |
integer | RW | ≥3.1 |
| enable_web |
User is allowed connecting via browser/mobile app: 0 - no, 1 - yes |
integer | RW | ≥4.1 |
| from_cloud |
Cloud user: 0 - no, 1 - yes |
integer | RW | ≥3.3 |
| group | User group GUID | string | RW | ≥3.2 |
| group_changed | integer | RW | ≥3.2 | |
| icon | User/group icon path | string | RW | ≥3.1 |
| internal_revision | integer | RW | ≥3.2 | |
| last_login_address | Last user login address | string | RW | ≥3.1 |
| last_login_time | Last user login date and time in UNIX time format | string | R | ≥3.1 |
| name | Group/user name | string | RW | ≥3.1 |
| notes | string | RW | ≥3.1 | |
| password | User password | string | W | ≥3.1 |
| password_empty_warning | integer | RW | ≥3.1 | |
| ptz_priority | PTZ priority | integer | RW | ≥3.1 |
| random_passwords | string | W | ≥3.3 | |
| roles | Cloud user rights | string | R | ≥4.0 |
| saveable_icon | User/group icon path | string | RW | ≥3.1 |
| settings_button |
The "Settings" button is allowed to a user/group: 0 - no, 1 - yes |
integer | RW | ≥3.1 |
| shutdown_button | Allow shutdown button | integer | RW | ≥3.1 |
| templates_managing |
User/group is allowed template managing: 0 - no, 1 - yes |
integer | RW | ≥3.1 |
| templates_sharing |
User/group is allowed sharing templates to the cloud: 0 - no, 1 - yes |
integer | RW | ≥4.0 |
| timer_id | string | R | ≥4.0 | |
| view_button |
A "View" button is allowed user/group: 0 - no, 1 - yes |
integer | RW | ≥3.2 |
The basic user/group rights base_rights and user rights for individual objects (acl) are created using a bitmask, in which each bit is responsible for a particular right. Thus, a user right is a sum of all values corresponding to the allowed (for base_rights) or allowed/forbidden right (for acl):
Table 184.
| Bit number | Value | User right | Used in settings |
|---|---|---|---|
| 0 | +1 | Viewing is allowed | base_rights and acl |
| 1 | + 2 | Archive viewing is allowed | base_rights and acl |
| 2 | + 4 | Managing is allowed | base_rights and acl |
| 3 | + 8 | Settings allowed | base_rights and acl |
| 5 | + 32 | Archive bookmarks editing is allowed | base_rights |
| 6 | + 64 | User and script settings are allowed | base_rights |
| 8 | + 256 | Archive, screenshot export is allowed | base_rights |
| 9 | + 512 | PTZ can be used | base_rights and acl |
| 10 | + 1 024 | Listening to sound is allowed | base_rights and acl |
| 32 | + 4 294 967 296 | Viewing is not allowed | acl |
| 33 | + 8 589 934 592 | Archive viewing is not allowed | acl |
| 34 | + 17 179 869 184 | Managing is not allowed | acl |
| 35 | + 34 359 738 368 | Setting is not allowed | acl |
| 41 | + 2 199 023 255 552 | Using PZT is not allowed | acl |
| 42 | + 4 398 046 511 104 | Listening to sound is not allowed | acl |
In order to program base user rights (Viewing is allowed, Archive viewing is allowed, Using PTZ is allowed), perform the following request:
https://192.168.1.200:8080/settings/users/o7J4zntS/base_rights=515?sid=shMa536E
In request:
- o7J4zntS - unique user guid;
- 515 is a value sum (1 + 2 + 512), corresponding to user rights (Viewing is allowed, Archive viewing is allowed, Using PTZ is allowed).
Make the following request in order to program user rights (Listening to sound is allowed and Using PTZ is not allowed) for PMAPNyRZ object:
https://192.168.1.200:8080/settings/users/o7J4zntS/acl=/PMAPNyRZ/channels.2199023256576?sid=shMa536E
In request:
- o7J4zntS - unique user guid;
- PMAPNyRZ - object guid, which the user is assigned the rights to;
- 2199023256576 is the sum of values (1024 + 2199023255552), corresponding to user rights (Sound listening is allowed and Using PTZ is not allowed).
Tip
See description of adding new users or user group requests in Requests for adding new users or user groups.

