Introduction
The /v2/request/change resource provides the list of submitted change requests. With this resource you can get further detail about all or any specific change request.
Remember, a change request is created for every PUT request to a given Virtual Machine sub-resource.
Resource | URI | Description | GET | POST | PUT | DELETE |
---|---|---|---|---|---|---|
Change Request | /request/change | Change Request Management resource. | ||||
Change Request | /request/change/<rquest_id> | Specific Change Request management resource |
Panel | ||||
---|---|---|---|---|
On this page:
|
Note | |||||
---|---|---|---|---|---|
| |||||
Remember, you can get allowed methods, description, parameters, etc. by making a OPTIONS HTTP request to /v2/request/change.
|
List
To list a summary of your change requests, do a GET request to /request resource as follows:
Code Block |
---|
http -a $TK GET https://vss-api.eis.utoronto.ca/v2/request/change "Authorization: Bearer $TK" |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "data": [ "https://vss-api.eis.utoronto.ca/v2/request/change/17", "https://vss-api.eis.utoronto.ca/v2/request/change/22", "https://vss-api.eis.utoronto.ca/v2/request/change/20", "https://vss-api.eis.utoronto.ca/v2/request/change/21", "https://vss-api.eis.utoronto.ca/v2/request/change/23", "https://vss-api.eis.utoronto.ca/v2/request/change/221", "https://vss-api.eis.utoronto.ca/v2/request/change/222", "https://vss-api.eis.utoronto.ca/v2/request/change/31", "https://vss-api.eis.utoronto.ca/v2/request/change/32", "https://vss-api.eis.utoronto.ca/v2/request/change/33" ], "meta": { "_link": { "self": "https://vss-api.eis.utoronto.ca/v2/request/change" }, "count": 10, "pages": { "first_url": "https://vss-api.eis.utoronto.ca/v2/request/change?per_page=10&page=1", "last_url": "https://vss-api.eis.utoronto.ca/v2/request/change?per_page=10&page=11", "next_url": "https://vss-api.eis.utoronto.ca/v2/request/change?per_page=10&page=2", "page": 1, "pages": 11, "per_page": 10, "prev_url": null, "total": 109 }, "time": "0.02024s", "user": "josem" } } |
Update
Currently, only two attributes can be updated of a given change request: scheduled and scheduled_datetime. Both attributes allow you to schedule a change on a given date and time (How to schedule VM changes) and updating listed attributes allow you to either cancel or re-schedule a given change without deleting it or resubmitting your request.
To cancel an already scheduled change:
Code Block |
---|
http -a $TK PUT https://vss-api.eis.utoronto.ca/v2/request/change/<change_id> "Authorization: Bearer $TK" scheduled:=false curl -H "Content-Type: application/json" -aH "Authorization: Bearer $TK" -X PUT https://vss-api.eis.utoronto.ca/v2/request/change/<change_id> -d '{"scheduled": false}' |
To reschedule a scheduled change:
Code Block |
---|
http -a $TK PUT https://vss-api.eis.utoronto.ca/v2/request/change/<change_id> "Authorization: Bearer $TK" schaeduled_datetime="2016-10-20 21:50" scheduled:=true curl -H "Content-Type: application/json" -aH "Authorization: Bearer $TK" -X PUT https://vss-api.eis.utoronto.ca/v2/request/change/<change_id> -d '{"scheduled_datetime": "2016-10-20 21:50", "scheduled": true}' |
Both requests will result in an empty response body with a 204 status as follows:
Code Block |
---|
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 |