4.1. Listing Instance TasksΒΆ

GET /instance_tasks

Lists tasks for the instances of the user specified by the X-Effective-User-ID and X-Effective-Project-ID HTTP headers. If these headers are omitted, lists tasks for all instances unless filters are used.

Request parameters:

Name

In

Type

Description

project_id (Optional)

query

string

A comma-separated list of project IDs. Cannot be used together with the X-Effective-Project-ID and X-Effective-User-ID HTTP headers.

user_id (Optional)

query

string

A comma-separated list of user IDs. Cannot be used together with the X-Effective-Project-ID and X-Effective-User-ID HTTP headers.

state (Optional)

query

string

A comma-separated list of task states, which can be pending, running or completed.

status (Optional)

query

string

A comma-separated list of task statuses, which can be succeeded or failed.

Request example:

# curl -s -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
-H 'X-Effective-User-ID: c3862f44c4bc48358db62ae22d684f33' \
-H 'X-Effective-Project-ID: 04e0d744d0f544c69ff7c17db5c8b4b9' \
https://<controller_hostname>/api/v1/instance_tasks?state=running

Response example:

[
  {
    "finished_at": null,
    "id": 16,
    "instance_uuid": "242fae68-5fd0-4420-a5ec-e7852ed9ba1c",
    "message": null,
    "progress": 0,
    "project_id": "04d99efea4464248811f19a9a5b85c83",
    "started_at": "2017-02-20T16:07:58.000000",
    "state": "running",
    "status": null,
    "type": "set_password",
    "user_id": "d5fdd55f2280407f9f263532985f11a2"
  }
]