Skip to main content
ONTAP Automation

Get job instance

Contributors dmp-netapp

You can retrieve the instance of a specific ONTAP job. You would typically do this to determine if the job and associated operation completed successfully.

Note You need the UUID of the job object, which is typically provided after issuing an asynchronous request. Also review Asynchronous processing using the Job object before working with ONTAP internal jobs.
HTTP method and endpoint

This REST API call uses the following method and endpoint.

HTTP method Path

GET

/api/cluster/jobs/{uuid}

Processing type

Synchronous

Additional input parameters for the Curl examples

In addition to the parameters common with all REST API calls, the following parameters are also used in the curl examples for this step.

Parameter Type Required Description

$JOB_ID

Path

Yes

Needed to identify the job being requested.

Curl example
curl --request GET \
--location "https://$FQDN_IP/api/cluster/jobs/$JOB_ID" \
--include \
--header "Accept: */*" \
--header "Authorization: Basic $BASIC_AUTH"
JSON output example

The state value and other fields are included in the returned job object. The job in this example was run as part of updating an ONTAP cluster.

{
  "uuid": "d877f5bb-3aa7-11e9-b6c6-005056a78c89",
  "description": "PATCH /api/cluster",
  "state": "success",
  "message": "success",
  "code": 0,
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/d877f5bb-3aa7-11e9-b6c6-005056a78c89"
    }
  }
}