v47

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2024-10-01163166522.3 KB
Roles

Create or replace role

Create or replace role. If there is an existing role with the same name as the one specified in the request, will replace the existing role with the provided fields

put/v1/role

Request body

namestring required

Name of the role

descriptionstring nullable

Textual description of the role

member_rolesstring[] nullable

Ids of the roles this role inherits from

An inheriting role has all the permissions contained in its member roles, as well as all of their inherited permissions

org_namestring nullable

For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, you may specify the name of the organization the role belongs in.

Response

Returns the new role object

idstring uuid required

Unique identifier for the role

org_idstring uuid nullable

Unique id for the organization that the role belongs under

A null org_id indicates a system role, which may be assigned to anybody and inherited by any other role, but cannot be edited.

It is forbidden to change the org after creating a role

user_idstring uuid nullable

Identifies the user who created the role

createdstring date-time nullable

Date of role creation

namestring required

Name of the role

descriptionstring nullable

Textual description of the role

deleted_atstring date-time nullable

Date of role deletion, or null if the role is still active

member_rolesstring[] nullable

Ids of the roles this role inherits from

An inheriting role has all the permissions contained in its member roles, as well as all of their inherited permissions