Revoke a system key
const url = 'https://example.com/v1/system/keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revoke';const options = {method: 'POST', 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 POST \ --url https://example.com/v1/system/keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revoke \ --header 'Authorization: Bearer <token>'Revokes one of the operator’s system keys (kgi_sy_…) and every key minted from it, however deep (alsoRevoked): they stop working on the next request. Revoking a revoked key keeps the first time. Only the full system capability (kindgi:system: the deployment’s own token, or a full system key) revokes them; on a runtime serving one tenant, the deployment’s own token alone.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Revoked, with every key minted from it.
The revoked system key, and the keys revoked with it because they were minted from it.
object
Example
{ "scopes": [ "system:tenants" ]}keyId is not a system key id (a UUID).
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" }}A tenant’s key or session (system-principal-required), or a scoped system key (system-scope-missing; on a runtime serving one tenant, system-key-scope-not-served for one holding anything but system:license).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}No system key with that id (system-key-not-found).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Idempotency-Key was reused with a different body, or resource-state 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”Server error (unmapped domain code or framework crash).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The operator’s access record can’t be written, so nothing was done (access-record-unavailable), or the Idempotency-Key store couldn’t be read before the request ran (idempotency-store-unavailable, with Retry-After). Or the authorization store couldn’t be reached (authz-backend-unavailable, with Retry-After), or the database was too busy for the authorization check (database-busy, with Retry-After), so the request wasn’t run.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”See also
GET /v1/system/keys: List system keysPOST /v1/system/keys: Mint a system key- Deploy on Google Cloud Run
- Serve many tenants
- Error code
access-record-unavailable - Error code
authz-backend-unavailable - Error code
database-busy - Error code
idempotency-key-in-flight - Error code
idempotency-store-unavailable - Error code
system-key-not-found - Error code
system-key-scope-not-served - Error code
system-principal-required - Error code
system-scope-missing - Every error code