Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.

ResourceURIDescriptionGETPOSTPUTDELETE
Snapshot/request/snapshotSnapshot Request Management resource. (tick)   
Snapshot id/request/snapshot/<rquest_id>Specific Snapshot Request management resource(tick) (tick) 

On this page:

OPTIONS HTTP method

Remember, you can get allowed methods, description, parameters, etc. by making a OPTIONS HTTP request to /v2/request/snapshot.

http OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot"
curl -X OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot"

List

To list a summary of your snapshot requests, do a GET request to /request resource as follows:

http -a $TK GET https://vss-api.eis.utoronto.ca/v2/request/snapshot
curl -a $TK -X GET https://vss-api.eis.utoronto.ca/v2/request/snapshot
Response Body
{
    "data": [
        "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot/16",
        "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot/4",
        "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot/3",
        "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot/17"
    ],
    "meta": {
        "_link": {
            "self": "https://vss-api.eis.utoronto.ca/v2/request/snapshot"
        },
        "count": 4,
        "pages": {
            "first_url": "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot?per_page=10&page=1",
            "last_url": "https://vss-api.eis.utoronto.ca:8001/v2/request/snapshot?per_page=10&page=1",
            "next_url": null,
            "page": 1,
            "pages": 1,
            "per_page": 10,
            "prev_url": null,
            "total": 4
        },
        "time": "0.04322s",
        "user": "jm"
    }
}

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 -a $TK PUT https://vss-api.eis.utoronto.ca/v2/request/snapshot/<req_id> attribute=duration value:=72
curl -H "Content-Type: application/json" -a $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
  • No labels