Scaleway's APIs are key part of the Scaleway Ecosystem: anything you can do from the web console can be done through APIs. APIs give you access to all Scaleway products, including storage, compute and much more.
APIs can be accessed via conventional HTTP request or via provided client library.
Every Scaleway API can be access through a single endpoint:
Each endpoints follow this pattern:
Request and Response are JSON based. See product reference pages to get more details.
Each request made to Scaleway APIs must be authenticated.
Scaleway APIs handle this with a
X-Auth-Token HTTP header that must be provided with the request.
You can generate an
X-Auth-Token token by visiting the credential section of the Scaleway web console.
It is absolutely essential that you keep your token private as it gives access to everything in your Scaleway account.
curl -H "X-Auth-Token: $TOKEN" https://api.scaleway.com/instance/v1/zones/fr-par-1/servers
Scaleway's products are deployed across multiple datacenter in the world.
For performance and legal reasons, some products are splitted by Region or by Availability Zones. When using such product, you can choose the location that better fits your need (country, latency, ...).
A Region is represented as a Geographical area such as France (Paris) or the Netherlands (Amsterdam). It can contain multiple Availability Zones.
For regionalized products, you can specify the region in the endpoint via this pattern:
In order to deploy highly available application, a region can be splitted in many Availability Zones (AZ). Latency between multiple AZ of the same region are low as they have a common network layer.
For zoned products, you can specify the availability zone in the endpoint via this pattern:
We use conventional HTTP response codes to indicate success or failure of an API request.
In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g., a required parameter is missing), and codes in the 5xx range indicate an error with our servers.
200 OK- Everything worked as expected.
201 No Content- Everything worked and response do not contain a body.
400 Bad Request- Often missing a required parameter.
401 Unauthorized- No valid API key provided.
403 Forbidden- Insufficient privileges to access requested resource.
404 Not Found- The requested item does not exist.
429 Too many requests- You made too many request too quickly.
50x Server errors- Something went wrong on our side 😢.
Most non-2xx status codes are provided with a message in the body giving more detail about the cause of the issue.