Scopes, URLs, and request format

How REST API URLs are built from a project ID, which headers requests and responses carry, and how bodies, timestamps, and amounts are formatted.

This reference describes how REST API URLs are built, which headers requests and responses carry, and how request and response bodies are formatted. For the operations themselves, see the API reference.

URL structure

A request URL has these parts:

Parts of a request URL
https://<api-host>/api/v1/scopes/<project-id>/<service>/<collection>/<resource-id>/actions/<action>
PartMeaning
https://<api-host>/api/v1The base URL: /api/v1 on the API host.
/scopes/<project-id>The project that holds the resource. The API calls this ID the scope ID, scopeId.
<service>The service, such as compute, storage, or network. See Services.
<collection>A resource type in the service, such as instances or volumes.
<resource-id>One resource of the collection. Leave it out to address the whole collection.
/actions/<action>An action on the resource, such as start or stop. Actions are always POST requests.

Some examples:

RequestMeaning
GET /scopes/<project-id>/compute/instancesList the project's instances.
GET /scopes/<project-id>/compute/instances/<instance-id>Read one instance.
POST /scopes/<project-id>/compute/instances/<instance-id>/actions/stopStop an instance.
DELETE /scopes/<project-id>/storage/volumes/<volume-id>Delete a volume.

Encode each path segment that you insert, such as an ID or a name, for use in a URL.

Find a project's ID

The scope ID in a path is the ID of a project. You can find it in two places:

  • The console's address. Every page of a project has an address of the form /t/<tenant-id>/s/<subscription-id>/project/<project-id>/…, after the language code. The part after /project/ is the project ID.
  • The API. GET /account/whoami returns the tenants, subscriptions, and projects that you can access, with their IDs.
Part of a GET /account/whoami response
{
  "tenants": [
    {
      "id": "acme",
      "name": "Acme Corp",
      "subscriptions": [
        {
          "id": "acme-production",
          "tenantId": "acme",
          "name": "Production",
          "currency": "TRY",
          "defaultRegion": "ist-1",
          "projects": [
            {
              "id": "acme-production-web-platform",
              "subscriptionId": "acme-production",
              "name": "web-platform",
              "region": "ist-1"
            }
          ]
        }
      ]
    }
  ]
}

Subscription and project IDs don't change when you rename them. Read them from GET /account/whoami instead of deriving them from names.

When you call whoami with an API token or a service account key, it lists only the tenant that the credential belongs to.

Services

Service segmentCollectionsProduct
computeinstances, flavors, key-pairsVirtual Machines
computeimagesImages
compute, storagesnapshotsSnapshots
storagevolumes, volume-transfersBlock Storage
storagebuckets, temp-url-keyObject Storage
storagebackup-plansBackup Center
networknetworks, routers, network-interfacesVirtual Networks
networksecurity-groupsSecurity Groups
networkload-balancersLoad Balancers
networkvpnSite-to-Site VPN
networkfloating-ipsFloating IPs
iamusers, roles, service-accounts, api-tokens, and moreIdentity & Access Management
iamopenstack-credentials, openstack-api-accessOpenStack API Access
observabilityalert-rules, notification-channelsMonitoring & Alerts
billingsummary, cost-reports, budgets, commitments, invoicesCost Management
activityactivity-eventsActivity Log

A size is called a flavor in the API: flavors lists the sizes. A few paths aren't under a project:

PathPurpose
/account/whoamiYour identity and the tenants, subscriptions, and projects that you can access.
/operations/<operation-id>Read an asynchronous operation. See Synchronous and asynchronous requests.
/operations/<operation-id>/actions/cancelCancel an operation that hasn't finished.
/regions/<region>/volume-typesThe volume types of a region.

A path that matches no service returns 404 Not Found.

Methods

MethodUse
GETRead a resource or list a collection.
POSTCreate a resource, or run an action at /actions/<action>.
PATCHChange some fields of a resource.
PUTReplace a setting as a whole, such as a resource's tags at /tags.
DELETEDelete a resource.

Request headers

HeaderSend it withValue
AuthorizationEvery requestBearer followed by an API token or a service account key. See Authenticate with API tokens.
Content-TypeRequests that have a bodyapplication/json
Idempotency-KeyEvery POST, PUT, PATCH, and DELETE request. With an API token or a service account key, it's required on POST requests that create a resource.A new UUID for each new request. See Idempotent requests.
If-MatchUpdates and deletes that check the versionThe ETag value from your last read. See Concurrency control.
X-Request-IdOptionalYour own ID for the request. The API returns it in the response.

Response headers

HeaderReturned withValue
X-Request-IdEvery responseThe request's ID: yours, or one that the API generated.
ETagReads and updates of many resourcesA version tag of the resource, such as W/"3a7bd3e2360a3d29eea436fcfb7e44c735d117c4".
Retry-After429 Too Many RequestsThe number of seconds to wait before you retry.
X-RateLimit-LimitRequests with an API token or a service account keyThe number of requests that the current window allows.
X-RateLimit-RemainingRequests with an API token or a service account keyThe number of requests left in the current window.
X-RateLimit-ResetRequests with an API token or a service account keyThe number of seconds until the window resets.

Body format

  • JSON. Request and response bodies are JSON. Field names are in camel case, such as deletionProtection or subscriptionId.
  • Fields without a value. In a response, an optional field that has no value is left out rather than set to null. A field that the schema always includes is present, and is null when it has no value.
  • Timestamps. ISO 8601 strings in UTC, such as 2026-10-08T09:30:00Z.
  • IDs. Opaque strings. Use them exactly as the API returns them.
  • Lists. A list operation returns { "data": [...], "meta": {...} }. See Pagination.
  • Errors. An error response has its own body. See Errors.

Amounts

Amounts of money are integers in ten-thousandths of the currency unit. A field whose name ends in Minor carries such an integer, and a money object carries one in amount, with the currency in currency:

A money object
{ "amount": 125000, "currency": "TRY" }

This amount is 12.5 units of its currency: divide by 10,000 to get the amount in the currency unit. Don't read these integers as cents.

Example

List the instances of a project
curl "https://<api-host>/api/v1/scopes/<project-id>/compute/instances?page=1&pageSize=50" \
  -H "Authorization: Bearer $PC_TOKEN"
  • <api-host>: the host name of the API.
  • <project-id>: the ID of the project.
  • PC_TOKEN: an environment variable that holds your API token.

On this page