A terminal must be open and
curl must be installed. If either is unfamiliar, read API basics first — it covers both in a few minutes.Step 1. Set up the API token
If the token has not been created yet, follow Authentication to create one in the Gcore Customer Portal and copy the value. Then set it as an environment variable in the terminal:29841_c767... with the actual token value copied in Step 1.
Verify the variable was set correctly:
Step 2. Find the project ID
Cloud API URLs include a project ID — a number that identifies the account’s project. List the projects to find it:- curl
- Python SDK
- Go SDK
- JavaScript
"id" value in the results array — that number is the project ID. Copy it and set it as a variable:
1234567 with the actual ID from the response.
Most accounts have one project named “Default”, while multiple projects are used to separate environments (production, staging) or billing.
Step 3. Choose a region
Cloud resources — VMs, volumes, networks — exist in a specific region (a data center location), and different regions support different features. List all available regions:- curl
- Python SDK
- Go SDK
- JavaScript
| Field | Meaning |
|---|---|
display_name | Human-readable location name |
state | Only use regions where state is "ACTIVE" |
access_level | "core" = latest hardware; "edge" = lower cost |
has_kvm | true means VMs are available |
has_k8s | true means Managed Kubernetes is available |
has_dbaas | true means Managed PostgreSQL is available |
"has_kvm": true for VM workloads, and note its "id". Then set it:
148 with the chosen region’s id.
Step 4. Make a resource call
With all three variables set, run a real Cloud API call — list all VMs in the project and region:- curl
- Python SDK
- Go SDK
- JavaScript
200 OK response with valid JSON confirms the token, project ID, and region ID are all correct.