Snapshots
Snapshots represent an entity at a given time in the past. A snapshot is automatically created each time an entry or a content type is published.
Snapshots are not available in the sandbox environments (not master environment). While this is true for sandbox environments, aliasing can effect how snapshots are created. For example, having a ‘master’ alias pointing to a sandbox environment will create snapshots for that environment which might conflict when entries with the same ID exist.
Each snapshot has two top level objects: sys and snapshot.
The sys object contains technical information about the snapshot and has the following nested properties:
The snapshot object contains the content of the entity at the moment the snapshot was taken (excluding the Entry.metadata field).
Note that snapshot object has two fields only, similar to the three-field structure of Entry:
snapshot.fields- holds the fields of the Entry at the time of the snapshotsnapshot.sys- holds the technical details of the Entry at the time of the snapshot
There is no snapshot.metadata field because when taking a snapshot of the Entry, the metadata field (usually containing user-defined tags) is not stored in the snapshot.
Collection filters
When querying large snapshots or large collections, the size in bytes of the resulting dataset may be quite large.
To avoid downloading large datasets with unnecessary data from the API, use the select operator.
With the select operator, you can instruct the API to only return specific fields from your dataset.
For example, to limit the returned dataset to fields representing snapshot id and snapshot creation time, use the select operator in the form of: select with the value of sys.id,sys.createdAt.
Note that using the select operator to query the Snapshots API is more flexible and permissive than the more restrictive behavior of querying the Content Delivery API with select. When using the select operator with the Snapshots API you can:
- request properties with depths larger than 2. For example,
selectwith valuesys.id,snapshot.fields.title,snapshot.fields.description. - request a field with given locale and specify it at the end of the property path. For example,
selectwith valuesys.id,snapshot.fields.description.es,snapshot.fields.description.en. - query snapshots of a specific Entry without having to specify the
content-typeargument.
Entry Snapshots collection
Entry Snapshot
Content Type Snapshots collection
Get all snapshots of a content type