In this page
Overview
This page lists sample CQL queries for common use cases around page expiration. They're completely standard CQL queries, so you can use them as-is, adapt them to your own needs, or freely combine them with any other CQL field or function for more complex searches.
Query samples
Expiration date
Existence
Contents that have an expiration date set:
arch.expirationDate.setOn <= now()
(The actual date field cannot be tested for emptiness due to CQL limitations. This query tests the timestamp when the actual date was set instead.)
Contents that don't have an expiration date set:
type in (page,blogpost) and not arch.expirationDate.setOn <= now()
(The otherwise useless clause on the "type" field is needed only because a negative expression cannot be the first clause in CQL.)
Value
Contents with a passed expiration date:
arch.expirationDate < now()
Contents with an expiration date after a specific date:
arch.expirationDate > "2026-08-01"
Contents with an expiration date in a specific period:
arch.expirationDate > "2026-01-15" and arch.expirationDate < "2026-08-01"
Contents with an expiration date today:
arch.expirationDate >= startOfDay() and arch.expirationDate < startOfDay("+1d")
Contents with an expiration date inherited by their descendants:
arch.expirationDate.inherited = "true"
Contents expiring within a week that I own:
arch.expirationDate < now("+7d") and arch.anyOwner = currentUser()
Who
Contents with an expiration date set by a specific user:
arch.expirationDate.setBy = "123abcde95673300697be2ba"
(The alphanumeric string is the user's Atlassian account ID. How to figure out?)
Contents with an expiration date set by specific users:
arch.expirationDate.setBy in ("123abcde95673300697be2ba", "456fabcd1238456789abcdef")
(The alphanumeric string is the user's Atlassian account ID. How to figure out?)
Contents with an expiration date set by me:
arch.expirationDate.setBy = currentUser()
When
Contents with an expiration date set before a specific date:
arch.expirationDate.setOn < "2026-08-01"
Contents with an expiration date set in a specific period:
arch.expirationDate.setOn > "2026-01-15" and arch.expirationDate.setOn < "2026-08-01"
Contents with an expiration date set today:
arch.expirationDate.setOn >= startOfDay()
Questions?
Ask us any time.