resource-tokens

Revoke Resource Token

Revoke a resource token (soft delete).

Issue #242: Owner-only access. Sets is_active=False (preserves audit trail). Issue #276: Uses WorkspaceOwner dependency for DRY principle.

The token is the WORKSPACE's to revoke (#1863): any owner may revoke any token of the workspace, including one minted by a departed member or a connector. It is resolved like the list, the update route and the quota ceiling (#1919, auth.resource_tokens.workspace_tokens): by the resources row its resource_pk points at — so a token whose contexts were deleted, or whose shadow workspace_id was never backfilled, can still be revoked while it still authenticates ingest.

Args: token_id: Public id of the token to revoke (rtok_...) owner: Workspace owner (user_id, workspace_id) from dependency manager: ResourceTokenManager instance db: Database session

Raises: 403: Not workspace owner 404: Token not found (or not this workspace's — the same answer) 500: Failed to revoke token

delete/api/v1/resource-tokens/{token_id}

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/resource-tokens/{token_id}
  • Auth: none declared

Path parameters

token_idstring required

Public id of the resource token (rtok_ + 22 base62 characters).

Example:rtok_0000000000000000000000

Headers

authorizationstring nullable

Response

Successful Response

Changes

No recorded changes to this operation across all 2 revisions of this API.