- Make the request. A write call returns a task ID immediately:
- Poll the task. Call
GET /cloud/v1/tasks/{task_id}repeatedly until thestatefield is no longerRUNNING:
- Extract the result. When
stateisFINISHED, find the created resource ID increated_resources.
Task states
Tasks move through four states from creation to completion:Task response
A finishedcreate_vm task response shows the complete structure, including the created_resources field where the new resource IDs are found:
created_resources field under the resource type key. Only the types that were actually created contain non-empty arrays — all others are empty lists.
Polling intervals
Polling too frequently wastes API quota; polling too rarely delays pipelines. These intervals balance the two:Poll the task
- curl (shell loop)
- Python SDK
- Go SDK
- JavaScript
Error tasks
Whenstate is ERROR, the error field contains the failure reason:
List recent tasks
To see all tasks in a project and region, call:state (NEW, RUNNING, FINISHED, ERROR) and task_type (e.g., create_vm, delete_vm, create_volume).
Tasks are associated with a specific project and region, whereas the task endpoint
GET /cloud/v1/tasks/{task_id} does not require project_id or region_id in the path — a task ID is globally unique.