레퍼런스HTTP APIA P I keys

Revoke a key

DELETE
/v1/api-keys/{id}

Takes the right issuing that kind of key takes. Revoking a key already revoked changes nothing and answers a null receipt_id; otherwise writes a revoke_api_key receipt.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The API key's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Response Body

Success

application/json
  1. response
key*
receipt_id*|null
Example Request
curl -X DELETE 'https://example.com/v1/api-keys/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "key": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "personal",    "name": "string",    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",    "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",    "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",    "created_by_user": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "display_name": "string"    },    "scopes": [      "sessions:read"    ],    "created_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "revoked_at": "2019-08-24T14:15:22Z",    "last_used_at": "2019-08-24T14:15:22Z"  },  "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7"}