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:
- A Scaleway account and you know your Organization ID
- An API key and that the API key has sufficient IAM permissions to perform the actions described on this page
- Your Organization ID
- Installed
curl
-
Configure your environment variables.
export SCW_SECRET_KEY="<API secret key>" -
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", }'Parameter Description 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. -
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:
{ "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" } -
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" }, ] } -
Run the following command to update a Project's name and description.
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