Purge one domain's deleted rows past their grace
const url = 'https://example.com/v1/retention/sweep/org';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"maxPerDomain":1}'};
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/retention/sweep/org \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "maxPerDomain": 1 }'As POST /v1/retention/sweep, for one domain. Requires admin on the workspace.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Examplegenerated
{ "maxPerDomain": 1}Responses
Section titled “Responses”What was purged.
object
Example
{ "perDomain": [ { "domain": "org", "limitApplied": true, "missingAdapter": true } ], "conflicts": [ { "domain": "org" } ]}Unknown domain (or *), or maxPerDomain outside 1..10000.
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" }}Not a tenant admin. Without an authorization store, key-project-mismatch (details.keyProjectId): the API key or session is limited to a project, and this writes above it, to the workspace, an org or a team (with a store, that is permission-denied).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Idempotency-Key was reused with a different body, or resource-state conflict.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The request body is over the API’s limit (request-too-large; details.maxBytes says how much).
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
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 authorization store couldn’t be reached (authz-backend-unavailable), or the database was too busy for the authorization check (database-busy), so the request wasn’t run; Retry-After (whole seconds) says when to try again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}