Create ABAC attribute definition

Prev Next
Post
/api/v1/abac/attributes
  • Creates a new ABAC attribute definition.
  • Registers a global ABAC attribute by specifying its key and the list of allowed values, making it available for use on rooms and users.
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
Example 1
{
  "key": "my_department",
  "values": [
    "eng",
    "sales",
    "hr",
    "it"
  ]
}
object
key
string
values
Array of string
string
Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

ABAC disabled
{
  "success": false,
  "error": "error-abac-not-enabled"
}
Invalid attribute values
{
  "success": false,
  "error": "error-invalid-attribute-values"
}
Invalid attribute key
{
  "success": false,
  "error": "error-invalid-attribute-key"
}
Duplicate attribute key
{
  "success": false,
  "error": "error-duplicate-attribute-key"
}
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