Take back a person's capability
const url = 'https://example.com/v1/identity/users/example/capabilities/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/v1/identity/users/example/capabilities/example \ --header 'Authorization: Bearer <token>'A tenant admin whose own person holds the capability takes it back from someone. A person drops their own with a full API key or session: not a member one, nor one limited to a project. The last holder’s may go. One the person doesn’t hold is a no-op.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”The person’s grants, after, with the capabilities they hold.
What a person may do, as granted directly: tenant admin, a role on a project (its memberships), a role in a team, and the reviewer roster. What a team’s or an org’s grants imply is not expanded.
object
Example
{ "projects": [ { "role": "viewer" } ], "teams": [ { "role": "member" } ], "reviewer": { "role": "standard" }}The capability in the path is longer than 100 characters.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Neither a tenant admin nor the person with a full API key or session; asked by a service account or a system key (caller-not-a-person); or a capability the caller’s own person doesn’t hold now (capability-not-held).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No user with that id under this workspace (identity-user-not-found).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The person was removed from the workspace (identity-user-unregistered), or an idempotency conflict. Or idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”Server error (unmapped domain code or framework crash).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The runtime has no authorization store (person-grants-unsupported), or doesn’t take back capabilities (person-capabilities-unsupported).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The Idempotency-Key store (idempotency-store-unavailable) or the authorization store (authz-backend-unavailable) couldn’t be reached before the request ran, or the database was too busy for its authorization check (database-busy), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/identity/users: List users in the workspacePOST /v1/identity/users: Add a personGET /v1/identity/users/{userId}: Get a user by idGET /v1/identity/users/{userId}/sessions: List active sessions for a user- People, API keys and service accounts
- Error code
authz-backend-unavailable - Error code
caller-not-a-person - Error code
capability-not-held - Error code
database-busy - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
identity-user-not-found - Error code
identity-user-unregistered - Error code
person-capabilities-unsupported - Error code
person-grants-unsupported - Error code
rate-limit-exceeded - Every error code