Use the OpenStack APIs to launch server instances, create images, assign metadata to instances and images, create storage containers and objects, and complete other actions in Fuga Cloud.
API Endpoint: https://api.fuga.io/
|HTTP Response Code||Description|
|200||Function successfully executed.|
|400||Invalid API location. Check the URL that you are using.|
|403||Invalid or missing API key. Check that your API key is present and matches your assigned key.|
|405||Invalid HTTP method. Check that the method (POST|GET) matches what the documentation indicates.|
|412||Request failed. Check the response body for a more detailed description.|
|500||Internal server error. Try again at a later time.|
|503||Rate limit hit. API requests are limited to an average of 2/s. Try your request again later.|
Using the API
For any API request that requires authentication, you would need to send the ‘X-Auth-Token:
Time and Date
All time and date fields returned by this API are displayed in UTC.
The API reference is available in csv, json, table, value and yaml.
GET request with no arguments.
GET request that requires your API key.
curl -H ‘API-Key: YOURKEY’ “https://api.fuga.io/v1/server/list"
GET request with additional parameters.
curl -H ‘API-Key: YOURKEY’ -G –data “SUBID=12345” “https://api.fuga.io/v1/server/list"
POST request that requires your API key.
curl -H ‘API-Key: YOURKEY’ –data “SUBID=12345” “https://api.fuga.io/v1/server/start"
POST request with additional parameters.
curl -H ‘API-Key: YOURKEY’ –data “SUBID=12345” –data-urlencode ‘label=my server!’ “https://api.fuga.io/v1/server/label_set"
Go to the next tutorial in API
Create a server with the OpenStack API
OpenStack has an API that can be used in a myriad of ways. Here we will demonstrate a simple but effective PHP script that logs into the API, retrieves and selects a flavor, retrieves and selects a image and continues to create a simple server. This tutorial assumes a small degree of familiarity with PHP and the availability of PHP with the Curl library. First, we will need to login and acquire an authentication token and retrieve the tenantId.