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 |
On this page:
OPTIONS HTTP method
Remember, you can get allowed methods, description, parameters, etc. by making a OPTIONS HTTP request to /v2/request/change.
http OPTIONS "https://vss-api.eis.utoronto.ca/v2/request/change" curl -X OPTIONS "https://vss-api.eis.utoronto.ca/v2/request/change"
List
To list a summary of your change requests, do a GET request to /request resource as follows:
http GET https://vss-api.eis.utoronto.ca/v2/request/change "Authorization: Bearer $TK"
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:
http PUT https://vss-api.eis.utoronto.ca/v2/request/change/<change_id> "Authorization: Bearer $TK" scheduled:=false curl -H "Content-Type: application/json" -H "Authorization: Bearer $TK" -X PUT https://vss-api.eis.utoronto.ca/v2/request/change/<change_id> -d '{"scheduled": false}'
To reschedule a scheduled change:
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" -H "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:
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