Skytap API Calls for building an environment

The following is a simple set of API calls into Skytap to do the following:

Requests

GET - /v2/templates/1111111.json

Description

Select an environment, not required but good practice to validate that it exists before kicking off a deployment

CURL

curl -X GET "https://cloud.skytap.com/v2/templates/1111111.json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Header Parameters

Security

POST - /configurations.json

Description

This will clone an environment out from the .id in the previous request.

This can be sent as URL parameters, or preferably as a JSON doc. In this example it appends the user’s username to the Environment name

CURL

curl -X POST "https://cloud.skytap.com/configurations.json\
?template_id=$template_id&project_id=$project_id&name=$name" \
    -H "Content-Type: application/json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Query Parameters

Header Parameters

Body Parameters

Security

POST - /v2/configurations/33333333/networks.json

Description

This creates a new network in the environment created in the last step. It configures custom domain, DNS servers and allows it to be linked via ICNR to another environment

CURL

curl -X POST "https://cloud.skytap.com/v2/configurations/33333333/networks.json" \
    -H "Content-Type: application/json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Body Parameters

Security

POST - /v2/configurations/33333333/vms/22222222/interfaces.json

Description

This creates a new NIC on the VM inside this environment

CURL

curl -X POST "https://cloud.skytap.com/v2/configurations/33333333/vms/22222222/interfaces.json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Body Parameters

Security

PUT - /v2/configurations/33333333/vms/22222222/interfaces/nic-4444444-5555555-1.json

Description

Connect the new network interface to the network created earlier

CURL

curl -X PUT "https://cloud.skytap.com/v2/configurations/33333333/vms/22222222/interfaces/nic-4444444-5555555-1.json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Security

PUT - /v2/configurations/33333333/vms/22222222/interfaces/nic-4444444-5555555-1.json

Description

Update the hostname on the new network connection

CURL

curl -X PUT "https://cloud.skytap.com/v2/configurations/33333333/vms/22222222/interfaces/nic-4444444-5555555-1.json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Body Parameters

Security

PUT - /v2/configurations/33333333/vms/22222222.json

Description

Increase the CPU count, RAM and add 2 additional disks to the VM of 40GB and 30GB respectively

CURL

curl -X PUT "https://cloud.skytap.com/v2/configurations/33333333/vms/22222222.json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Body Parameters

Security

POST - /v2/configurations/33333333/vms/22222222/interfaces/nic-4444444-5555555-0/services.json

Description

Setup a direct SSH port through the firewall, using a random high numbered port

CURL

curl -X POST "https://cloud.skytap.com/v2/configurations/33333333/vms/22222222/interfaces/nic-4444444-5555555-0/services.json" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Body Parameters

Security

PUT - /configurations/33333333.json

Description

Clone the initial VM, including the changes to networking, storage, CPU and RAM

CURL

curl -X PUT "https://cloud.skytap.com/configurations/33333333.json" \
    -H "Content-Type: application/json" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Security

PUT - /v2/configurations/33333333

Description

Start the environment

CURL

curl -X PUT "https://cloud.skytap.com/v2/configurations/33333333" \
    -H "Accept: application/vnd.skytap.api.v2+json" \
    -H "Content-Type: application/json" \
    --data-raw "$body" \
-u "***** Hidden credentials *****":"***** Hidden credentials *****"

Path Parameters

Header Parameters

Body Parameters

Security

References