- Created by Unknown User (sraaum), last modified on Feb 16, 2016
API Guide:
- API Essentials
- API Key Generation
- Autoscaling
- Backups
- Credit
- DNS
- Firewall Rules
- Flex Cloud VM Control
- Getting Started with Superb Flex Cloud
- IP Addresses
- Logs
- Network Interfaces
- Recipes
- SSH Keys
- Templates
- Test Route
- Troubleshooting API Issues
- Viewing Activity Logs
- Virtual Server Operating Systems
- Virtual Servers
- VS Disks
Introduction
The Flex Cloud API is a powerful utility for Superb Flex Cloud users, with the API you can manage every aspect of your virtual machines and integrate that control with your existing frameworks or internal tools. This guide is a complete reference for all API calls, includes detailed API call information, code, and output examples.
- The API is RESTful
- All function calls respond to XML and JSON exchange formats (JSON is the default)
- All function calls need authorization and authentication (Basic Auth using the API key as the password and account ID as username)
API URL: https://mycp.superb.net/flexapi
The API accepts HTTP Basic Authentication with your Account ID as the user and your generated API key as the password. Curl example:
curl –u <account_id>:<api_key>
Flex Cloud VM control
A simple Virtual Server management tool.
Check it out here:Flex Cloud VM Control
HTTP Methods
The API uses the following HTTP methods:
GET - used for retrieving information from a particular URI
POST - used for creating new object and adding new transactions into the queue
PUT - used for altering object properties, updated_at value is changed in PUT requests even if the request fails.
DELETE - used for object deletion
HTTP response codes
The API returns appropriate HTTP status codes for every request:
200 OK | The request completed successfully |
204 No content | The request completed successfully. The 204 status is returned on DELETE and PUT requests |
207 Multi-Status | Multiple requests made, multiple statuses returned |
201 Scheduled | The request has been accepted and scheduled for processing |
403 Forbidden | The request is correct, but could not be processed. |
404 Not Found | The requested URL is incorrect or the resource does not exist. For example, if you request to delete a disk with ID {5}, but there is no such disk in the cloud, you will get a 404 error. |
422 Unprocessable Entity | The sent parameters are erroneous. |
500 Internal Server Error | An error occurred. Please contact support. |
Formatting and naming conventions
The table below represents all the existing formatting and naming conventions used in this guide:
Convention | Explanation | Example |
stands for username:password (<account_id>:<api_key>) | 723412:efd0d4b5995ac61adf11a2e193275bb5db1febd1 | |
<api_url> | placeholder for the api address |
|
:id | stands for the resource ID. | 23 |
italics | all the parameters are italicised | currency_code |
* (asterisk) | marks the required parameters | label * |
preformatted | indicates request examples in XML or JSON | GET /roles.xml |
info | An info message emphasizes or explains the information within the chapter. | Clicking the OFF button performs graceful shutdown and then powers off the VS. |
note | A note message contains information essential for the task completion. | The maximum length of a Mount Point is 256 characters. |
warning | A warning message informs you of something you should not do or be cautious. | You won't be able to restore a VS after deleting it |
Templates
This is a reference for the available templates, template_label may be used in place of the required template_id when creating new virtual servers.
<template_label> | |
Minimum memory | 128 |
Minimum disk size | 10 |
e.g.
{ "virtual_machine": { "template_label": "CentOS 7.1 x64", ... } }
Labels must be exact and are case sensitive!
Available systems
CentOS 6.7
Label | CentOS 6.7 x64 |
Minimum memory | 384 MB |
Minimum disk size | 5 GB |
Virtualization type | XEN, KVM |
CentOS 7.7
Label | CentOS 7.1 x64 |
Minimum memory | 384 MB |
Minimum disk size | 5 GB |
Virtualization type | XEN, KVM |
Debian 8.0
Label | Debian 8.0 x64 |
Minimum memory | 512 MB |
Minimum disk size | 6 GB |
Virtualization type | XEN, KVM |
FreeBSD 10.1
Label | FreeBSD 10.1 x64 |
Minimum memory | 256 MB |
Minimum disk size | 5 GB |
Virtualization type | XEN, KVM |
Red Hat 6.7
Label | Red Hat Enterprise Linux 6.7 x64 |
Minimum memory | 512MB |
Minimum disk size | 6 GB |
Virtualization type | XEN, KVM |
Red Hat 7.1
Label | Red Hat Enterprise Linux 7.1 x64 |
Minimum memory | 512MB |
Minimum disk size | 6 GB |
Virtualization type | XEN, KVM |
Ubuntu 12.04
Label | Ubuntu 12.04 x64 |
Minimum memory | 128 MB |
Minimum disk size | 5 GB |
Virtualization type | XEN, KVM |
Ubuntu 14.04
Label | Ubuntu 14.04 x64 |
Minimum memory | 256 MB |
Minimum disk size | 5 GB |
Virtualization type | XEN, KVM |
Windows 2008 DC (datacenter)
Label | Windows 2008 x64 DC R2 |
Minimum memory | 1024 MB |
Minimum disk size | 20 GB |
Virtualization type | KVM |
License | KMS |
Windows 2008 STD (standard)
Label | Windows 2008 x64 STD R2 |
Minimum memory | 256 MB |
Minimum disk size | 5 GB |
Virtualization type | KVM |
License | KMS |
Windows 2012 DC (datacenter)
Label | Windows 2012 x64 DC R2 |
Minimum memory | 1024 MB |
Minimum disk size | 20 GB |
Virtualization type | KVM |
License | KMS |
Windows 2012 STD (standard)
Label | Windows 2012 x64 STD R2 |
Minimum memory | 1024 MB |
Minimum disk size | 20 GB |
Virtualization type | KVM |
License | KMS |
- No labels