[RESOLVED]Scaleway API : Create Server (Not Found)

#1

Hi :slightly_smiling_face:

I’m struggling to create a server through the API

curl https://api.scaleway.com/instance/v1/zones/nl-ams-1 \
> -H "X-Auth-Token: 00000000000000000000000000000000000" \
> -d '{ \
> "name": "UAT",
> "image": "67375eb1-f14d-4f02-bb42-6119cecbde51",
> "commercial_type": "START1-XS",
> "tags": ["test"],
> "organization": "000000000000000000000"
> }'

Answer :
{"message":"Not found"}

An idea ? :thinking:

Thx !

Link : https://www.scaleway.com/en/docs/interact-with-the-compute-api/#-Step-2--Create-a-new-server

#2

Hello,

It seems that you forget the /servers at the end of the URL:

Let me know if you still have any issue after modifying the URL.

Benedikt

#3

Hi @bene

Thank for your help !
I still have an issue, did I forget something ?

curl https://api.scaleway.com/instance/v1/zones/nl-ams-1/servers \
-H "X-Auth-Token: 0000000000000000000000000000000" \
-H "Content-Type: application/json" \
-d '{ \
"name": "UAT",
"image": "67375eb1-f14d-4f02-bb42-6119cecbde51",
"commercial_type": "START1-XS",
"tags": ["test"],
"organization": "0000000000000000000000000000"
}'

Response :
{"message": "Request data is invalid JSON.", "type": "invalid_request_error"}

#4

Hi,

I just tried it with the following command and it works fine for me:

curl https://api.scaleway.com/instance/v1/zones/nl-ams-1/servers \
-H "X-Auth-Token: <AUTH_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "testserver", 
"image": "9444d178-2285-4842-ac35-5e86eda8da91", 
"commercial_type": "DEV1-S", 
"tags": ["testserver"], 
"organization": "<ORGANIZATION_ID>"}'
#5

Hi,

I did a mistake on the image (UUID), It’s now working for me :slight_smile:
Thx a lot !

1 Like