Endpoint
/v1/snapshots/
GET
Returns information about all snapshots.
Parameters
This resource has no parameters.
Response
Codes
Code
Description
200
Return value on success
Schema
{
"description" : "api_snapshots_v1" ,
"type" : "object" ,
"properties" : {
"entries" : {
"type" : "array" ,
"items" : {
"description" : "List of snapshot information" ,
"type" : "object" ,
"properties" : {
"id" : {
"description" : "Unique identifier of the snapshot" ,
"type" : "number"
},
"name" : {
"description" : "Name of the snapshot" ,
"type" : "string"
},
"timestamp" : {
"description" : "Creation timestamp of the snapshot, encoded as RFC 3339, which is a normalized subset of ISO 8601. See http://tools.ietf.org/rfc/rfc3339.txt, section 5.6 for ABNF." ,
"type" : "string"
},
"directory_name" : {
"description" : "Snapshot directory name, as would be seen in the .snapshot directory over SMB or NFS." ,
"type" : "string"
},
"source_path" : {
"description" : "Source directory of the snapshot" ,
"type" : "string"
},
"created_by_policy" : {
"description" : "This snapshot was created by a policy. The name of that policy will be stored in the name field in place of a user-defined name." ,
"type" : "boolean"
},
"expiration" : {
"description" : "Time at which snapshot will be expired. Empty string if no expiration time set. Encoded as RFC 3339, which is a normalized subset of ISO 8601. See http://tools.ietf.org/rfc/rfc3339.txt, section 5.6 for ABNF." ,
"type" : "string"
}
}
}
}
}
}
POST
Creates a new snapshot and returns its details.
Parameters
Name
Description
Required
expiration-time-to-live
Duration after which to expire the snapshot, in format , where is a positive integer less than 1000 and is one of [months, weeks, days, hours, minutes], e.g. 5days or 1hours. Empty string or never indicates the snapshot should never expire. Defaults to never if not specified.
No
Request
Schema
{
"description" : "api_snapshot_create_v1" ,
"type" : "object" ,
"properties" : {
"name" : {
"description" : "Name of the snapshot" ,
"type" : "string"
},
"expiration" : {
"description" : "Time at which snapshot will be expired. Empty string if no expiration time set. Encoded as RFC 3339, which is a normalized subset of ISO 8601. See http://tools.ietf.org/rfc/rfc3339.txt, section 5.6 for ABNF." ,
"type" : "string"
}
}
}
Response
Codes
Code
Description
200
Return value on success
Schema
{
"description" : "api_snapshot_info_v1" ,
"type" : "object" ,
"properties" : {
"id" : {
"description" : "Unique identifier of the snapshot" ,
"type" : "number"
},
"name" : {
"description" : "Name of the snapshot" ,
"type" : "string"
},
"timestamp" : {
"description" : "Creation timestamp of the snapshot, encoded as RFC 3339, which is a normalized subset of ISO 8601. See http://tools.ietf.org/rfc/rfc3339.txt, section 5.6 for ABNF." ,
"type" : "string"
},
"directory_name" : {
"description" : "Snapshot directory name, as would be seen in the .snapshot directory over SMB or NFS." ,
"type" : "string"
},
"source_path" : {
"description" : "Source directory of the snapshot" ,
"type" : "string"
},
"created_by_policy" : {
"description" : "This snapshot was created by a policy. The name of that policy will be stored in the name field in place of a user-defined name." ,
"type" : "boolean"
},
"expiration" : {
"description" : "Time at which snapshot will be expired. Empty string if no expiration time set. Encoded as RFC 3339, which is a normalized subset of ISO 8601. See http://tools.ietf.org/rfc/rfc3339.txt, section 5.6 for ABNF." ,
"type" : "string"
}
}
}