latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

Permission

Fully replace a permission's fields

Performs a full replacement of the permission identified by {id}. Resource and action are required on every call, and description is fully replaced by the value supplied in the request body -- omitting description clears it. This is a full-replace operation, not a partial patch; use it only when you intend to set every field explicitly, since there is no separate partial-update endpoint for permissions.

Preconditions: the caller must be authenticated and hold the UPDATE_PERMISSION permission for the tenant, and the permission identified by {id} must already exist (create it first with POST /permissions).

On success, returns the updated permission; createdAt and updatedAt are always null in the current implementation. Returns 404 when {id} does not exist.

put/permissions/{id}

Path parameters

idstring required

Server-assigned identifier of the permission to replace. Treat as an opaque string; pass back exactly the id value returned by GET /permissions or POST /permissions.

Headers

tenant-idstring required

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

Request body

resourcestring required

Name of the resource this permission will govern (e.g., 'user', 'roster'). At most 100 characters. Required on every call: PUT /permissions/{id} is a full replace, so this value must always be supplied.

actionstring required

Name of the action this permission will grant on the resource (e.g., 'read', 'create'). At most 100 characters. Required on every call: PUT /permissions/{id} is a full replace, so this value must always be supplied.

descriptionstring

Human-readable explanation of what the permission allows. At most 500 characters. Optional: since PUT /permissions/{id} is a full replace, omitting this value clears any existing description.

Example request

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

Response

The permission after the full replacement, reflecting the resource, action, and description values supplied in the request body. 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"
}