Managed Cloud Hosting API Guide
Contents
- addCloudServer Endpoint
- Payload Parameters
- Cloud Server Specifications
- Cloud Server Locations
- Setting your Brand Name and Cloud Server Logo
- Provisioning Cloud Servers under your Own Brand
addCloudServer Endpoint
The primary endpoint you'll need to provision Cloud Servers is the addCloudServer
endpoint shown below.
https://api.20i.com/reseller/resellerId/addCloudServer
The endpoint enables you to request the priviosioning of a Cloud Server from a specified provider.
Payload Parameters
The request payload should include the following parameters:
configuration: An object containing the configuration details for the Cloud Server, including:
- provider: The Cloud Server provider. (e.g.,
20icloud
,aws
orgcp
) - mvpsName: The name of the Cloud Server. A default hostname will be used if this parameter is left blank.
- optimisation: The type of optimisation for the Cloud Server. (e.g.,
default
,wordpress
,woocommerce
,magento
,joomla
,laravel
,nodejs
andnetcore
.) - spec: The specification name of the Cloud Server.
- zone: The cloud server zone, referring to the data center location (e.g.,
us-west-1
). Please see further down this guide for a full list of zones/locations for each cloud provider. - bandwidth: The allocated bandwidth for the cloud server, this is only used for AWS and GCP servers.
- disk: The storage capacity of the cloud server, this is only used for AWS and GCP servers.
Additional Options
- options: Additional options for the Cloud Server order.
- periodMonths: The duration of the Cloud Server contract, in months. (e.g.,
1
) - type: The type or category of the Cloud Server (e.g.,
cloud-aws
,cloud-gcp
andcloud-20i
). You can usecloud-20i
for your branded Cloud Server as this is never displayed. - forUser: (Optional) Specifies the stack user tuple (e.g., 'stack-user:113') to whom the Cloud Server will be assigned.
When you call this API endpoint, the appropriate fee for the cloud server is deducted from your 20i account balance. If the account balance does not have sufficient funds, the operation will fail.
The API response returns a string representing the server ID if a contract is successfully created. If no contract is created, the response will be null
.
<?php
$general_api_key = "API_KEY";
$services_api = new \TwentyI\API\Services($general_api_key);
$request = $services_api->postWithFields("/reseller/{resellerId}/addCloudServer", [
"configuration" => [
"spec" => "string",
"zone" => "string",
"bandwidth" => "string",
"disk" => "string",
"provider" => "string",
"mvpsName" => "string",
],
"periodMonths" => "string",
"type" => "string",
"forUser" => "string",
]);
Cloud Server Specifications
20iCloud/Reseller Branded Specifications:
Spec | CPU | RAM | Disk | Bandwidth |
micro | 1 | 1 | 25 | 1000 |
small | 1 | 2 | 50 | 2000 |
medium | 2 | 4 | 80 | 4000 |
large | 4 | 8 | 160 | 5000 |
x-large | 8 | 16 | 320 | 10000 |
2x-large | 12 | 32 | 640 | 20000 |
4x-large | 16 | 32 | 640 | 30000 |
8x-large | 24 | 64 | 1280 | 40000 |
16x-large | 32 | 96 | 1440 | 40000 |
32x-large | 48 | 128 | 1920 | 40000 |
AWS Specifications:
Spec | CPU | RAM | Disk | Bandwidth |
micro | 2 | 1 | 20 | 2 |
small | 2 | 2 | 20 | 2 |
medium | 2 | 4 | 20 | 2 |
large | 2 | 8 | 20 | 2 |
x-large | 4 | 16 | 20 | 2 |
2x-large | 8 | 32 | 20 | 2 |
4x-large | 16 | 64 | 20 | 2 |
8x-large | 32 | 128 | 20 | 2 |
Disk space
GCP Specifications:
Spec | CPU | RAM | Disk | Bandwidth |
micro | 1 | 3.75 | 20 | 2 |
small | 2 | 8 | 20 | 2 |
medium | 4 | 16 | 20 | 2 |
large | 8 | 32 | 20 | 2 |
x-large | 16 | 64 | 20 | 2 |
2x-large | 32 | 128 | 20 | 2 |
4x-large | 48 | 192 | 20 | 2 |
8x-large | 64 | 256 | 20 | 2 |
Cloud Server Locations
20iCloud Locations:
- London, England (dc_location-uk)
- Dallas TX, USA (dc_location-usa)
AWS Locations:
- North Virginia, USA (us-east-1)
- Ohio, USA (us-east-2)
- North California, USA (us-west-1)
- Oregon, USA (us-west-2)
- Mumbai, India (ap-south-1)
- Hyderabad, India (ap-south-2)
- Tokyo, Japan (ap-northeast-1)
- Seoul, South Korea (ap-northeast-2)
- Osaka, Japan (ap-northeast-3)
- Singapore, Asia (ap-southeast-1)
- Sydney, Australia (ap-southeast-2)
- Canada (Central) (ca-central-1)
- Frankfurt, Germany (eu-central-1)
- Dublin, Ireland (eu-west-1)
- London, UK (eu-west-2)
- Paris, France (eu-west-3)
- Stockholm, Sweden (eu-north-1)
- São Paulo, Brazil (sa-east-1)
- Hong Kong, Asia (ap-east-1)
- Cape Town, SA (af-south-1)
- Jakarta, Indonesia (ap-southeast-3)
- Melbourne, Australia (ap-southeast-4)
- Milan, Italy (eu-south-1)
- Zaragoza, Spain (eu-south-2)
- Zurich, Switzerland (eu-central-2)
- Bahrain (me-south-1)
- UAE (me-central-1)
GCP Locations:
- Changhua, Taiwan (asia-east1)
- Hong Kong, Asia (asia-east2)
- Tokyo, Japan (asia-northeast1)
- Osaka, Japan (asia-northeast2)
- Seoul, South Korea (asia-northeast3)
- Mumbai, India (asia-south1)
- Delhi, India (asia-south2)
- Singapore, Asia (asia-southeast1)
- Jakarta, Indonesia (asia-southeast2)
- Sydney, Australia (australia-southeast1)
- Melbourne, Australia (australia-southeast2)
- Warsaw, Poland (europe-central2)
- Hamina, Finland (europe-north1)
- Madrid, Spain (europe-southwest1)
- St. Ghislain, Belgium (europe-west1)
- Turin, Italy (europe-west12)
- London, England (europe-west2)
- Frankfurt, Germany (europe-west3)
- Eemshaven, Netherlands (europe-west4)
- Zurich, Switzerland (europe-west6)
- Milan, Italy (europe-west8)
- Paris, France (europe-west9)
- Tel Aviv, Israel (me-west1)
- Montréal, Québec (northamerica-northeast1)
- Toronto, Ontario (northamerica-northeast2)
- São Paulo, Brazil (southamerica-east1)
- Santiago, Chile (southamerica-west1)
- Iowa, USA (us-central1)
- South Carolina, USA (us-east1)
- Virginia, USA (us-east4)
- Ohio, USA (us-east5)
- Texas, USA (us-south1)
- Oregon, USA (us-west1)
- California, USA (us-west2)
- Utah, USA (us-west3)
- Nevada, USA (us-west4)
Setting your Brand Name and Cloud Server Logo
If you want to sell Cloud Servers (20iCloud) under your own brand you need to set your brand name and logo from Your Brand in My20i. These will be returned in the response headers when querying the Cloud Server ID, and returned within the StackCP management interface.
Provisioning Cloud Servers under your Own Brand
To use your brand name and logo to replace the 20iCloud text and logo, you can can set the resellerCloudBranded
parameter in the configuration to true
:
<?php
$general_api_key = "API_KEY";
$services_api = new \TwentyI\API\Services($general_api_key);
$request = $services_api->postWithFields("/reseller/{resellerId}/addCloudServer", [
"configuration" => [
"spec" => "string",
"zone" => "string",
"bandwidth" => "string",
"disk" => "string",
"provider" => "string",
"mvpsName" => "string",
"resellerCloudBranded" => true
],
"periodMonths" => "string",
"type" => "string",
"forUser" => "string",
]);