Question

Create and Delete "General Purpose" droplet via API

In DO there are four types of droplets: Standard, General Purpose, CPU Optimized, and Memory Optimized droplet.

Is it possible to create and delete “General Purpose” droplet via API? If yes, are there samples on how to do it?


Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Adding a bit to @alexdo’s answer, when you create a Droplet via the API, you will supply a “size slug.” Size slugs are human-readable strings used to specify the type of Droplet in certain API requests. They are comprised of the identifier for the Droplet’s class, the vCPU count, and the amount of RAM. For example, the $5 per month Standard Droplet comes with 1 vCPU and 1 GB of RAM. So its size slug is: s-1vcpu-1gb

Size slugs for General Purpose Droplets are prefixed with g- So the 8 GB RAM, 2 CPU General Purpose Droplet would be g-2vcpu-8gb

In order to get a full list of all the available Droplet sizes and their corresponding size slugs, you can: