Grants
A grant is a named list of abilities (resource path plus access type) that the owning organization can attach to groups. Every route acts on the caller's current organization (x-organization-id selects another one the caller belongs to). Reads need the grant:read token ability and at least the member role, writes need grant:write and at least the admin role.
📄️ List the organization's grants
Requires `grant:read` and at least the `org-member` role.
📄️ Create a grant
Creates a grant from a list of abilities, optionally attaching it to one existing group in the same transaction (`groupId`). Each ability path must follow the resource hierarchy (`400` `INVALID_GRANT_PATH` otherwise) and may only name clusters and workflows the organization owns, other than reading another organization's public cluster. The name is unique within the organization (`409` `GRANT_NAME_ALREADY_EXISTS`).
📄️ Get a grant
Requires `grant:read` and at least the `org-member` role.
📄️ Update a grant
Changing the abilities applies to every group the grant is attached to, at once. A grant attached to a sponsored group must keep every ability rooted on a cluster (`409` otherwise).
📄️ Delete a grant
Detaches it from every group and ends the access it gave.
📄️ List the groups a grant is attached to
Requires `grant:read` and at least the `org-member` role.
📄️ Attach a grant to groups
Attaches the grant to a batch of the organization's groups, skipping those already attached. A sponsored group only accepts cluster-data grants (`409`).
📄️ Detach a grant from a group
Requires `grant:write` and at least the `org-admin` role.