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