latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

Permission

Create a new permission definition

Creates a new permission entry in the tenant's permission catalog. Use this during initial RBAC setup or when introducing a new resource/action pair that roles can then be granted; it is typically called by administrators configuring access control, not by end-user workflows.

Preconditions: the caller must be authenticated and hold the CREATE_PERMISSION permission for the tenant.

Supply a request body with resource, action, and optionally description.

On success, returns the created permission including its server-assigned id. Note: createdAt and updatedAt are always null in the current implementation.

post/permissions

Headers

tenant-idstring required

Tenant identifier that scopes the created permission to a specific tenant's permission catalog.

Request body

resourcestring required

Name of the resource this permission will govern (e.g., 'user', 'roster').

actionstring required

Name of the action this permission will grant on the resource (e.g., 'read', 'create').

descriptionstring

Optional human-readable explanation of what the permission allows.

Example request

{
  "resource": "user",
  "action": "read",
  "description": "Allows reading user profiles"
}

Response

The newly created permission, including its server-assigned id. Note: createdAt and updatedAt are always null in the current implementation.

idstring

Server-assigned unique identifier for the permission.

resourcestring

Name of the resource this permission governs (e.g. 'user', 'roster'). Mirrors the resource value supplied when the permission was created or last replaced.

actionstring

Name of the action this permission grants on the resource (e.g. 'read', 'create'). Mirrors the action value supplied when the permission was created or last replaced.

descriptionstring

Human-readable explanation of what the permission allows. Optional; may be null if it was not supplied at creation.

createdAtstring date-time
updatedAtstring date-time

Example response

{
  "id": "perm-123-456-789",
  "resource": "user",
  "action": "read",
  "description": "Allows reading user profiles",
  "createdAt": "2022-03-10T12:15:50-04:00",
  "updatedAt": "2022-03-10T12:15:50-04:00"
}