roles
Manage end-user roles — named, reusable sets of MCP-server grants, assigned to groups (via _roleIds) or directly to end users. A grant names one MCP server, or omits _resourceId for a wildcard across all, plus a capability list. Standard CRUD only; the API defines no other operations.
REST API: Roles
celigo roles <subcommand> [args] [flags]Supports all global flags.
Subcommands
list
List all roles.
get <id>
Fetch one role by ID.
create
Create a role from a JSON body (--file <path> or stdin).
update <id>
Full replace from a JSON body (--file <path> or stdin); destructive PUT.
set <id> key=value …
Safe field edit (GET → modify → PUT). Supports key=file://<path>.
delete <id>
Delete a role.
celigo roles list
List all roles. Rows are trimmed to _id, name, and the table columns client-side (the endpoint rejects server-side field projection); use --fields all for complete documents.
Signature
celigo roles listArguments
None.
Flags
--fields <spec>
string
default
Fields to return per row. default returns _id, name, and the table columns; all returns complete documents; a comma-separated list requests specific fields. Applied client-side — see field projection.
Default table columns: _id, name, description, lastModified.
Example
Corresponds to: GET /v1/roles
celigo roles get <id>
Fetch one role by ID, including its resourceGrants.
Signature
Arguments
<id>
string
Yes
Role ID (the _id from roles list).
Example
Corresponds to: GET /v1/roles/{_id}
celigo roles create
Create a role from a JSON body. Read the body from a file with -f, --file (recommended), or pipe it on stdin. Role names are unique per account, case-insensitively — a duplicate is rejected with 409 Conflict.
Signature
Flags
-f, --file <path>
string
—
Read the JSON body from a file instead of stdin (--file - also means stdin).
Request body
A JSON object matching the POST /v1/roles request schema: name (required, unique per account), optional description, and resourceGrants[]. Each grant is {"resourceType": "mcpServer", "_resourceId": "<mcpServerId>", "capabilities": [...]} — omit _resourceId for a wildcard across every MCP server. Capabilities: tool:all, tool:<id>, api:all, api:<id>, or pset:<permissionSetId>.
Example
Corresponds to: POST /v1/roles
celigo roles update <id>
Full replace of a role from a JSON body (--file <path> or stdin).
⚠️
updatereplaces the entire role.PUTerases any field you omit —description,resourceGrants.GETthe role first, edit it, then send the complete object back, or usesetfor targeted edits. A rename that collides with another role's name is rejected with409 Conflict, case-insensitively.
Signature
Arguments
<id>
string
Yes
Role ID.
Flags
-f, --file <path>
string
—
Read the JSON body from a file instead of stdin (--file - also means stdin).
--force
boolean
false
Submit even if the body contains masked credential values (***) copied from a GET.
Example
Corresponds to: PUT /v1/roles/{_id}
celigo roles set <id> [assignments...]
Edit one or more fields on a role without rewriting the whole document. Performs GET → apply assignments → PUT, so omitted fields survive. Dot and array-index notation are supported; key=null removes a field; key=file://<path> loads a value from a file.
Signature
Arguments
<id>
string
Yes
Role ID.
[assignments...]
key=value pairs
Yes (≥1)
Field assignments, e.g. description="Order tools" or resourceGrants[0].capabilities[1]=null. Values are JSON-parsed.
Example
Corresponds to: GET /v1/roles/{_id} then PUT /v1/roles/{_id}
celigo roles delete <id>
Delete a role by ID. Prompts for confirmation unless -y is passed. Groups and end users that held the role lose the grants it carried; their other roles and direct grants are untouched.
Signature
Arguments
<id>
string
Yes
Role ID.
Flags
-y, --yes
boolean
false
Skip the confirmation prompt.
Example
Corresponds to: DELETE /v1/roles/{_id}
Gotchas
Role names are unique per account, case-insensitively.
createand a rename viaupdate/setare both rejected with409 Conflicton a duplicate —Order Toolsandorder toolscollide.updateis a full PUT. A body that omitsdescriptionorresourceGrantserases them. Prefersetfor single-field changes.A wildcard grant omits
_resourceId. AresourceGrants[]entry without_resourceIdapplies its capabilities across every MCP server on the account.pset:capabilities reference a capability set's_id. Capability sets live embedded on the MCP server document aspermissionSets[]— read the_idfrommcp-servers get. A PUT to the server that drops itspermissionSetsorphans everypset:grant pointing at one.Structural changes require
fullmode.create,update,set, anddeletechange what access the role conveys.listandgetwork inreadmode. See Profiles & regions.
Related
groups — bundle roles for members via
_roleIds.end-users — the people roles are ultimately granted to;
effective-accessshows each grant's source.mcp-servers — the granted resources, and home of the
permissionSets[]thatpset:capabilities reference.
Last updated
Was this helpful?