Post
/api/v1/abac/rooms/:rid/attributes/:key
- Adds a single ABAC attribute key to a room.
- Creates a new ABAC attribute on the specified room for the given key, assigning it the provided values array; fails if the room already has this key or if the key/values are not allowed by the global attribute definition.
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
- Values (array of strings, required): The attribute values to assign for this key.
- Must have at least 1 item, max 10 items, and all values must be unique.
Example 1
{
"values": [
"asia"
]
}object
values
Array of string
string
Responses
200
OK
Success
{
"success": true
}object
success
boolean
400
Bad Request
Attribute definition missing
{
"success": false,
"error": "error-attribute-definition-not-found"
}Invalid attribute values
{
"success": false,
"error": "error-invalid-attribute-values"
}Duplicate key on a room
{
"success": false,
"error": "error-duplicate-attribute-key"
}Cannot convert default room to ABAC
{
"success": false,
"error": "error-cannot-convert-default-room-to-abac"
}Room not found
{
"success": false,
"error": "error-room-not-found"
}object
success
boolean
error
string
401
Unauthorized
Unauthorized login attempt
{
"success": false,
"error": "error-unauthorized"
}object
success
boolean
error
string
403
Forbidden
No "abac-management"
{
"success": false,
"error": "error-not-authorized"
}object
success
boolean
error
string