563848e0ecc0
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.
Path parameters
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 identifier that scopes the operation to a specific tenant's permission catalog.
Request body
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.
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"
}