Context
The OpenAPI spec defines two delete endpoints for QURL lifecycle:
DELETE /v1/qurls/:id — revokes a resource and ALL its access tokens. Exposed as QURLClient.delete() / AsyncQURLClient.delete(). Only accepts r_ (resource) IDs; require_resource_id_prefix enforces this client-side.
DELETE /v1/resources/:id/qurls/:qurl_id — revokes a single access token under a resource. Not yet exposed by the SDK.
Why this matters
The require_resource_id_prefix helper in src/layerv_qurl/_utils.py currently emits this error when a user passes a q_ (QURL display) ID to delete():
delete: only resource IDs (r_ prefix) are accepted — got an ID starting with 'q_'.
To revoke a single access token, use the token-scoped revoke endpoint
(not yet available in this SDK version).
That "(not yet available in this SDK version)" wording will go stale the moment we expose this endpoint. A TODO comment was added to require_resource_id_prefix in PR #8 (commit a34696c) flagging this, but an actual tracking issue is more durable.
The same gap exists in:
Scope
Related
Context
The OpenAPI spec defines two delete endpoints for QURL lifecycle:
DELETE /v1/qurls/:id— revokes a resource and ALL its access tokens. Exposed asQURLClient.delete()/AsyncQURLClient.delete(). Only acceptsr_(resource) IDs;require_resource_id_prefixenforces this client-side.DELETE /v1/resources/:id/qurls/:qurl_id— revokes a single access token under a resource. Not yet exposed by the SDK.Why this matters
The
require_resource_id_prefixhelper insrc/layerv_qurl/_utils.pycurrently emits this error when a user passes aq_(QURL display) ID todelete():That "(not yet available in this SDK version)" wording will go stale the moment we expose this endpoint. A TODO comment was added to
require_resource_id_prefixin PR #8 (commit a34696c) flagging this, but an actual tracking issue is more durable.The same gap exists in:
layervai/qurl-typescript—delete()uses identical wording (intentional cross-SDK parity).layervai/qurl-mcp— whatever the MCP tool surface exposes.Scope
revoke_token(resource_id: str, qurl_id: str)(or similar) toQURLClientandAsyncQURLClient.r_forresource_id,q_orat_forqurl_id)._request/_raw_requestwith appropriate retry policy (DELETE is idempotent; use the read retry set).require_resource_id_prefixerror message to point at the new SDK method instead of "not yet available in this SDK version."require_resource_id_prefix.qurl-typescriptandqurl-mcp.Related
require_resource_id_prefixTODO: https://github.com/layervai/qurl-python/blob/feat/align-api-v2/src/layerv_qurl/_utils.pyqurl/api/openapi.yaml—/v1/resources/{id}/qurls/{qurl_id}DELETE operation