By arnaud738786
Everything is in the title…
I have a snapshot named dev-box, when I try to do the following, I get an error:
curl -s -X POST -d '{
> "name": "dev",
> "region": "ams2",
> "size": "8gb",
> "image": "dev-box",
> "ssh_keys": [],
> "backups": false,
> "ipv6": false,
> "user_data": null,
> "private_networking": null
> }' -H 'Content-Type: application/json' -H 'Authorization: Bearer token' https://api.digitalocean.com/v2/droplets
{"id":"unprocessable_entity","message":"You specified an invalid image for Droplet creation."}
What am I doing wrong?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The image variable when creating a droplet expects an image id, not an image name. You will need to first hit the images endpoint in order to get the ID for the image you wish to use.
Thanks for your help. Will add needed call to retrieve image id then!
regards,
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.