Перейти до вмісту
NimbusNexus

Roles

A role is a bundle of permissions. Role assignment is the act of granting a role to a user on a project. 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

Every project ships with four built-in roles you can assign without defining anything custom:

RoleWhat they can do
viewerRead every resource. No writes, no deletes. Right for monitoring tools, auditors.
editorCreate + update most resources. Cannot manage IAM (users, roles, keys). Right for day-to-day developers.
adminEverything editor can do, plus IAM. Can create users, grant/revoke roles, manage API keys.
billing-adminRead invoices, change payment method, view + raise quota. No resource access. Right for finance.

The admin role does not include billing-admin and vice versa. By design — the engineer who runs the API shouldn't also be the one approving the bill.

Granular roles

Beyond the four built-ins, we ship per-resource granular roles for the cases where editor is too much:

  • vms:operator — create / start / stop / destroy VMs only, no networking
  • storage:operator — manage volumes, buckets, snapshots, backups
  • dns:admin — full DNS zone + record management; nothing else
  • networking:admin — networks, subnets, security groups, floating IPs, LBs
  • databases:admin — managed databases + their backups

You assign these the same way as built-ins, via POST /v1/role-assignments.

Custom roles

Define your own at POST /v1/roles (not in the minimal sample below) by listing the permissions to bundle. Permission names follow the pattern <resource>:<action> — e.g. vms:read, volumes:create, databases:snapshot. The full permission catalog is at GET /v1/permissions.

Use cases for custom roles: "read everything except billing" for a security auditor; "manage DNS records but not zones" for a marketing team that owns subdomain content but not the zone delegation.

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. Granting viewer + vms:operator to the same user gives them read on everything + write on VMs specifically.

Revoking one role doesn't revoke the others. To strip a user completely, delete 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

NameInRequiredDescription
searchqueryno—

Responses

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

https://api.nimbusnexus.net/api/v1/roles/

POST/api/v1/roles/

Create Role

Create a new role within the caller's workspace.

Request body

JSON body required.

Responses

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

https://api.nimbusnexus.net/api/v1/roles/

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

NameInRequiredDescription
admin_domainqueryno—
admin_projectqueryno—
rolequeryno—
userqueryno—
groupqueryno—
projectqueryno—
domainqueryno—
systemqueryno—
effectivequeryno—

Responses

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

https://api.nimbusnexus.net/api/v1/roles/assignments

POST/api/v1/roles/grant

Grant Role

Grant one or more roles to users or groups on the specified system, domain or project targets.

Request body

JSON body required.

Responses

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

https://api.nimbusnexus.net/api/v1/roles/grant

POST/api/v1/roles/revoke

Revoke Role

Revoke one or more roles from users or groups on the specified system, domain or project targets.

Request body

JSON body required.

Responses

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

https://api.nimbusnexus.net/api/v1/roles/revoke

GET/api/v1/roles/{role_id}

Get Role

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

Parameters

NameInRequiredDescription
role_idpathyes—

Responses

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

https://api.nimbusnexus.net/api/v1/roles/{role_id}

PATCH/api/v1/roles/{role_id}

Update Role

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

Parameters

NameInRequiredDescription
role_idpathyes—

Request body

JSON body required.

Responses

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

https://api.nimbusnexus.net/api/v1/roles/{role_id}

DELETE/api/v1/roles/{role_id}

Delete Role

Delete a workspace-scoped role by ID.

Parameters

NameInRequiredDescription
role_idpathyes—

Responses

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

https://api.nimbusnexus.net/api/v1/roles/{role_id}

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