Learning about REST APIs > Task resource |  | next

# 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
Create an appliance backup. `POST /rest/backups` The URI of a `TaskResource` in the `Location` header is returned in the response. Poll for status of the backup using the `TaskResource` URI returned in step 1. `GET /rest/tasks/`{id}`` When the task reaches the `Completed` state, use the `associatedResource` URI in the `TaskResource` to download the backup file. `GET `{associatedResource URI}``

prev | up | next
Querying resources and pagination using common REST API parameters | home | Error handling

Copyright © 2013-2016 Hewlett Packard Enterprise Development LP