Tasks
Async provisioning operations create a Task. Statuses: PENDING, RUNNING,
OK, FAILED, CANCELLED, PAUSED. A restart queued during server
maintenance stays PAUSED until maintenance ends; a request the server refuses
after accepting it ends CANCELLED with the reason (see
Node status).
The endpoints on this page are not available via OAuth. Both return
403 insufficient_scope for an OAuth token — they are session/API-key
only (see OAuth). The per-site task endpoints are reachable
with sites:read; see Site Tasks.
List All Tasks
Will only return tasks from the last 3 days. To see tasks from earlier, you will need to already know the ID and use the view task endpoint.
Without an account scope, this will return tasks started by your user, across all accounts. If you scope this api call to an account, you will return ALL tasks associated with that account, regardless who initiated them.
To get more task details, or site-specific tasks, you may use the Site Tasks specific endpoint.
GET /api/tasks
Returned Params
- tasks: Array
- id: Integer
- name: String
- title: String
- status: String
- data: String
- start_on: DateTime
- end_on: DateTime
- user: Object
- id: String
- email: String
- accounts: Array
- id: String
- name: String
- sites: Array
- id: String
- name: String
- orders: Array
- id: String
- status: String
View Task
GET /api/tasks/:id
Returned Params
- task: Object
- id: Integer
- name: String
- title: String
- status: String
- data: String
- start_on: DateTime
- end_on: DateTime
- user: Object
- id: String
- email: String
- accounts: Array
- id: String
- name: String
- sites: Array
- id: String
- name: String
- orders: Array
- id: String
- status: String
Callbacks
Instead of polling, you can attach a callback to an order and have CloudPress
POST to your URL when the task finishes. See Callbacks.