Skip to main content

REST endpoints: Snapshots

These endpoints mirror the CLI commands described in Snapshots, File recovery. Each endpoint runs the CLI command named under its heading, so the behavior, defaults, and restrictions are the same; this page lists how to call it over REST.

Conventions that apply to every endpoint (request format, the async and outputType parameters, and the response envelope) are in Requests and responses. In the tables below, Required is Yes when the parameter must always be supplied, No when it is optional, and Depends when it is required only in some combinations (for example, either an application and volume, or a consistency group ID); the CLI chapter for the same command explains the combinations.

DELETE /applications/snapshots/delete

Delete a snapshot.

CLI command: applications snapshots delete

Query parameters

Name Type Required Description
application string Depends The name of the application.
volume string Depends The name of the volume that contains the snapshot to delete.
cgid integer Depends The ID of the consistency group that contains the snapshot to delete.
snapshots array of integer Yes The IDs of the snapshots to delete.
force boolean No Skip the confirmation prompt.

GET /applications/snapshots/events/get

Get SnapONE file events.

CLI command: applications snapshots events get

Query parameters

Name Type Required Description
application string Yes Application name.
volume string Yes Volume name.
startDate date-time No Start date for the time period to search for events in.
endDate date-time No End date for the time period to search for events in.
fileSearch string No Only show events for files containing this text anywhere in the volume.
top integer No Maximum number of results to return.
force boolean No Skip the confirmation prompt.
descendingOrder boolean No Sort the results in descending order.

Response: a list of SnapshotEventElement objects in Result.Events, each with: Time (date-time), Type (string: Created / Deleted / Changed / Renamed), NamesAndEvents (array of NameAndEvent), CreatedFilesCount (integer), DeletedFilesCount (integer), ChangedFilesCount (integer), RenamedFilesCount (integer), FileName (string), EventTime (date-time), SnapId (integer).

GET /applications/snapshots/files/get

Get SnapONE files.

CLI command: applications snapshots files get

Query parameters

Name Type Required Description
application string Yes Application name.
volume string Yes Volume name.
startSnapId integer No Start snapshot ID for the time period to search for files in.
endSnapId integer No End snapshot ID for the time period to search for files in.
startSnapDate date-time No Start date for the time period to search for files in.
endSnapDate date-time No End date for the time period to search for files in.
path string No Only show files under this path.
fileSearch string No Search for files containing this text anywhere in the volume.
top integer No Maximum number of results to return.
force boolean No Skip the confirmation prompt.
descendingOrder boolean No Sort the results in descending order.

Response: a list of SnaponeFileElement objects in Result.Files, each with: Name (string), Type (string), CreateSnap (integer), DeleteSnap (integer), Path (string), Events (array of SnaponeEvent), EventType (string), OldName (string), Date (date-time), SnapId (integer).

GET /applications/snapshots/list

List snapshots.

CLI command: applications snapshots list

Query parameters

Name Type Required Description
application string No Filter by application name.
volume string No Filter by volume name.
cgid array of integer No Filter by consistency group IDs.
show_volumes boolean No Show volumes within the application instances.

Response: a list of DetailedSnapshotElement objects in Result.Snapshots, each with: ConsistencyGroupId (integer), Volumes (array of BasicVolumeElement).

POST /applications/snapshots/restore

Create a new volume from a snapshot.

CLI command: applications snapshots restore

Body fields (JSON)

Name Type Required Description
Application string Depends The name of the application.
Volume string Depends The name of the volume.
Cgid integer Depends The id of the consistency group to restore.
Snapshot integer Yes The snapshot id.
Suffix string Yes A suffix for the newly created volume/s.
ObjectPort integer Yes Relevant only for object stores. Specify the new object store TCP port for the restore.

GET /applications/snapshots/schedulers/list

List snapshot schedulers.

CLI command: applications snapshots schedulers list

Query parameters

Name Type Required Description
application string No Filter by application name.
volume string No Filter by volume name.
cgid array of integer No Filter by consistency group IDs.
show_volumes boolean No Show volumes.

Response: a list of ApplicationElement objects in Result.Applications, each with: Application (string), Template (string), Description (string), Volumes (array of VolumeElement), ConsistencyGroups (array of ConsistencyGroupElement), Vms (array of VmElement), InitializeForTesting (boolean), Force (boolean).

PUT /applications/snapshots/schedulers/schedule

Schedule snapshots.

CLI command: applications snapshots schedulers schedule

Query parameters

Name Type Required Description
cgid integer Depends The id of the consistency group to edit.
application string Depends The name of the application that contains the consistency group.
volume string Depends The name of the volume inside the consistency group.

Body fields (JSON)

Name Type Required Description
Frequency array of string No Frequency of the snapshots (Recovery point objective). Configures how often snapshots are created. Format: <number><unit>[@<time>] or <number>w@<day>@<time>. Units: m=minutes, h=hours, d=days, w=weeks. Examples: 15m, 1h, 1d@09:00, 1w@mon@09:00.
Retention array of string No Retention period for each matching frequency. Format: <number><unit>. Units: h=hours, d=days, w=weeks. Examples: 24h, 7d, 12w.
Schedule_state array of string No Active or Disabled, for each matching frequency/retention pair.
Enable_vss boolean No Utilize VSS on this scheduler. In REST one field covers a pair of CLI flags: true applies --enable_vss, false applies --disable_vss, and omitting the field applies neither.
CopySnapshotSchedule boolean No Copy scheduler settings to the replicated pair.
Force boolean No Skip the confirmation prompt.

POST /applications/snapshots/take

Take a manual snapshot.

CLI command: applications snapshots take

Body fields (JSON)

Name Type Required Description
All boolean Depends Take a snapshot on all volumes within the system.
Application string Depends The name of the application.
Volume string Depends The volume to snapshot (the snapshot is taken for its entire consistency group).
Cgid integer Depends The ID of the consistency group to take a snapshot on.
Vss boolean No Take a VSS snapshot.
Count integer No Take multiple snapshots. For testing purposes only.

PUT /applications/snapshots/vss

Configure VSS settings for volumes.

CLI command: applications snapshots vss

Query parameters

Name Type Required Description
cgid integer Depends The id of the consistency group to edit.
application string Depends The name of the application that contains the consistency group.
volume string Depends The name of the volume inside the consistency group.

Body fields (JSON)

Name Type Required Description
VssInitiators array of string No VSS initiators to utilize when taking snapshots on this volume/consistency group.
DirectMapping boolean No Select this if the volumes are directly connected to the initiator. In REST one field covers a pair of CLI flags: true applies --directMapping, false applies --notDirectMapping, and omitting the field applies neither.
Force boolean No Skip the confirmation prompt.

See also: Requests and responses - Authentication - Examples