Revoke a dataset API key
DELETE
/datasets/{dataset_id}/api-keys/{key_id}
const url = 'https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'DELETE', 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 DELETE \ --url https://example.com/api/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/api-keys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Revoke a key bound to this dataset.
The key’s creator may revoke it while they can see the dataset, even after losing write access to it; anyone with write access may revoke any key bound to it, checked again under the dataset’s row lock. Answers 404 when no active key with this id is bound to the dataset.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” dataset_id
required
Dataset Id
string format: uuid
key_id
required
Key Id
string format: uuid
Responses
Section titled “ Responses ”Successful Response
Bad request — invalid payload
Media type application/problem+json
Unauthorized — missing or invalid credentials
Media type application/problem+json
Forbidden — caller lacks write access
Media type application/problem+json
Not found
Media type application/problem+json
Conflict — resource state prevents the operation
Media type application/problem+json
Validation error
Media type application/problem+json
Too many requests — retry after the advertised interval
Media type application/problem+json
Headers
Section titled “ Headers ” Retry-After
integer
Seconds until the request may be retried
Internal server error
Media type application/problem+json
Service unavailable — the database could not serve the request
Media type application/problem+json