GoDaddy Cloud Servers

Get Started

Overview

The GoDaddy Cloud API allows developers to create servers in GoDaddy data centers.

To use the API, you need two things:

  1. Cloud account
  2. API key
These pieces are used to authenticate your identity with each request.

Step 1. Get your Cloud account

Sign up for an account if you haven't already. It'll only take a second.

Step 2. Try out the UI

https://cloud.godaddy.com/ once you have an account. When you login, you'll see the Cloud Server UI instead of the signup page.

Step 3. Create an API key

Create a Production key and secret.. The Test keys are not valid for GoDaddy Cloud API. When calling the API, authenticate by replacing {KEY} and {SECRET} with your own.

Step 4. Make calls

Try creating a server.

Create a Server

Step 1. Choose Image

Images contain the operating system and other software that run your server. This query shows the available images. Note the name of the one you want to use.

Code

curl -H 'Authorization: sso-key {KEY}:{SECRET}' -H 'Content-Type: application/json' https://api.godaddy.com/v1/cloud/images

References

Step 2. Choose Spec

Specs define the size and cost of a server. Larger specs are more expensive. This query shows the available specs. Note the name of the one you want to use.

Code

curl -H 'Authorization: sso-key {KEY}:{SECRET}' -H 'Content-Type: application/json' https://api.godaddy.com/v1/cloud/specs

References

Step 3. Create Server

Create a new server. Replace the {bracketed values} with your own.

Code

curl -H 'Authorization: sso-key {KEY}:{SECRET}' -H 'Content-Type: application/json' -d '{"image":"{IMAGE_NAME}","spec":"{SPEC_NAME}","username":"{USERNAME}","password":"{PASSWORD}","hostname":"{HOSTNAME}"}' https://api.godaddy.com/v1/cloud/servers

Note the serverId returned from this call; you'll use it to check the server status.

References

Step 4. Check Server Status

Servers generally setup in less than a minute. When your server is ready, its status will change to "RUNNING", and it will be accessible on its publicIp via SSH.

{SERVER_ID} is the one you received when creating the server.

Code

curl -H 'Authorization: sso-key {KEY}:{SECRET}' -H 'Content-Type: application/json' https://api.godaddy.com/v1/cloud/servers/{SERVER_ID}

References

Documentation

Full reference documentation, including many operations not discussed here.

Read Documentation