whitesky.cloud API basics

Introduction

The whitesky.cloud API allows you to create and manage all your whitesky.cloud resources programmatically.

Anything you can do through the whitesky.cloud console can also be done through the API, from creating Virtual Machines to attaching them to Private Networks, to configuring S3 and more.

A Swagger file is provided. If you are a customer you can use any tool that can talk to our API.

We also have the two following tools available:

 

whitesky.cloud CLI

Use our own developed Command Line Interface.

whitesky.cloud Terraform

Use our own developed Terraform plugin

Quickstart: First request

Get your API key from the COPY JWT option.

The path to our API is: <yourdomain>/api/1

Now you can configure Postman to authenticate.

 

How to authenticate

Each request made to whitesky.cloud API must be authenticated by sending an Authorization Bearer <apikey> HTTP header with each request. This header contains the header and API key.

We recommend using this in Postman on the collection level and then inherit on parent levels.

Your first call for datacenter locations

Now you can configure Postman to test your first call

The response will be a JSON list of locations.

				
					{
    "result": [
        {
            "name": "be-mac-dc01-001",
            "datacenter": {
                "address": "Kouterveldstraat 13, 1831 Machelen",
                "city": "machelen",
                "code": "be-mac-dc01",
                "coordinates": [
                    50.88735399999999,
                    4.455616
                ],
                "country": "belgium",
                "country_code": "be",
                "created_at": 1596197557.079186,
                "created_by": "fastgeert",
                "name": "LCL"
            }
        },
        {
            "name": "nl-rmd-dc01-001",
            "datacenter": {
                "address": "Op de Meuleberg 7, 6041 NK Roermond",
                "city": "roermond",
                "code": "nl-ams-dc01",
                "coordinates": [
                    51.1836984,
                    5.9761121
                ],
                "country": "netherlands",
                "country_code": "nl",
                "created_at": 1583147352.5108001,
                "created_by": "admin",
                "name": "Cellnex Roermond"
            }
        }
    ]
}
				
			

Identity and Access Management (IAM)

whitesky.cloud API keys are subject to IAM permissions. 

Requests and responses

Requests and responses to the whitesky.cloud API are JSON-based.

Requests

An API request consists of a call to the whitesky.cloud API, asking it to carry out an action or provide information.

Each API request will include a specified method, depending on the action you wish to perform:

Request method Usage Example
GET
Used to get a resource from a server. The server looks for the data you have requested, and sends it back to you.
List locations: /api/1/locations
POST
Often used to create a resource, this method provides additional data such as a JSON payload sent from the client to the server in the message body.
Start VMS: customers/{customer_id}/cloudspaces/{cloudspace_id}/vms/{vms-id}/start
PUT
The HTTP PUT request method is used to create a new resource or overwrite a representation of the target resource
Update VMS: customers/{customer_id}/cloudspaces/{cloudspace_id}/vms/{vms-id}/size
DELETE
Used to delete a resource
Delete VMS: customers/{customer_id}/cloudspaces/{cloudspace_id}/vms/{vms-id}

Responses

After receiving a request, the API sends a response. This consists of the response body, headers and the HTTP status code. When a request is successful, the response body will typically be sent back in the form of a JSON object. 

Some ideas for using the API

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
LOGIN

Don’t have an account yet? Register and we’ll grant you access to our marketing and sales assets!