Device Snapshots

📘

This page is a work in progress

This group of REST API allows performing operations on the configuration snapshots stored on a remote device. Snapshots include all of the networking and application configuration settings stored in a single XML file. The following operations can be performed through REST API calls on the configuration snapshots:

  • query the list of snapshots from the remote device;
  • select a previous configuration snapshot to apply (rollback).

For more informations about Snapshots, please read Gateway Management - Configuration Snapshots

Get all Snapshots

The following API allows one to retrieve the list of all the snapshots available on a given device:

GET /{scopeId}/devices/{deviceId}/snapshots

The required path parameters to be used with this call are:

  • {scopeId} is the scopeId of the tenant (account) to which the desired device belongs and can be retrieved from the response of the authentication call; the "_" character can be used for indicating the scopeId of the user currently authenticated with the token;
  • {deviceId} is the id of the desired device.

It is also possible to add the optional timeout query parameter, an integer value which represents the timeout for the request in milliseconds.

Response

The response of this call will contain the list of snapshots available on the given device. As an example:

{
  "type": "deviceSnapshots",
  "snapshotId": [
    {
      "id": "0",
      "timestamp": 0
    },
    {
      "id": "1568300687500",
      "timestamp": 1568300687500
    }
  ]
}

Rollback to Snapshot

The following API allows one to rollback the remote device to a stored configuration snapshot:

POST /{scopeId}/devices/{deviceId}/snapshots/{snapshotId}/_rollback

The required path parameters to be used with this call are:

  • {scopeId} is the scopeId of the tenant (account) to which the desired device belongs and can be retrieved from the response of the authentication call; the "_" character can be used for indicating the scopeId of the user currently authenticated with the token;
  • {deviceId} is the id of the desired device;
  • {snapshotId} is the id of the snapshot to rollback to.

It is also possible to add the optional timeout query parameter, an integer value which represents the timeout for the request in milliseconds.

Response

The response of this call will consist in an HTTP 200 status code in case the snapshot has successfully been applied.