Binding a user to a key list.
PATCH/api/admin/v1/intercoms/{intercom}keysHeaders |
Authorization | Bearer token |
Accept | application/json |
X-Client | ios-cctv|android-cctv|thick-legal|web |
X-UUID | unique device id |
Body |
json |
JSON
{
"keys": [
1269,
1270
],
"user_id": 57
}
|
intercomoptional | int | Unique identifier of the intercom |
keysrequired | integer | Array of intercom key IDs |
user_idrequired | integer | User ID to which the keys are being added. See the List of users |
Response |
200 | Successful response |
JSON
[
{
"id": 1269,
"title": null,
"key": "000000FFFFAAAA",
"user": {
"id": 57,
"name": "Name",
"login": "user",
"created_at": "2019-10-02 20:03:30",
"updated_at": "2020-06-11 19:40:16",
"expired_at": null,
"is_licence_limit_reached": true,
"ptz_priority": 10,
"access_token_id": null
},
"created_at": "2022-10-25 17:23:54",
"updated_at": "2022-10-25 18:12:20",
"type": "sub",
"type_pretty": "Additional",
"flat": 1
},
{
"id": 1270,
"title": null,
"key": "000000FFFFAAAB",
"user": {
"id": 57,
"name": "Name",
"login": "user",
"created_at": "2019-10-02 20:03:30",
"updated_at": "2020-06-11 19:40:16",
"expired_at": null,
"is_licence_limit_reached": true,
"ptz_priority": 10,
"access_token_id": null
},
"created_at": "2022-10-25 17:23:54",
"updated_at": "2022-10-25 18:12:20",
"type": "sub",
"type_pretty": "Additional",
"flat": 1
}
]
|
401 | Authorization token is not provided or is invalid. Obtaining a token |
Example |
JSON
curl -k --location --request PATCH 'https://vms.local/api/admin/v1/intercoms/{intercom}keys' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
"keys": [
1269,
1270
],
"user_id": 57
}'
|