Snapshots
Snapshots allow you to create a read-only archive of files at a specific point in time. You can define a snapshot, add files to it, and then finalize it. Once finalized, the snapshot’s contents are immutable.
Each snapshot may have an expiration date. When the expiration date is reached, the snapshot is automatically deleted from the Files.com platform.
List Snapshots
SDK Method
\Files\Model\Snapshot::list;
Return Object
Snapshot[]
Authorization Requirement
Available to all authenticated keys or sessions.
Additional Arguments
Show Snapshot
SDK Method
\Files\Model\Snapshot::find;
Return Object
Snapshot
Authorization Requirement
Available to all authenticated keys or sessions.
Method Arguments
| Argument | Description |
|---|---|
| id int64 Required | Snapshot ID. |
Create Snapshot
SDK Method
\Files\Model\Snapshot::create;
Return Object
Snapshot
Authorization Requirement
Available to all authenticated keys or sessions.
Method Arguments
| Argument | Default | Description |
|---|---|---|
| expires_at string | When the snapshot expires. | |
| name string | A name for the snapshot. | |
| paths array(string) | An array of paths to add to the snapshot. | |
| workspace_id int64 | 0 | Workspace ID. 0 means the default workspace. |
Finalize Snapshot
SDK Method
$snapshot->finalize;
Return Object
No return value.
Authorization Requirement
Available to all authenticated keys or sessions.
Update Snapshot
SDK Method
$snapshot->update;
Return Object
Snapshot
Authorization Requirement
Available to all authenticated keys or sessions.
Method Arguments
| Argument | Description |
|---|---|
| expires_at string | When the snapshot expires. |
| name string | A name for the snapshot. |
| paths array(string) | An array of paths to add to the snapshot. |
Delete Snapshot
SDK Method
$snapshot->delete;
Return Object
No return value.
Authorization Requirement
Available to all authenticated keys or sessions.
The Snapshot Object
Some of the methods above return a Snapshot object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| id int64 | The snapshot's unique ID. |
| expires_at date-time | When the snapshot expires. |
| finalized_at date-time | When the snapshot was finalized. |
| name string | A name for the snapshot. |
| user_id int64 | The user that created this snapshot, if applicable. |
| bundle_id int64 | The bundle using this snapshot, if applicable. |
| workspace_id int64 | Workspace ID. 0 means the default workspace. |