Skip to navigationSkip to main contentSkip to footerScaleway DocsAsk our AI
Ask our AI

Managing Projects with Scaleway APIs

This page explains how to manage Projects using Scaleway APIs.

Before you start

To complete the actions presented below, you must have:

  1. Configure your environment variables.

    Note

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

    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:

    '{
        "name": "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. Run the following command to create a Project:

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

    curl -X POST \
      -H "X-Auth-Token: $SCW_SECRET_KEY" \
      -H "Content-Type: application/json" \
      "https://api.scaleway.com/account/v3/projects" \
      -d '{
        "name": "Dis-Iz-My-Projekt",
        "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.

    {
      "id": "6170692e-7363-616c-6577-61792e636f6d",
      "name": "Dis-Iz-My-Projekt",
      "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. Run the following command to list your Projects. Replace the Organization ID in the endpoint with your own Organization ID.

    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:

    {
      "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":"Dis-Iz-My-Projekt",
            "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. 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.

    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": "Dis-Iz-My-Updated-Projekt",
        "organization_id": "b12d5c3g-c612-5674-c1e9-92627f36c5b9",
        "description": "This is the updated description of my Project"
      }'
Still need help?

Create a support ticket
No Results