Introduction
The /v2/request/snapshot resource provides the list of submitted snapshot requests. With this resource you can get further detail about all or any specific snapshot requested.
Resource | URI | Description | GET | POST | PUT | DELETE |
---|---|---|---|---|---|---|
Snapshot | /request/snapshot | Snapshot Request Management resource. | ||||
Snapshot id | /request/snapshot/<rquest_id> | Specific Snapshot Request management resource |
On this page:
TK stores the Cloud API Token generated as a result of the following POST request to the /auth/request-token resource:
curl -X POST https://vss-api.eis.utoronto.ca/auth/request-token -u <username>
For example, extracting the token with the jq command:
TK=$(curl -X POST https://vss-api.eis.utoronto.ca/auth/request-token -u <username> | jq '.token')
List
To list a summary of your snapshot requests, do a GET request to /request resource as follows:
http GET https://vss-api.eis.utoronto.ca/v2/request/snapshot "Authorization: Bearer $TK" curl -X GET https://vss-api.eis.utoronto.ca/v2/request/snapshot "Authorization: Bearer $TK"
Update
Currently, only one attribute can be updated of a given snapshot request: duration. The duration attribute allows you to extend the snapshot lifetime for a maximum of 72 hours for only 3 occasions.
To extend an already scheduled snapshot:
http PUT https://vss-api.eis.utoronto.ca/v2/request/snapshot/<req_id> "Authorization: Bearer $TK" attribute=duration value:=72 curl -H "Content-Type: application/json" -H "Authorization: Bearer $TK" -X PUT https://vss-api.eis.utoronto.ca/v2/request/snapshot/<req_id> -d '{"attribute": "duration", "value": 72}'
Request will result in an empty response body with a 204 status as follows:
HTTP/1.0 204 NO CONTENT Allow: PUT, HEAD, OPTIONS, GET Connection: keep-alive Content-Length: 1097 Content-Type: application/json Date: Thu, 20 Oct 2016 16:00:44 GMT Server: nginx Strict-Transport-Security: max-age=63072000 X-Content-Type-Options: nosniff X-Frame-Options: DENY X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4998 X-RateLimit-Reset: 1476982800
After successfully updating the request, you'll get something like:
Attribute extensions has increased and to_date is now extended to original + 6 days.