Task resource

When you make an asynchronous REST API operation, HTTP status 202 Accepted is returned and the URI of a TaskResource resource model is returned in the Location header of the response.

You can then perform a GET on the TaskResource model URI to poll for the status of the asynchronous operation. The TaskResource model also contains the name and URI of the resource that is affected by the task in the associatedResource attribute.

Creating an appliance backup example
  1. Create an appliance backup.

    POST /rest/backups

    The URI of a TaskResource in the Location header is returned in the response.

  2. Poll for status of the backup using the TaskResource URI returned in step 1.

    GET /rest/tasks/{id}

  3. When the task reaches the Completed state, use the associatedResource URI in the TaskResource to download the backup file.

    GET {associatedResource URI}