Write operations in the Gcore Cloud API are asynchronous — the API returns a task ID immediately, while the actual operation runs in the background. The created resource ID is only available after polling the task to completion. This applies to every operation that changes infrastructure state: creating instances, volumes, networks, load balancers, Kubernetes clusters, and more.Documentation Index
Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
- 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:| State | Meaning |
|---|---|
NEW | Task queued, not yet started |
RUNNING | Operation in progress |
FINISHED | Operation completed successfully |
ERROR | Operation failed — check error field |
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:| Operation | Typical duration | Poll every |
|---|---|---|
| Create VM | 15–30 seconds | 5 seconds |
| Create volume | 5–15 seconds | 5 seconds |
| Create network / subnet | 5–10 seconds | 5 seconds |
| Create load balancer | 30–90 seconds | 10 seconds |
| Delete VM | 15–70 seconds | 5 seconds |
| Delete Bare Metal server | 60–120 seconds | 30 seconds |
| Create Kubernetes cluster | 5–15 minutes | 30 seconds |
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.