In this page

What is a CQL field?

A CQL field is a named property of a content, such as its type, space, or content status, that you can reference in a CQL query to filter or sort by it.

The Better Content Archiving app introduces its own CQL fields, in addition to Confluence's built-in CQL fields and the CQL fields provided by other third-party apps. Note that the arch.* prefix is used to avoid conflict with other CQL fields, effectively creating a unique namespace for the Better Content Archiving app.

How to use CQL fields?

You'll normally use CQL fields inside CQL queries, not by inspecting their values on a single content. For troubleshooting, though, you can check the exact CQL field names and values available for a specific page or blog post in the CQL Fields tab of the Content Status Indicator.

Under the hood

There are three connected concepts here, each layered on top of the previous one:

  1. Content properties: the app primarily manages content properties, a built-in Confluence Cloud feature for attaching custom data to a page, blog post or other type of content. You can freely read the content properties through the standard Confluence REST API. Writing them yourself is possible too, but risky: some content properties are calculated from others or used internally for consistency tracking.
  2. CQL fields: Confluence indexes these automatically from content properties in the background. There's a small latency involved: after a content property changes, the corresponding CQL field usually reflects it only a few seconds later.
  3. CQL search: this is the concept you'll primarily work with. In your CQL queries, use the CQL fields, not the content properties directly.

CQL field reference

This section lists the CQL fields offered by the Better Content Archiving app, with their precise names and explanations.

Status

Also see the related query samples.

CQL field Description
arch.status The name of the content's status.
arch.status.id The ID of the content's status.
(Searching by ID is less readable than by name, but stable across renames. Find a status ID via the "arch.status.id" field in Status details → CQL fields tab.)
arch.previousStatus The name of the content's previous status.
(It is the status from which the content entered its current status.)
arch.previousStatus.id The ID of the content's previous status.
(Searching by ID is less readable than by name, but stable across renames. Find a status ID via the "arch.status.id" field in Status details → CQL fields tab.)
arch.status.changedOn The timestamp when the status was last changed.
(It is when the content entered its current status.)

Views (view analytics)

Also see the related query samples.

CQL field Description
arch.event.lastViewedBy The user ID who last viewed the content.
arch.event.lastViewedOn The timestamp when the content was last viewed.
(Page views are tracked from the time of app installation. That's why it is particularly dangerous to archive or delete contents that were last viewed e.g. more than 100 days ago if the app was installed less than 100 days ago!)

Updates (update analytics)

Also see the related query samples.

CQL field Description
arch.event.lastUpdatedBy The user ID who last updated the content.
arch.event.lastUpdatedOn The timestamp when the content was last updated.

Owners

Also see the related query samples.

Public fields

These fields are meant for everyday, end-user searches.

CQL field Description
arch.anyOwner The list of the user IDs who own the content, either directly or through inheritance.
This CQL field consolidates both types of ownership into a single list.
(It can contain zero, one or multiple IDs.)
arch.anyOwner.count The number of the users who own the content, either directly or through inheritance.
arch.anyOwner.setOn The timestamp when the content owners were set, either directly or through inheritance.
arch.directOwner The list of the user IDs who own the content, directly.
It includes the owners and tree owners set on this content.
(It can contain zero, one or multiple IDs.)
arch.directOwner.count The number of the users who own the content, directly.
arch.directOwner.setOn The timestamp when the content owners were set, directly.
arch.inheritedOwner The list of the user IDs who own the content, through inheritance.
It includes the tree owners set on any ancestor of this content.
(It can contain zero, one or multiple IDs.)
arch.inheritedOwner.count The number of the users who own the content, through inheritance.
arch.inheritedOwner.setOn The timestamp when the content owners were set, through inheritance.
Internal fields

These fields are primarily used internally by the app and are less useful for end-user searches.

CQL field Description
arch.owner The list of the user IDs who own the content and are not inherited by descendants.
These effectively own only this content, not the entire content tree rooted at it.
(It can contain zero, one or multiple IDs.)
arch.owner.count The number of the users who own the content.
arch.owner.setBy The user ID who set the content owners.
arch.owner.setOn The timestamp when the content owners were set.
arch.treeOwner The list of the user IDs who own the content and are inherited by descendants.
These effectively own the entire content tree rooted at this content.
(It can contain zero, one or multiple IDs.)
arch.treeOwner.count The number of the users who own the content tree.
arch.treeOwner.setBy The user ID who set the content tree owners.
arch.treeOwner.setOn The timestamp when the content tree owners were set.

Expiration

Also see the related query samples.

CQL field Description
arch.expirationDate The timestamp when the content expires.
arch.expirationDate.inherited A flag that represents whether descendant pages inherit the expiration date.
arch.expirationDate.setBy The user ID who set the content expiration date.
arch.expirationDate.setOn The timestamp when the expiration date was set.

Archiving

Also see the related query samples.

CQL field Description
arch.archivingDate The timestamp when the content is going to be archived.
arch.archivingDate.inherited A flag that represents whether descendant pages inherit the archiving date.
arch.archivingDate.setBy The user ID who set the archiving date.
arch.archivingDate.setOn The timestamp when the archiving date was set.
arch.event.archivedOn The timestamp when the content was archived.

Excluded

Also see the related query samples.

CQL field Description
arch.exclusion A flag that represents whether the content is excluded from content lifecycle management.
arch.exclusion.inherited A flag that represents whether descendant pages are also excluded (i.e. "inherit the exclusion").
arch.exclusion.setBy The user ID who set the exclusion.
arch.exclusion.setOn The timestamp when the exclusion was set.
arch.inExcludedSpace A flag that represents whether the content is in a space that is excluded from content lifecycle management.

Questions?

Ask us any time.