Cluster jobs endpoint overview
Contributors
Suggest changes
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
This may take a few minutes. Thanks for your patience.
Your file is ready
Overview
You can use this API to view and manipulate jobs. Jobs provide information about asynchronous operations. Some long-running jobs are paused or cancelled by calling a PATCH request. Individual operations indicate if they support PATCH requests on the job. After a job transitions to a terminal state, it is deleted after a default time of 300 seconds. Attempts to call a GET or PATCH request on the job returns a 404 error code After the job has been deleted.
Example
The following examples show how to retrieve and update a job state:
Retrieving job information
# The API: /api/cluster/jobs/{uuid} # The call: curl -X GET "https://<mgmt-ip>/api/cluster/jobs/b5145e1d-b53b-11e8-8252-005056bbd8f5" -H "accept: application/json" # The response: { "uuid": "b5145e1d-b53b-11e8-8252-005056bbd8f5", "code": 0, "description": "Cluster Backup Job", "state": "running", "message": "creating_node_backups", "_links": { "self": { "href": "/api/cluster/jobs/b5145e1d-b53b-11e8-8252-005056bbd8f5" } } }
Updating a job that supports the new state
# The API: /api/cluster/jobs/{uuid} # The call: curl -X PATCH "https://<mgmt-ip>/api/cluster/jobs/b5145e1d-b53b-11e8-8252-005056bbd8f5?action=cancel" -H "accept: application/json"