Skip to main content

Query Retention Schedules

Retention rules are a legal requirement for companies handling customer data. Legalesign lets you set these rules per Group and per asset type, and the system handles disposal automatically. But it's a good idea to keep an eye on what's expiring — that way you can extend retention on anything you need to keep.

Query Expiring Items

Use retentionConnection on your organisation to find items expiring within a date range:

query ExpiringItems {
organisation(id: "b3JnYourOrgId") {
id
name
retentionConnection(
first: 500
start: "2025-01-01T00:00:00Z"
end: "2025-12-31T23:59:59Z"
) {
totalCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
organisation
group
location
ttl
completed
}
cursor
}
}
}
}

This returns the first 500 items expiring in 2025. If hasNextPage is true, use endCursor as the after argument to fetch the next page. See How Pagination Works for details.

What to Do with the Results

Review the expiring items and extend retention in Console for anything you need to keep longer. You can also configure retention rules per group in Console to adjust the defaults.

Export This Article

Save a copy of this page as PDF or plain text.