Set Roles
Overwrite the roles of a key with a new set of roles.
Sets the roles of a key to a new set of roles. This endpoint overwrites the existing roles of the key with the new set. Existing roles that are not included in the new set are removed.
You can provide either role ids or role names in the request body. If you provide a name, we will create the role if it does not exist.
To use this endpoint, your root key must have the rbac.*.add_role_to_key
and potentially the rbac.*.create_role
permissions.
Changelog
Date | Changes |
---|---|
Jul 08 2024 | Introduced endpoint |
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The id of the key.
1
The roles you want to set for this key. This overwrites all existing roles.
Setting roles requires the rbac.*.add_role_to_key
permission.
Response
The id of the role. This is used internally
The name of the role
Was this page helpful?