By chrism85
Hello,
I’ve searched around for this answer and come up short, which either means it’s not possible or it’s not a popular discussion.
Using the API, I am wondering if you’re able to create a Droplet using one of the |1-Click Apps" you have.
So for instance, I want to spin up a Droplet, using the API that will have WordPress or Rails installed on it and ready to go from the start (so not installation required on my part)
Look forward to a reply.
-Chris
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!
This comment has been deleted
There’s no difference between creating a droplet from say a Debian image or a Wordpress image. It’s the same API call.
You can definitely launch One-Click applications via the API. Each public image has a “slug” that you can use to launch an image. You can also filter the list of images to only show application images:
curl -X GET -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' \
"https://api.digitalocean.com/v2/images?type=application"
That will provide you with a list of images like:
{
"min_disk_size": 20,
"created_at": "2014-09-28T21:34:48Z",
"regions": [
"nyc1",
"ams1",
"sfo1",
"nyc2",
"ams2",
"sgp1",
"lon1",
"nyc3",
"ams3",
"nyc1"
],
"public": true,
"slug": "wordpress",
"distribution": "Ubuntu",
"name": "WordPress on 14.04",
"id": 6423475
},
Here you see that the image’s slug is “wordpress” To launch a WordPress droplet, you can run:
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' -d \
'{"name":"blog.example.com","region":"nyc3","size":"2gb","image":"wordpress"}' \
"https://api.digitalocean.com/v2/droplets"
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.