Skip to content
NimbusNexus

Roles

A role is a bundle of permissions. Role assignment is the act of granting a role to a user or a group on a project, or on the workspace itself. The same user can hold different roles on different projects; a user with no role on a project can't see it at all.

Built-in roles

GET /api/v1/roles/ lists the platform's global roles, marked is_global: true, and any custom roles your workspace has created; GET /api/v1/roles/{role_id} reads one. Of the global roles, you can grant manager, member, reader and billing. The others, admin included, can't be granted.

Custom roles

POST /api/v1/roles/ creates a role in your workspace, with a name and an optional description. PATCH /api/v1/roles/{role_id} changes either one, and DELETE /api/v1/roles/{role_id} removes the role. Only your workspace's own roles can be changed or deleted; for a global role, both answer 404.

Granting and revoking

POST /api/v1/roles/grant takes a list of assignments, so one call can grant several. Each assignment names a role, exactly one user or group, and exactly one target: a project, or a domain for the workspace itself, all by ID. An assignment with no subject or target, or with two, answers 422. POST /api/v1/roles/revoke takes the same list and removes those assignments.

Grants and revokes stay inside your own workspace. A target must be your workspace or one of its projects (for an API key, the workspace its project belongs to), and the role must be manager, member, reader, billing or one of your workspace's own roles. The API checks every assignment before it makes any: if one is refused, the call answers 403 and nothing in the list is applied.

GET /api/v1/roles/assignments lists the workspace's assignments, on its projects and on the workspace itself, including the ones that come through a group. Filter it by role, user, group, project or domain.

Grant and revoke also accept an admin's API key. The other role calls need an admin's session scoped to the workspace itself: an API key is always scoped to one project, so a key's call to them answers 400.

How role assignments compose

A user can hold multiple role assignments on one project. The effective permission set is the union — the role list is additive, not multiplicative. A role granted to the user directly and another granted to one of their groups both apply.

Revoking one role doesn't revoke the others. To strip a user completely, revoke each assignment one at a time, or delete the user (which atomically revokes all assignments).

What's next

Reference

GET/api/v1/roles/

List Roles

List roles available to the caller, combining workspace-scoped and global roles, with optional name search.

Parameters

NameInTypeDescription
searchquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/roles/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/roles/

Create Role

Create a new role within the caller's workspace.

Request body

FieldTypeDescription
name*string—
descriptionstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/roles/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example"
  }'
GET/api/v1/roles/assignments

Get Role Assignments

List role assignments visible in the caller's scope, including direct user, group-derived and domain-level assignments.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
rolequerystring | null—
userquerystring | null—
groupquerystring | null—
projectquerystring | null—
systemquery"all" | null—
effectivequeryboolean | null—
domainquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/roles/assignments" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/roles/grant

Grant Role

Grant roles to users or groups on the caller's workspace or its projects: manager, member, reader, billing, or one of the workspace's own roles.

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/roles/grant" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "role": "example"
    }
  ]'
POST/api/v1/roles/revoke

Revoke Role

Revoke roles from users or groups on the caller's workspace or its projects: manager, member, reader, billing, or one of the workspace's own roles.

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/roles/revoke" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "role": "example"
    }
  ]'
GET/api/v1/roles/{role_id}

Get Role

Retrieve a single role by ID, scoped to the caller's workspace or global roles.

Parameters

NameInTypeDescription
role_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/roles/<role_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/roles/{role_id}

Update Role

Update the name or description of a role within the caller's workspace.

Parameters

NameInTypeDescription
role_id*pathstring—

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/roles/<role_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/roles/{role_id}

Delete Role

Delete a workspace-scoped role by ID.

Parameters

NameInTypeDescription
role_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/roles/<role_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →