Skip to main content

Role-Based Access Control

Operations for managing Role-Based Access Control (RBAC) roles, enabling the assignment of pre-configured sets of permissions and policies to users within your organization.

Endpoint NameURLDescription
List RBAC rolesGET /auth/rolesReturns a list of existing RBAC roles.
Create RBAC role /auth/rolesCreates an RBAC role.
Retrieve RBAC role detailsGET /auth/roles/{id}Retrieves the details of an existing RBAC role.
Update RBAC rolePUT /auth/roles/{id}Modifies an RBAC role.
Delete RBAC roleDELETE /auth/roles/{id}Deletes an RBAC role.
Assign RBAC role to organization memberPUT /auth/users/{user_id}/assign-rolesAssigns an RBAC role to a member of your organization, granting them the specified permissions and policies.
Revoke RBAC role from organization memberDELETE /auth/users/{user_id}/rolesRemoves an RBAC role from a member of your organization, revoking the specified permissions and policies.

The RBAC roles object

RBAC endpoints return the roles object, offering details about your RBAC roles. This includes the name, environment, public key, creation timestamp, fingerprint, and ID.


Attributes


id integer

The unique identifier for the RBAC role.


name string

The name of the RBAC role.


description string

A description of the RBAC role.


policies array

An array containing information about policies assigned to the RBAC role.

Show child attributes

description string

A description of the policy.


id integer

The unique identifier for the policy.


name string

The name of the policy.


permissions array

An array containing information about permissions assigned to the RBAC role.

Show child attributes

resource string

The resource to which the permission grants access (e.g., Environment).


permission string

The name of the permission.


id integer

The unique identifier for the permission.


created_at date-time

The timestamp when the RBAC role was created.


Response

{
"id": 64,
"name": "example-role",
"description": "This is an test RBAC role.",
"policies": [
{
"description": "Gives read-only access to all resources",
"id": 2,
"name": "policy:ReadPermissions"
}
],
"permissions": [
{
"resource": "Environment",
"permission": "environment:create",
"id": 2
}
],
"created_at": "2024-02-08T09:45:34",
}

Back to top