All data stored in XRay have a time to live (TTL) associated with it. Data is automatically removed once it has reached its time to live. Every organization has an effective license, which is derived from:
- the license that's defined for the organization
- the default license
- the master license
The effective license for an organization defines the default quotas for all repositories in the organization. However, each repository can have its own quotas to further restrict the quotas for it (repository quotas cannot exceed those defined in effective license for organization).
To see the the time to live for your repositories, run the following query:
GET repo fields repoid,EffectiveQuota
The TTL is controlled by the quota "Retention," which is defined in seconds (<0 implies no expiration). Ignore any sample repositories which are returned. In addition to the TTL, other limits for that repository are also shown.
The time to live can be set when the data is streamed into XRay or default to the value used for the repository.
To view the actual expire time for a data element, you can request the ExpireTime value:
get events fields StartTime, UpdateTime, ExpireTime
This displays 3 columns, the start time for the event, the time the data was updated in XRay and the time the data will expire.