Skip to content
Console
Menu

Getting Started

Authentication

KV Store

Revoke a token exchange

Revokes an issued credential at the provider by its record.

Revokes an issued credential at the provider by its record. The Broker uses the credential it holds sealed, so the caller needs no token and no live delegation. Idempotent: a credential already revoked or expired answers the record. Erases the sealed credential once the provider confirms.

  • Path POST https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy/token_exchanges/token-exchange:revoke
  • Scope broker:read
  • Effect destructive — a successful call removes data; the CLI asks before it runs.
  • Collection token_exchanges

#Request

FieldTypeWhat it is
namestringThe record of the credential to revoke. Required.

#Response

FieldTypeWhat it is
namestringorgs/{org}/trust_policies/{trust_policy}/token_exchanges/{token_exchange}.
uidstringtkx_<cell><ulid>; also the {token_exchange} id. Output only.
metaResourceMetaResource metadata.
subjectstringThe accountable principal, orgs/{org}/principals/{id}. Output only.
actorstringThe Agent the subject's delegated grant acted for; empty when the subject exchanged for itself. Output only.
repositorystringThe one repository the credential covers, owner/name. Output only.
permissionsmap<string, string>The permissions the credential carries. Output only.
credential_kindCredentialKindWhat the credential is. Output only. One of access_token, runner_registration.
create_timetimestampWhen it was issued. Output only.
expire_timetimestampWhen the provider stops honoring it. Output only.
revoke_timetimestampWhen the provider confirmed it revoked; unset while live or when it simply expired. Output only.
token_sha256stringLowercase hex SHA-256 of the credential, to match a credential seen elsewhere to its record. Output only.
connectionstringThe Connection the credential was issued on. Output only.
issuerstringThe provider identity that signed it: for GitHub, github-apps/{app_id}. Output only.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#Errors

  • UNAUTHENTICATED — No valid key or token was presented.
  • PERMISSION_DENIED — The key lacks the method's permission.
  • RESOURCE_NOT_FOUND — The named Resource does not exist or is not visible.
  • UNAVAILABLE — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/trust_policies/trust-policy/token_exchanges/token-exchange:revoke" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'