v2

latestOpenAPI 3.0.3Apache-2.02026-08-07119359591.9 KB
Roles

Create a role

Create a new custom role for the authenticated user's account.

Payload Requirements

  • name is required and must be unique within the account.
  • permissions is required and must contain at least one valid permission identifier (e.g. PROJECT_READ, DATASET_CREATE).
  • System-managed fields (id, created_at, updated_at, is_predefined) are rejected if provided.

Valid example

{
  "name": "Data Scientist",
  "description": "Can read and create datasets and experiments.",
  "permissions": ["PROJECT_READ", "DATASET_READ", "DATASET_CREATE"]
}

Invalid example (missing required permissions)

{
  "name": "Data Scientist"
}

<Note>This endpoint is in beta, read more here.</Note>

post/v2/roles

Request body

namestring required

Human-readable name for the role. Must be unique within the account.

descriptionstring

Optional description of the role's purpose. Omitted from the response if empty.

permissionsPermission[] required

List of permissions to grant. At least one permission is required. Each value must be a valid permission identifier (e.g. PROJECT_READ, DATASET_CREATE).

Example request

{
  "name": "AI Engineer",
  "description": "Can read and create datasets and experiments but cannot manage spaces.",
  "permissions": [
    "PROJECT_READ",
    "DATASET_READ",
    "DATASET_CREATE",
    "EXPERIMENT_READ",
    "EXPERIMENT_CREATE"
  ]
}

Response

A role object.

idstring required

Unique identifier for the role.

namestring required

Human-readable name of the role.

descriptionstring

A brief description of the role's purpose.

permissionsPermission[] required

List of permissions granted by this role. Each value corresponds to a permission identifier (e.g. PROJECT_READ, DATASET_CREATE).

is_predefinedboolean required

Whether this role is a system-defined predefined role. Predefined roles cannot be updated or deleted.

created_atstring date-time required

Timestamp when the role was created.

updated_atstring date-time required

Timestamp when the role was last updated.