Scaleway logo
Account API

Account API

Scaleway is a complete cloud ecosystem offering a one-stop solution for creating, deploying and scaling your infrastructure. When you create your Scaleway account, you get instant access to the Scaleway console and Scaleway API to effortlessly deploy our products and services.

The Account API currently allows you to manage Projects. Projects are Scaleway's resource management feature. Designed to help you manage your infrastructure and cloud services, you can create multiple Projects within a single Organization. This allows you to group resources into different Projects, providing better resource isolation and organization, which, in turn, leads to improved management efficiency.

It also increases transparency for users since resources in an invoice are grouped into Projects. Additionally, access for each Scaleway product is managed at Project level: this means a user can be granted Project-specific rights without being given full access to all Projects, allowing for more targeted and controlled access. Read our dedicated documentationOpen in new context to learn more.

Concepts

Refer to our dedicated concepts pageOpen in new context to find definitions of the different terms related to accounts.

Quickstart

  1. Configure your environment variables.

    Note

    This is an optional step that seeks to simplify your usage of the APIs.

    TerminalCode
    export SCW_SECRET_KEY="<API secret key>"
  2. Edit the POST request payload you will use to create a Project.

    Replace the parameters in the following example:

    JSONCode
    '{ "name": "My project name", "organization_id": "b12d5c3g-c612-5674-c1e9-92627f36c5b9", "description": "This is the description of my Project", }'
    ParameterDescription
    nameName for the Project you want to create.
    organization_idID of the Organization in which to create the Project. It must be in UUID format.
    descriptionDescription for the Project you want to create.
  3. Create a Project: Run the following command to create a Project.

    Make sure you include the payload you edited in the previous step.

    TerminalCode
    curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ "https://api.scaleway.com/account/v3/projects" \ -d '{ "name": "My project name", "organization_id": "b12d5c3g-c612-5674-c1e9-92627f36c5b9", "type": "This is the description of my Project" }'

    You should get a response like the following:

    Note

    This is a response example, the UUIDs displayed are not real.

    TerminalCode
    { "id": "6170692e-7363-616c-6577-61792e636f6d", "name": "My project name", "organization_id": "b12d5c3g-c612-5674-c1e9-92627f36c5b9", "created_at": "2023-03-02T22:00:28.888380Z", "updated_at": "2023-03-02T22:00:28.888380Z", "description": "This is the description of my project" }
  4. List your Projects: Run the following command to list your Projects. Replace the Organization ID in the endpoint with your own Organization ID.

    TerminalCode
    curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ "https://api.scaleway.com/account/v3/projects?organization_id=b12d5c3g-c612-5674-c1e9-92627f36c5b9"

    You should get a response like the following:

    TerminalCode
    { "total_count": "2", "projects": [ { "id": "0fe11800-ddbb-4b62-8906-ed08780cdddb", "name": "default", "organization_id": "b12d5c3g-c612-5674-c1e9-92627f36c5b9", "created_at": "2022-08-31T07:45:53.657735Z", "updated_at": "2022-08-31T07:45:53.657735Z", "description": "cannot_be_deleted" }, { "id":"6170692e-7363-616c-6577-61792e636f6d", "name":"My project name", "organization_id":"b12d5c3g-c612-5674-c1e9-92627f36c5b9", "created_at":"2023-03-02T22:00:28.888380Z", "updated_at":"2023-03-02T22:00:28.888380Z", "description":"This is the description of my Project" }, ] }
  5. Update a Project: Run the following command to update a Project's name and description.

    Note

    Do not forget to replace the Project ID in the endpoint, and the Organization ID in the payload, with your own. You can retrieve the Project ID from the "List Project" response above.

    TerminalCode
    curl -X PATCH \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ "https://api.scaleway.com/account/v3/projects/6170692e-7363-616c-6577-61792e636f6d" \ -d '{ "name": "My project name", "organization_id": "b12d5c3g-c612-5674-c1e9-92627f36c5b9", "description": "This is the updated description of my Project" }'

Requirement

Technical limitations

On the Scaleway Console, the Account scope covers account and Organization creation as well as personal data configuration and management of Projects. Currently, the public Account API only allows you to manage Projects.

Going further

For more help using Scaleway Account, check out the following resources: