Workspace/Role
Cette page n'est pas disponible en français. La version anglaise est affichée.
Create a custom workspace role
Creates a new RBAC role scoped to the given workspace. `displayName` is the human-readable label (case-insensitive unique per workspace, max 120 chars). `permissions` must be a subset of the catalog returned by `GET /api/v2/permissions/catalog`.
Authorization
BearerAuthObject AuthorizationBearer <token>
In: header
Path Parameters
id*string
Workspace UUID
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v2/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "wsr_67890abc", "name": "QA Lead", "isSystem": false, "priority": 250, "permissions": [ "SourceIndex" ], "usersCount": 0}Empty
{ "message": { "error": "Your request was made with invalid credentials." }}{ "message": { "error": "You are not allowed to perform this action." }}{ "message": { "error": "Page not found" }}{ "errors": { "langBcp": "Language already exists" }}