RBAC Role

Create RBAC role

Creates a Role-Based Access Control (RBAC) role that can be assigned to users in your organization. Provide the role configuration, including its name, description, and list of permission and policy IDs, in the request body.

Required fields: The request must include at least one valid ID for either the policies or permissions field.

post/auth/roles

Request

  • Base URL: https://infrahub-api.nexgencloud.com/v1
  • URL: https://infrahub-api.nexgencloud.com/v1/auth/roles
  • Auth: API key in header api_key

Request body

descriptionstring required

New description for the RBAC role.

namestring required

New name for the RBAC role.

policiesinteger[]

IDs of the policies to assign to the RBAC role.

permissionsinteger[]

IDs of the permissions to assign to the RBAC role.

Response

Success

statusboolean

Whether the request succeeded.

messagestring

Human-readable description of the result.

Example response

{
  "status": true,
  "message": "Creating RBAC role success",
  "role": {
    "id": 7613,
    "name": "example-role",
    "description": "example",
    "created_at": "2026-05-06T15:18:42Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.