List deleted rows scheduled for purging
const url = 'https://example.com/v1/retention/scheduled?domain=org&pastGraceOnly=false&limit=25';const options = {method: 'GET', 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 GET \ --url 'https://example.com/v1/retention/scheduled?domain=org&pastGraceOnly=false&limit=25' \ --header 'Authorization: Bearer <token>'Tombstoned rows in every domain a retention policy covers, with when each is purged (purgeAt) and the policy that decides it. domainsMissingAdapter names the covered domains this deployment can’t purge; unpolicedDomains the ones no policy covers, whose tombstones are kept; conflicts the domains two policies cover (stored before one policy per domain was enforced). limit caps the rows per domain; hasMore says some domain has more than it returned, and nextCursor (when the runtime can continue) is the cursor for the next page. Requires admin on the tenant.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The kind of record a retention policy covers. * covers every domain without a policy of its own, except memory and conversation: they hold people’s words, so only a policy naming them purges them.
Only this domain. Absent: every domain.
true: only rows past their grace, the ones a sweep would purge now.
1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
Responses
Section titled “Responses”Scheduled rows.
object
object
The kind of record a retention policy covers. * covers every domain without a policy of its own, except memory and conversation: they hold people’s words, so only a policy naming them purges them.
The tombstoned row’s id in its domain.
unregisteredAt plus the policy’s grace: when a sweep purges the row.
Whether a sweep would purge the row now.
The retention policy that applies.
The policy’s grace, in seconds (-1: a hold, never purged).
Some domain has more scheduled rows than this page returned (limit is per domain). Always sent from 0.1.4; a runtime before it sends none.
The cursor for the next page. Absent when hasMore: false, or when the runtime cannot continue a page.
Domains a retention policy covers that this deployment can’t purge (no adapter is wired).
Domains no retention policy covers: their tombstones are kept.
Domains more than one retention policy covers. Absent or empty: none.
object
The kind of record a retention policy covers. * covers every domain without a policy of its own, except memory and conversation: they hold people’s words, so only a policy naming them purges them.
Every policy id that covers the domain, sorted.
The one that applies: the policy whose latest version is highest, and on equal versions the lower policy id. Unregister the others.
Example
{ "data": [ { "domain": "org" } ], "domainsMissingAdapter": [ "org" ], "unpolicedDomains": [ "org" ], "conflicts": [ { "domain": "org" } ]}Unknown domain.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Not a tenant admin.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}