getClouder API Documentation

Kyup Client API v1.0

Welcome to the Kyup Client API v1.0 Documentation!

The Kyup Client API is primarily developed to provide third parties an easy way to use and build automated procedures (applications) with the Kyup Services. By using this API you can create, destroy or any other aspect of managing a container with Kyup.

The Kyup Client API is designed in a way to be easily understood. All requests are sent via the HTTP POST method and responses are in JSON format.

In case of any problems related to the Kyup Client API, please post a technical support ticket via the Kyup User Area -> Support section.
(more…)

Authentication

In order to use the Kyup client API you have to authenticate as an existing client. To do so you need an unique API key. Such a key can be obtained from the Kyup User Area under the API section. Click on the Generate Key button and a new unique key for your account will be generated.

If you have lost your API key you can always regenerate a new one under the API section of the Kyup User Area.

You have to authenticate for each request to the API service by providing the key within the JSON request object. Each request has to be made over HTTPS otherwise it will fail. For more information on building your API request refer to Request Structure.

Request structure

HTTPS Request

Each request to the API should be made over the HTTPS and should be a POST request.

API endpoint

The API service can be reached at the following URL:

https://api.kyup.com/client/v1

Request data

Each request data must be built in a valid JSON format. The request data must provide the name of the action to be accessed, your API key (for more info refer to Authentication sections) and a JSON sub-object with the respective params for the action:

Name Type Description
action string Valid name of existing API action
authorization_key string Valid API key used to authenticate. For more info, please refer to Authentication
data object JSON object containing all the required parameters for the respective API action

Response data

The API responds to each request by a JSON response. Each response provides a status of whether the actaion was successfully executed or not. In case of failure the response contains an error code and a human-readable description of the error.

(more…)

HTTP Method: POST
API URL: https://api.kyup.com/client/v1

request={
	"action":"actionName",
	"authorization_key":"$APIKEY",
	"data":{
		"param":"value",
		"param":"value",
		.
		.
		.
	}
}

Data Encryption

It is required for some of the parameters of the API actions to be encrypted before they are sent over to the API endpoint. This is done in order to guarantee the security of any sensitive data such as password, emails and personal data. That is why it is a must to encrypt such data before sending it over the internet. Later in this documentation will indicate which parameters have to be encrypted.

In order to encrypt the data you have to use an unique encryption key for your account. If you don't have such yet you can generate it by logging into your Kyup User Area and navigating to the API section.

The cipher used for the encryption must be AES-256 with PKCS7 padding. Once encrypted the data must be base64 encoded and after that sent to the API. At right you can see an example function which encrypts the data and returns a base64 encoded result. This example function requires the following parameters:

Name Description
key Unique encryption key for your account. You can generate such from your Kyup User Area -> API
date The data to be encrypted, such as passwords, emails or any other sensitive data

In case there is no encryption key generated for your Kyup account or the data is encrypted by using a wrong key, then the API service will return an error:

Error code Description
264 Encryption key could not be found. This means there is no encryption key generated for this client.

(more…)


public static function encrypt($key, $data)
{
	if (strlen($key) != 32)
		throw new Exception('Invalid AES-256 key length. Key must be 32 bytes long.');

	$cipher = mcrypt_module_open('rijndael-128', '', MCRYPT_MODE_CBC, '');
	$blockSize = mcrypt_get_block_size('rijndael-128', MCRYPT_MODE_CBC);
	$initVector = substr( md5( $key ), 0, mcrypt_get_iv_size( 'rijndael-128', MCRYPT_MODE_CBC ) );

	mcrypt_generic_init($cipher, $key, $initVector);
	$encryptedData = mcrypt_generic($cipher, self::_pad($data, $blockSize));
	mcrypt_generic_deinit($cipher);
	mcrypt_module_close($cipher);
	return base64_encode($encryptedData);
}

private static function _pad($data, $blockSize)
{
	$padding = $blockSize - (strlen($data) % $blockSize);
	$pattern = chr($padding);
	return $data . str_repeat($pattern, $padding);
}

Statuses

Each of the API responses is a JSON object that contains a status value. This values indicates whether the request to the API service was successfully executed or not. The request could fail either due to a problem with the system or due to wrongly provided structure/parameters:

Status Description
0 Failed to execute the request. Please make sure you send your request as a POST request and provide the proper params and request structure.
1 The request has been successfully accepted and executed

General Errors

In case of incorrectly build request the API will respond with status 0 and will provide an error code that helps you to identify what is actually wrong. The following error codes represents problems in the API request structure:

Error code Description
101 Invalid request! You have to use HTTP Method POST for each API request
102 Invalid JSON in request! There is a synthetical error in the JSON request.
103 Invalid/Missing action! You need to provide a API action
104 Could not handle action '%1'. Implementation not available! You have provided a non-existing action
105 Incorrect API credentials. Wrong API key
106 Reached MAX requests limit of 1000 per hour

Locations

Each container has a datacenter ID as a parameter in its details - datacenter_id. This datacenter ID is also required when creating a new container instance. Based on the provided datacenter ID the container will be created in the respective datacenter. Currently available datacenters are:

Datacenter ID Datacenter Location
1 North America - Chicago
2 Europe - Amsterdam
6 Europe - London
3 Asia Pacific - Singapore

Get Active Containers

To execute this action you have to send a POST request with action name: cloudList

This API action will provide a list of all container instances in your account. The response will be a JSON array named list. This array will contain objects representing each container instance. These objects will have the following attributes representing each individual container:

Request

Name Type Description Required
offset integer Starting position of the response. By default this call will list the first 100 container records. No

Response

Name Type Description
id integer Unique identifier of the container that is automatically generated upon its creation
image string The name of the image the container instance was provisioned with
name string The name of the container that was chosen upon creation
status integer The status of the container instance. 1 – Active; 0 - Stopped
ip string Currently applied public IP address
resources object Current container resources. For stopped containers the response will only include reserved storage size.
storage_type object Storage type mounted inside container. Could be local or distributed

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudList","authorization_key":"$APIKEY",
"data":{"offset":100}}'

request={
	"action":"cloudList",
	"authorization_key":"$APIKEY",
	"data":{"offset":0}
}


{
    "data": {
        "list": [
            {
                "id": "6403",
                "image": "Wordpress Nginx",
                "ip": "185.56.84.56/24",
                "name": "name_1",
                "resources": {
                    "hdd": "20"
                },
                "status": "0",
                "storage_type": "local"
            },
            {
                "id": "20634",
                "image": "Centos LAMP",
                "ip": "109.199.118.140/24",
                "name": "name2",
                "resources": {
                    "bw": "2",
                    "cpu": "2",
                    "hdd": "40",
                    "mem": "2"
                },
                "status": "1",
                "storage_type": "local"
            }
        ]
    },
    "status": 1
}

Get Container Details

To execute this action you have to send a POST request with action name: cloudList

Request

This action will provide a detailed information for the specified container in the request. You have to provide the uniqie id of the container in the data object of the JSON request:

Name Type Description Required
container_id integer Unique id of the container instance that was automatically generated upon its creation Yes

Response

The response will be an JSON object with a key container, which is an array of attributes/objects of the specified in the request container instance:

Name Type Description
id integer Unique identifier of the container that was automatically generated upon its creation
activation_request_id integer Unique identifier of the task when this container was created
active integer The status of the container. 1 – Active; 0 – Suspended
client_id integer Identity of the contrainer owner.
container_hostname string This is an internal name of the container. Please note this is not the actual hostname of the container.
date_cteated string The date this container was created on.
image string The name of the image the container instance was provisioned with
ip string The public IP address of the container
datacenter_id integer Datacenter identifier
name string The name of the container that was chosen upon creation
resource:bw integer The bandwidth limit in TB this container can use.
resource:cpu integer The number CPU cores this container has available.
resource:mem integer The memory limit in GB this container can use.
resource:hdd integer The storage limit in GB this container can use.
terminated integer 1 - Containers has been terminated previously; 0 - Container exists

Errors

In case of failure the API will respond with one of the following errors:

Error code Description
201 Missing parameter container_id.
202 Container does not belong to your account.
203 Container with this ID doesn’t exist.

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudDetails","authorization_key":"$APIKEY","data":{"container_id":1234}}'

request={
	"action":"cloudDetails",
	"authorization_key":"$APIKEY",
	"data":{
		"container_id":1234
	}
} 


}
    "data": {
        "container": {
            "activation_request_id": 863,
            "active": 1,
            "client_id": 67093,
            "container_hostname": "c1041",
            "date_created": "2014-06-26 16:16:52",
            "id": 1234,
            "image": "Centos Plain",
            "ip": "185.56.84.11/24",
            "datacenter_id": 1,
            "name": "Server 1",
            "resources": {
                "bw": {
                    "id": "bw",
                    "value": 2
                },
                "cpu": {
                    "id": "cpu",
                    "value": 4
                },
                "hdd": {
                    "id": "hdd",
                    "value": 20
                },
                "mem": {
                    "id": "mem",
                    "value": 4
                }
            },
            "terminated": 0
        }
    },
    "status": 1
}

Create a New Container

This action will create a new container instance under your account. You have to send a POST request and action name: cloudCreate

Request

The request must have all required attributes in the JSON data object for successful creation of a new container instance. Note, that the password parameter must be encrypted. For more info please check Data Encryption:

Name Type Discription Required
name string A human-readable name you want to create the container with. Yes
password string The root user password for the container. Password should be between 10 and 50 characters, should contain at least one letter, at least one number and at least one special character/capital letter. The password MUST BE encrypted. For more info please check Data Encryption Yes
image_name string The image OS name of the image you with to provision the container with. You can find the available images by using the Get Available OS Images API action Yes
datacenter_id integer Geographic location the container to be create at. For more info refer to Locations Yes
resources:mem integer The memory limit of the container in GB Yes
resources:cpu integer The number of CPU cores for the container Yes
resources:hdd integer The storage limit of the container in GB Yes
resources:bw integer The bandwidth limit of the container in TB Yes

Response

The response of this action provides a JSON object with a key named task_id. This is an automatically generated container create task ID which can be used to identify whether the container is successfully provisioned or not. Please refer to Get Task Status action for more info. The Get Task Status action will also provide an unique ID of the newly created container instance.

Name Type Discription
task_id integer Id of the task responsible for the requested operation. You can check task's status using Get Task Status

Errors

This API action can fail with one of the following errors:

Error Code Description
204 Missing parameter name
205 Missing parameter password
206 Missing parameter dataceter_id
207 Missing parameter image
214 Incorrect parameter name
215 Incorrect parameter password
216 Incorrect parameter datacenter_id
217 Incorrect parameter image
221 Could not activate new container instance

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudCreate","authorization_key":"$APIKEY","data":{"name":"API_1","password":"adminadmin12345","image_name":"Centos LAMP","datacenter_id":1,"resources":{"mem":2,"hdd":40,"cpu":2,"bw":2}}}'

request={
	"action":"cloudCreate",
	"authorization_key":"$APIKEY",
	"data":{
		"name":"My Server",
		"password":"my_server_password",
		"image_name":"Centos LAMP",
		"datacenter_id":1,
		"resources":{
			"mem":2,
			"hdd":40,
			"cpu":2,
			"bw":2}
	}
}

{
    "data": {
        "task_id": integer
    },
    "status": 1
}

Create a new container with App

This actions will create a new container with pre-installed script application (WordPress, Joomla, Magento, etc). You have to send a POST request with action name: cloudCreate

Request

This action requires the same parameters as of Create a New Container one. However it requires addition parameters related to the specific script application parameters, such as domain, application admin username and application password. Here is the list off all parameters required to create a container with pre-installed script application:

Name Type Discription Required
name string A human-readable name you want to create the container with. Yes
password string The root user password for the container. Password should be between 10 and 50 characters, should contain at least one letter, at least one number and at least one special character/capital letter. The password MUST BE encrypted. For more info please check Data Encryption Yes
image_name string The image OS name of the image you with to provision the container with. You can find the available images by using the Get Available OS Images API action Yes
datacenter_id integer Geographic location the container to be create at. For more info refer to Locations Yes
resources:mem integer The memory limit of the container in GB Yes
resources:cpu integer The number of CPU cores for the container Yes
resources:hdd integer The storage limit of the container in GB Yes
resources:bw integer The bandwidth limit of the container in TB Yes
app_domain integer The domain name to be configured in the script application settings. In case no domain name is provided the script application will be configured with the IP address assigned to the newly created container instance No
app_password integer Script application admin password. Note that for type 4 images this parameter is not required. Password should be between 10 and 50 characters, should contain at least one letter, at least one number and at least one special character/capital letter. Yes
app_username integer The application admin username. Note that for type 4 images this parameter is not required. Username should be at least 8 characters long. Yes

Response

The response of this action provides a JSON object with a key named task_id. This is an automatically generated container create task ID which can be used to identify whether the container is successfully provisioned or not. Please refer to Get Task Status action for more info.

Name Type Discription
task_id integer Id of the task responsible for the requested operation. You can check task's status using Get Task Status

Errors

This API action can fail with one of the following errors:

Error Code Description
204 Missing parameter name
205 Missing parameter password
206 Missing parameter dataceter_id
207 Missing parameter image
209 Missing parameter admin username
214 Incorrect parameter name
215 Incorrect parameter password
216 Incorrect parameter datacenter_id
217 Incorrect parameter image
219 Incorrect parameter admin username
220 Incorrect parameter admin password
221 Could not activate new container instance

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudCreate","authorization_key":"$APIKEY","data":{"name":"WordPress","password":"adminadmin12345$","image_name":"Wordpress LAMP","datacenter_id":1,"resources":{"mem":2,"hdd":40,"cpu":2,"bw":2},"app_username":"admin12345","app_password":"mystrongpassword","app_domain":"domain.com"}}}'

request={
	"action":"cloudCreate",
	"authorization_key":"$APIKEY",
	"data":{
		"name":"WordPress",
		"password":"adminadmin12345$",
		"image_name":"Wordpress LAMP",
		"datacenter_id":1,
		"resources":{
			"mem":2,
			"hdd":40,
			"cpu":2,
			"bw":2},
		"app_username":"admin12345",
		"app_password":"mystrongpassword",
		"app_domain":"domain.com"
		}
	}
}

{
    "data": {
        "task_id": "4522"
    },
    "status": 1
}

Create new container from custom image

This action will create a new container instance from a previously created custom image. To do so you have to send a POST request with action name: cloudCreate

Request

Unlike the standard API action for new container creation the JSON request object for this action must have custom_image_id parameter, instead of image_name. You can get a list of all ids of your custom images by using the List custom images action. The rest of the parameters are the same:

Name Type Discription Required
name string A human-readable name you want to create the container with. Yes
password string The root user password for the container. Password should be between 10 and 50 characters, should contain at least one letter, at least one number and at least one special character/capital letter. The password MUST BE encrypted. For more info please check Data Encryption Yes
custom_image_id string The unique identifier of the custom image to create the container with. You can get a list of all custom images by using List custom images action Yes
datacenter_id integer Geographic location the container to be create at. For more info refer to Locations Yes
resources:mem integer The memory limit of the container in GB Yes
resources:cpu integer The number of CPU cores for the container Yes
resources:hdd integer The storage limit of the container in GB. Note that this cannot be less than the size limit of the custom image. Yes
resources:bw integer The bandwidth limit of the container in TB Yes

Response

The response of this action provides a JSON object with a key named task_id. This is an automatically generated container create task ID which can be used to identify whether the container is successfully provisioned or not. Please refer to Get Task Status action for more info.

Name Type Discription
task_id integer Id of the task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of a failure of the API service or wrongly built JSON request one of the API will return one of the following errors for this action:

Error Code Description
204 Missing parameter name
205 Missing parameter password
206 Missing parameter dataceter_id
207 Missing parameter image or custom_image_id
214 Incorrect parameter name
215 Incorrect parameter password
216 Incorrect parameter datacenter_id
258 Invalid parameter custom_image_id
221 Could not activate new container instance

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudCreate","authorization_key":"$APIKEY","data":{"name":"My Server","password":"my_server_password","datacenter_id":1,"custom_image_id":31,"resources":{"mem":2,"hdd":10,"cpu":2,"bw":2}}}'

request = {
	"action":"cloudCreate",
	"authorization_key":"$APIKEY",
	"data":{
		"name":"My Server",
		"password":"my_server_password",
		"datacenter_id":1,
		"custom_image_id":31,
		"resources":{
			"mem":2,
			"hdd":40,
			"cpu":2,
			"bw":2
		}
	}
}


{
   "status":1,
   "data":
   {
      "task_id":1094
   }
}

Get Task Status

This action will provide the status of previously executed task. To execute this action you have to send a POST request with action name: getTask

Request

In order to successfully execute this action you have to provide a correct task id within the request JSON date object:

Name Type Description Required
task_id integer Unique identifier of the task. This ID is generally provided as an response of other API actions Yes

Response

The response of this action will be a JSON object with a key task, which will be an array of the following elemets of the task:

Name Type Description
id string Task unique ID
star integer Start Datetime of the task ( milliseconds to 1970)
end integer End Datetime of the task ( milliseconds to 1970)
container_id integer This element is available only when the task represents the status of the Create a New Container action. This is the unique ID of the newly created container instance
status integer Task status: 0 - in progress; 1 - success, 2 - task failed

Errors

This action could fail with one of the following errors:

Error code Description
235 Missing parameter task_id
236 Incorrect parameter task_id

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"getTask","authorization_key":"$APIKEY","data":{"task_id":4036}}'

request={
	"action":"getTask",
	"authorization_key":"$APIKEY",
	"data":{
		"task_id":1234
	}
} 

{
    "data": {
        "task": {
            "end": 1405506269,
            "id": 1234,
            "start": 1405506265,
            "status": 1,
            "container_id": 1949 // only when this is a container create task
        }
    },
    "status": 1
}

Destroy a Container

This action will physically destroy a particular container. Please note that once destroyed the container cannot be restored. To execute this task you have to send a POST request with action named: cloudDestroy

Request

This action requires a container_id parameter to be supplied over the request. You can retrieve all unique ids of your containers using the Get Active Containers action.

Parameter Type Description Required
container_id integer Container's ID. Yes

Response

If the request is properly submitted the API will provide a task ID in the JSON response. This task_id then can be used to retrieve the status of the destroy container task.

Parameter Type Description
task_id integer Id of task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of wrongly built request or failure of the API service to execute the requested action, the API will provide one of the following erros.

Error Code Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist
222 Destroying Container instance failed

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudDestroy","authorization_key":"$APIKEY","data":{"container_id":12345}}'

request={ 
	"action":"cloudDestroy", 
	"authorization_key":"$APIKEY",
	"data":{ 
		"container_id":12345 } 
} 

{ 
	"status":1, 
	"data":{
		"task_id":566877} 
}

Reboot a container

This action will power cycle the container. To execute it you have to send a POST request with action name: cloudReboot

Request

This action requires a container_id parameter to be supplied over the request. You can retrieve all unique ids of your containers using the Get Active Containers action.

Parameter Type Description Required
container_id integer Container's ID. Yes

Response

If the request is properly submitted the API will provide a task ID in the JSON response. This task_id then can be used to retrieve the status of the reboot container task.

Parameter Type Description
task_id integer Id of task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of wrongly built request or failure of the API service to execute the requested action, the API will provide one of the following erros.

Error Code Error Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist
237 Restarting Container instance failed

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudReboot","authorization_key":"$APIKEY","data":{"container_id":123}}'

request={ 
	"action":"cloudReboot", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123 }
}

{
    "data": {
        "task_id": 4409
    },
    "status": 1
}

Start and Stop container

This action allows to instantly stop (halt) or start a previously stopped container instance. In order to do so you have to send a POST request with the respective action name:

cloudStop - stops the container
cloudStart - starts the container

Request

This action requires a container_id parameter to be supplied over the JSON request. You can retrieve all unique ids of your containers using the Get Active Containers action.

Parameter Type Description Required
container_id integer Container's ID. Yes

Response

If the request is properly submitted the API will output a JSON response with a task_id element. This task_id then can be used to retrieve the status of the executed task (stop or start container).

Parameter Type Description
task_id integer Id of task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will output one of the following errors:

Error Code Error Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist
277 Container startup sequence failed
278 Container stop sequence failed
279 Container already started
280 Container already stopped

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudStop","authorization_key":"$APIKEY","data":{"container_id":1487}}'

{ 	
	"action":"cloudStop", 	
	"authorization_key":"$APIKEY", 
	"data":
	{
		"container_id":1487
	} 
}

{
   "status":1,
   "data":
   {
      "task_id":1000
   }
}

Instantly scale a container

This action allows you to instantly change the resources of a particular container. To execute this action you have to send a POST request with action name: cloudScale

Note, that in case of memory scale down a reboot of the container is required. Also, scaling down containers storage and bandwidth is not possible.

Request

The data object of the JSON request for this action must include a container_id and a resources object. The resources object must contain value for at least one of the available container resources. You can scale a single or multiple resource types with a one request.

Parameter Type Description Required
container_id string Container's Id. Yes
resource: mem string Container's memory size in GB. Yes
resource: cpu string Number of container's CPU cores. Yes
resource: bw string Container's bandwidth in TB. Yes
resource: hdd string Size of container's disk space in GB. Yes

Response

If the request is properly submitted the API will provide a task ID in the JSON response. This task_id then can be used to retrieve the status container resources scale process.

Parameter Type Description
task_id integer Id of task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of API service failure or wrongly built JSON request the API will provide one of the following errors:

Error Code Error Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist
223 Missing parameter: "resources"
224 Incorrect scaling of resource
225 Incorrect value of resource
226 Resource scaling failed

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"cloudScale", "authorization_key":"$APIKEY", "data":{ "container_id":123, "resources":{  "mem":4,  "hdd":30, "cpu":4, "bw":2}}}'

request={
	"action":"cloudScale", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123, 
		"resources":{  
			"mem":4,  
			"hdd":30, 
			"cpu":4, 
			"bw":2
		}
	}
}

{
    "data": {
        "task_id": 4414
    },
    "status": 1
}

Billing Usage

This API command allows you to retrieve detailed usage report of one or more containers and respective billing charges. To execute this command you have to send a POST request with command name: cloudBillingUsage

The data object for the JSON request must include start key. The container_ids array and end key are optional. If the end key is not passed then it would be defaulted to current time in UTC.

In case the you do not pass an array of container_ids the API will return a list of all available active and terminated container instances assigned to the account.

Name Type Description Required
start timestamp Start date and time of the billing period in UTC unix timestamp Yes
end timestamp End date and time of the billing period in UTC unix timestamp No
container_ids array List of container IDs to get billing usage details for. No

Errors

In case of a wrongly built JSON request the API service will return one of the following errors for this action:

Error Code Description
303 Missing parameter start
331 'Invalid value for container_ids - array expected

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action" : "cloudBillingUsage", "authorization_key" : "$APIKEY", "data":{"start": 1405506265, "end" : 1405509351,"container_ids" : [ 1234, 5678 ]}}'

request={
    "action":"cloudBillingUsage",
    "authorization_key":"$APIKEY",
    "data":{
        "start": 1405506265,
        "end": 1405509351,
        "container_ids": [ 1234, 5678 ]
    }
}

{
    "data": {
        "end": 1405509351,
        "list": [
            {
                "currency": "USD",
                "id": "1234",
                "name": "name_1",
                "runtime": 5802942, #in seconds
                "usage_details": {
                    "+100GB Storage": "111.87",
                    "+2Core CPU": "44.78",
                    "+2GB RAM": "44.78",
                    "Backup": "0.00",
                    "Base Plan": "44.78",
                    "Suspended HDD Charge": "0.00"
                },
                "usage_total": "246.20"
            },
            {
                "currency": "USD",
                "id": "5678",
                "name": "name_2",
                "runtime": 3358302, #in seconds
                "usage_details": {
                    "+1Core CPU": "12.96",
                    "+1GB RAM": "12.96",
                    "+20GB Storage": "12.95",
                    "Backup": "0.00",
                    "Base Plan": "25.91",
                    "Suspended HDD Charge": "0.00"
                },
                "usage_total": "64.78"
            }  ],
        "start": 1464739200
    },
    "status": 1
}

Get available OS images

This action will provide a list of all available container images. An image is a pre-defined and configured setup a new container can be provisioned with. To retrieve this list you have to send a POST request with action name: getImages

Request

This action does not require any additional parameters to be supplied over the request.

Response

The response will be a JSON object with key images. It will contain a separate object for each image available and the key for each object will be a human-readable name of the image. Each image object will contain the following parameters describing the image details:

Parameter Type Description
image_path string Image path. Specific image name used in other API methods
name string Image name.This parameter should be used when creating new container
type integer Image type: 1 - Distribution; 2 - Stack image; 3 - App image
OS string Installed Operation System in the image

Please note that if an image gets updated the updates will not apply on already provisioned containers. For more information on how to provision a new container with a specific image, please refer to Create a New Container.

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"getImages","authorization_key":"$APIKEY","data":{}}'

request={ 
	"action":"getImages", 
	"authorization_key":"$APIKEY", 
	"data":{} 
}	 

{
    "data": {
        "images": {
            "Centos Nginx": {
                "image_path": "centos_nginx",
                "name": "Centos Nginx",
                "os": "Centos",
                "type": 2
            },
            "Centos Nginx Ghost": {
                "image_path": "centos_nginx_ghost",
                "name": "Centos Nginx Ghost",
                "os": "Centos",
                "type": 4
            },
            "Centos Plain": {
                "image_path": "centos_plain",
                "name": "Centos Plain",
                "os": "Centos",
                "type": 1
            }
        }
    },
    "status": 1
}

Get available App images

The Kyup application images are images that contain pre-installed and configured script applications, such as WordPress, Joomla, Magento, etc. In order to retrieve the available application images you have to use the Get available OS images. Each of the available images has a type parameter. Images with type 3 and 4 are application images.

Depending on the type the application image requires additional input parameters when provisioning a new container. These is used in the application setup process and can be, but is not limited to, application admin username, application admin password, domain name, etc. Below you will find all required parameters for each application image type:

Type Input Parameters Requred
3 app_username
app_password
app_domain
Yes
Yes
No
4 app_domain No

(more…)


{
    "data": {
        "images": {
            "Wordpress Nginx": {
                "image_path": "centos_nginx_joomla_wp",
                "name": "Wordpress Nginx",
                "os": "Centos",
                "type": 3
            }
            "Centos Nginx Ghost": {
                "image_path": "centos_nginx_ghost",
                "name": "Centos Nginx Ghost",
                "os": "Centos",
                "type": 4
            }
        }
    },
    "status": 1
}

Create custom image

This action allows to create a custom image from an existing container instance. This image represents a complete snapshot of the container. Then this image can be used to create a new container. To execute this action you have to send a POST request with action name: createCustomImage

Request

To successfully execute this action you have to provide container_id and name parameters within the data object of the JSON request. You can get the IDs of all your containers by using the Get Active Containers action.

Name Type Description Required
container_id integer The ID of container to create the custom image from. Yes
name string Name of the new custom image Yes

Response

The response of this action provides a JSON object with a key named task_id. This is an automatically generated task ID which can be used to identify whether the operation is successful executed or not. Please refer to Get Task Status action for more info.

Name Type Discription
task_id integer Id of the task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of a failure of the API service or wrongly built JSON request one of the API will return one of the following errors for this action:

Error code Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist
259 Missing parameter name
260 Invalid parameter name
261 Duplicate image name
262 Image cration failed

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"createCustomImage","authorization_key":"$APIKEY","data":{"container_id":123,"name":"my custom image"}}'

request={
	"action":"createCustomImage",
	"authorization_key":"$APIKEY",
	"data":{
		"container_id":123,
		"name":"my custom image"
	}
}

{
   "status":1,
   "data":
   {
      "task_id":1094
   }
}

List custom images

This API action will return a list of all custom images within your account. To get this list you have to send a POST request with action name: listCustomImages

Request

This action requires only successful authentication. It does not require any additional data or parameters.

Response

This API action will return a JSON object with an array named list. This will be an array of objects each of which will provide details about each custom image within your account. In case there are no custom images the array will be empty. Each custom image will have the following parameters:

Name Type Description
id integer Unique identifier of the custom image. Used when creating a new container or when deleting a custom image
name string Human-readable name of the image set upon its creation
size string Storage limit in Gb of the container the custom image was created from. Note, that when creating a new container from this image, the container cannot be provisioned with less storage than this

Errors

In case of a failure the API service will return on of the General Errors.

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"listCustomImages","authorization_key":"$APIKEY","data":{}}'

request = { 	
	"action":"listCustomImages", 	
	"authorization_key":"$APIKEY", 
	"data":{} 
}

{
    "data": {
        "list": [
            {
                "id": "20",
                "name": "my image",
                "size": 20
            }
        ]
    },
    "status": 1
}

Delete custom image

This action will permanently delete a custom image. Note, that once deleted the process can not be reverted. To execute this action you have to send a POST request with action name: removeCustomImage

Request

In order to delete a custom image you have to provide a correct custom_image_id within the JSON request object. To retrieve all ids of your custom images you have to use the List custom images action.

Name Type Discription Required
custom_image_id integer Unique identifier of the custom image to be deleted Yes

Response

The response of this action provides a JSON object with a key named task_id. This is an automatically generated task ID which can be used to identify whether the operation is successful executed or not. Please refer to Get Task Status action for more info.

Name Type Discription
task_id integer Id of the task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of failure of the API service or wrongly built JSON request the API will return one of the following errors:

Error code Description
257 Missing parameter custom_image_id
258 Invalid parameter custom_image_id
263 Image delition failed

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"removeCustomImage","authorization_key":"$APIKEY","data":{"custom_image_id":20}}'

request = { 	
	"action":"removeCustomImage", 	
	"authorization_key":"$APIKEY", 
	"data":{
		"custom_image_id":20
		} 
}


{
    "data": {
        "task_id": 5258
    },
    "status": 1
}

Add Scheduled Scale event

This action will create a new scheduled scale event to the Scheduled Scale configuration of the container. The Scheduled Scale is a Kyup service that will automatically update the container's resources based on predefined events, that consists of date and time when the scale to occur and values of the resources to be applied on the container.

To create a new schduled event you have to send a POST request with action name: scaleAdd

Request

The data object of the JSON request must have a valid value for the container_id element and a time element. The time must be provided in unix timestamp format. It also must have a nested object named resources that should have at least one element for a resource to be changed. Resources could be mem, cpu, hdd or bw.

The scheduled scale feature also supports call back function, which means that upon scale the system will try to connect to the provided API endpoint callback_url and send scale even details (find more info at #url).

Parameter Type Description Required
container_id string Container's Id. Yes
time string Date and Time when the event will be processed. Unix timestamp format required Yes
resource: mem string New Container's memory size in GB. Yes
resource: cpu string New Number of container's CPU cores. Yes
resource: bw string New Container's bandwidth in TB Yes
resource: hdd string New Size of container's disk space in GB. Yes
callback_url string Callback API endpoint to ping upon scale event No
callback_auth_user string Callback API username; Required only if callback_url parameter is present in the request; 7-9 chars No
callback_auth_pass string Callback API password; Required only if callback_url parameter is present in the request; 5-20 chars No

Please note that scaling down of RAM requires a reboot of your server in order to take effect. Also, note that scaling down of the HDD is currently not supported.

Response

The API service will respond with a JSON object data and a status value. It will also provide a scale_id element which is an unique identifier of the newly created scheduled event.

Name Type Description
scale_id integer Unique identifier of the scheduled scale event

Errors

In case of a failure of this API action to complete, one of the following errors will be provided in the JSON response:

Error Code Error Description
201 Missing parameter "container_id"
202 Container does not belong to your identity
203 Container doesn't exist
223 Missing parameter: "resources"
224 Incorrect scaling of resource
225 Incorrect value of resource
228 Incorrect time specified.
255 Missing parameter time
229 Could not create schedule event

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleAdd", "authorization_key":"$APIKEY", "data":{ "container_id":958, "time":"1406199544", "callback_url":"https://some.url/here","callback_auth_user":"api_user","callback_auth_pass":"password@1234", "resources": {  "mem":2,  "hdd":20, "cpu":2, "bw":2 } } }'

request={ 
	"action":"scaleAdd", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":958, 
		"time":"1406199544", 
		"callback_url":"https://some.url/here",
		"callback_auth_user":"api_user",
		"callback_auth_pass":"password@1234",
		"resources": {  
			"mem":2,  
			"hdd":20, 
			"cpu":2, 
			"bw":2 
		} 
	} 
} 

{
    "data": {
        "scale_id": 123
    },
    "status": 1
}

Edit Scheduled Scale event

This action allows you to modify an existing scheduled scale event. To to do so you have to send a POST request with action name: scaleEdit

Request

The data object of the JSON request must have a valid value for the scale_id element. You can retrieve the IDs of all existing scheduled scale events by using the Get Scheduled Scale events action. All parameters required by this action are described below:

Parameter Type Description Required
scale_id integer Scale event Id. Yes
time string Date and Time when the event will be processed. Unix timestamp format required Yes
resources: mem integer New Container's memory size in GB. No
resources: cpu integer New Number of container's CPU cores. No
resources: bw integer New Container's bandwidth in TB. No
resources: hdd integer New Size of container's disk space in GB. No
callback_url string Callback API endpoint to ping upon scale event No
callback_auth_user string Callback API username; Required only if callback_url parameter is present in the request; 7-9 chars No
callback_auth_pass string Callback API password; Required only if callback_url parameter is present in the request; 5-20 chars No

Response

The API service will respond with a JSON object data and a status value. The data object will contain the following records:

Name Type Description
Success integer Scheduled scale event update result. 1 - successfully updated; 0 - failed to update the event

Erros

In case of a failure of this API action to complete, one of the following errors will be provided in the JSON response:

Error Code Error Description
201 Missing parameter "container_id"
202 Container does not belong to your identity
203 Container doesn't exist
223 Missing parameter: "resources"
224 Incorrect scaling of resource
225 Incorrect value of resource
227 Incorrect time specified format should be MM/DD/YYYY HH:MM
229 Could not edit schedule event
228 Incorrect time specified.
255 Missing parameter time

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleEdit", "authorization_key": "$APIKEY", "data":{ "scale_id":102, "time":"1406199544", "resources":{ "mem":4, "hdd":20, "cpu":4, "bw":2 } } }'

request={
	"action":"scaleEdit",
	"authorization_key": "$APIKEY", 
	"data":{
		"scale_id":91,
		"time":"1406199544",
		"resources": { 
			"mem":4, 
			"hdd":20,
			"cpu":4,
			"bw":2
		}
	}
}

{
    "data": {
        "Success": 1
    },
    "status": 1
}

Delete Scheduled Scale event

This action will delete a previously created scheduled scale event for the specified container. To execute this action you have to send a POST request with action name: scaleDelete

Request

This action requires a valid scale_id parameter within the data object of the JSON request structure:

Name Type Description Required
scale_id integer The ID of the scale event to edit Yes

In case you need to retrieve all IDs of the scheduled scale events for the container, you have to use the Get Scheduled Scale events action.

Response

The API service will respond with a JSON object data and a status value. The data object will contain the following records:

Name Type Description
Success integer Scheduled scale event deletion result. 1 - successfully deleted; 0 - failed to delete the event

Errors

In case of a failure of this API action to complete, one of the following errors will be provided in the JSON response:

Error Error Description
202 Container does not belong to your identity. This means that you are trying to delete a schedule ID configured for a container you do not have access to.
232 Incorrect scheduled event_id. This means that event with the provided ID does not exist.
233 Missing parameter scale_id
234 Could not delete scheduled event

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleDelete", "authorization_key":"$APIKEY", "data":{"scale_id":123} }'

request={ 
	"action":"scaleDelete", 
	"authorization_key":"$APIKEY", 
	"data":{
		"scale_id":123
	} 
}

{
    "data": {
        "Success": 1
    },
    "status": 1
}

Get Scheduled Scale events

This action will provide a list of all scheduled events for the container. To execute this action you have to send a POST request with action name: scaleGetEvents

Request

The only required parameter for this action is container_id:

Name Type Descriptoion Required
container_id integer The unique ID of the container. You can retrieve all containers' IDs using the Get Active Containers action Yes

Response

If a valid container ID is provided the API will return a JSON array events, which will contain objects representing each existing scheduled event for the container. Each of the scheduled events object will have the following values:

Name Type Description
id integer Scale Event ID
time string The date and time of the scheduled event in unix timestamp format
status integer 1- the event has been processed , 0 - the event has not been processed yet, 2 - failed to process scheduled scale
resources object The resources configured to be applied to the container
callback_url string Scale event callback API url

In case there are no scheduled scale events for the container API will respond with an empty events array.

Errors

In case of failure the API will respond with one of the following errors:

Error code Description
201 Missing parameter container_id.
202 Container does not belong to your account.
203 Container with this ID doesn’t exist.

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleGetEvents", "authorization_key":"$APIKEY", "data":{ "container_id":123 } }'

request={ 
	"action":"scaleGetEvents", 
	"authorization_key":"$APIKEY", 
	"data":{
		"container_id":123
	} 
} 

{
    "data": {
        "events": [
            {
                "id": "108",
                "callback_url": "https://some.url/here",
                "time": "1406126759",
                "resources": {
                    "bw": { "value": 2 }, //TB
                    "cpu": { "value": 4 }, //number of cores
                    "hdd": { "value": 20 }, //GB
                    "mem": { "value": 4} //GB
                },
                "status": "0",
            },
            {
                "id": "109",
                "time": "1406326877",
                "resources": {
                    "bw": { "value": 2 }, //TB
                    "cpu": { "value": 4 }, //number of cores
                    "hdd": { "value": 20 }, //GB
                    "mem": { "value": 4 } //GB
                },
                "status": "0",
            }
        ]
    },
    "status": 1
}

Enable Auto Scale policy

This action enables an existing Auto Scale policy. You can enable or just modify the policy parameters at the same time. You can also enable/modify multiple resource policies with a single request. To do so you have to send a POST request wth action name: scaleSaveAutoscale

Request

The data object of this action must include the ID of the container and a resources object. The resources object must include at least one resource type or multiple resource types object. To enable the respective resource type auto scale policy you have to set the value for the active parameter to 1.

The autoscale feature also supports call back function, which means that upon autoscale event the system will try to connect to the provided API endpoint callback_url and send scale even details (find more info at #url).

List of all parameters for this action follows:

Name Type Description Required
container_id integer The unique ID of the container you want to enable the auto scale policy for Yes
resources:type object The resource type you want to enable auto scale policy for. Available resource types are: mem, cpu, hdd, bw Yes
resources:type:active integer New status of the policy. Set this to 1 in order to enable the respective auto scale policy Yes
resources:type:threshold integer Threshold which will activate the auto - scaling process. Accepted values are 30, 50,70, 90 No
resources:type:step integer Value to increase. Please refer to Get Auto Scale policies Detailed response for the available options for the respective resource type No
resources:type:max integer Maximum of memory resource. When it is reached, auto-scale process will not be triggered. No
callback_url string Callback API endpoint to ping upon scale event No
callback_auth_user string Callback API username; Required only if callback_url parameter is present in the request; 7-9 chars No
callback_auth_pass string Callback API password; Required only if callback_url parameter is present in the request; 5-20 chars No

Response

The API service will respond with a JSON object data and status value. The data object will contain the following records:

Name Type Description
Success integer Scheduled scale event deletion result. 1 - successfully deleted; 0 - failed to delete the event

Errors

In case of a failure one of the following errors will be provided in the JSON response:

Error code Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist
223 Missing parameter resources
224 Incorrect scaling resource. Available resources are mem, cpu, hdd and bw
225 Incorrect value of resource
243 Autoscaling failed to update

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleSaveAutoscale", "authorization_key":"$APIKEY", "data":{ "container_id":123, "callback_url":"https://some.url/here","callback_auth_user":"api_user","callback_auth_pass":"password@1234", "resources":{ "mem":{ "active":1, "threshold":90, "step":2, "max":8 } } } }'

request={ 
	"action":"scaleSaveAutoscale", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123, 
		"callback_url":"https://some.url/here",
		"callback_auth_user":"api_user",
		"callback_auth_pass":"password@1234",
		"resources":{ 
			"mem":{ 
				"active":1, 
				"threshold":90, 
				"step":2, 
				"max":8 
			} 
		} 
	} 
}

{
	"data":{"Success":1},
	"status":1,
}

Disable Auto Scale policy

This action disables a resource auto scale policy of a container. You can either disable a single or multiple policies with a single POST request to the API. To do so you have to use the scaleSaveAutoscale action as described in Enable Auto Scale policy section.

In order to disable an autoscale policy you have to set the element active to 0. In that case the rest of the resources JSON object elements are not required.

Please review the example on right, which shows a proper structure of the JSON request.
(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleSaveAutoscale", "authorization_key":"$APIKEY", "data":{ "container_id":123, "resources":{ "mem":{ "active":0  },"cpu":{ "active":0  } } } }'

request={ 
	"action":"scaleSaveAutoscale", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123, 
		"resources":{ 
			"mem":{ "active":0  }, 
			"cpu":{ "active":0  } 
		} 
	} 
}

{
	"data":{"Success":1},
	"status":1,
}

Modify Auto Scale policy

This action modifies a resource auto scale policy of a container. You can modify either a single or multiple policies with a single POST request to the API. To do so you have to use the scaleSaveAutoscale action as described in Enable Auto Scale policy section.

With this action you can disable or enable resource auto scale policies or modify the parameters of such. The available resource auto scale policies are Memory, CPU, HDD and Bandwidth. Each of them is represented in the JSON request respectively as mem, cpu, hdd, bw.

Please review the example on right, which shows a proper structure of the JSON request.

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleSaveAutoscale", "authorization_key":"$APIKEY", "data":{ "container_id":123, "resources":{ "mem":{ "active":1, "threshold":90, "step":2, "max":8 } } } }

request={ 
	"action":"scaleSaveAutoscale", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123, 
		"resources":{ 
			"mem":{ "active":1, "threshold":90, "step":2, "max":8 },
			"cpu":{ "active":1, "threshold":90, "step":2, "max":8 },
			"hdd":{ "active":0 },
			"bw":{ "active":0 } 
		} 
	} 
}

{
	"data":{"Success":1},
	"status":1,
}

Get Auto Scale policies

This action provides the state and params of all Auto Scale policies for the respective container. It can also provide available configuration params for each resource's auto scale policy.

To access this API service send a POST request with action name: scaleGetAutoscale

Request

The data object of the JSON request must contain container_id value. You can retrieve all unique ids of your containers using the Get Active Containers action. You can also request a detailed information of all available options for each auto scale policy by providing a value for the get_options parameter. So, this action supports the following parameters:

Name Type Description Required
container_id integer The container's ID to retrieve auto scale policies for Yes
get_options integer If set to 1 the response will include all available auto scale options for each policy No

Response

The API will provide a response in a JSON format that will contain an object named autoscales which will contain sub-objects for each resource type policy. Those could be cpu, hdd, mem and bw. Each of the resource type sub-objects will contains the current configuration of each policy as follows:

Name Type Description
autoscales:type object Auto scale policy type. Could be mem, cpu, hdd or bw.
autoscales:type:active intiger Status of the auto scale policy. 0 - is not active; 1 - is active;
autoscales:type:cap integer The maximum value for the respective resource type. Once reached the auto scale process stops.
autoscales:type:current integer The current allocation of the respective resource type
autoscales:type:max integer Same as autoscales:type:cap
autoscales:type:min integer The minimum value for the respective resource type. Used for auto scale down. This feature is currently not live yet.
autoscales:type:name string Human readable name of the respective resource type
autoscales:type:price string Detailed price format of the respective resource type
autoscales:type:priceRaw float Raw format of the price for this resource
autoscales:type:step integer Amount of resource to be added upon auto scale
autoscales:type:threshold integer The limit of resource usage in percentage upon which auto scale is triggered.
autoscales:type:unit string Measurement unit for the respective resource type
callback_url string Scale event callback API url

Detailed response

As previously mentioned this API action can also provide you with information on the available configuration for each auto scale policy. In other words it can tell the exact possible values for each auto scale policy.

As you already may noticed the primarily auto scale parameters are cap, threshold and step. The available values for each of those are provided in the API response as nested objects of the resource type object.

Each options JSON nested object is a list of string elements that represent the available values for the respective auto scale. Example:

"autoscales": { "cpu": { "cap_options": { "5": "5 Cores", "6": "6 Cores", "7": "7 Cores", "8": "8 Cores" } } },

The key of each element could be used as integer value of the available option. The table below list the currently available options objects:

Name Description
cap_options The available values that can be set as a maximum for the respective auto scale policy type
threshold_options The available values that can be set as thresholds for the respective auto scale policy type
step_options The available values that can be set as increase step for the respective auto scale policy type

The detailed response of this API action is generally very useful when developing a front end interface that provides the end user with the ability to configure auto scale policies for his container.

Errors

In case of a wrongly configured JSON request or failure of the API service the response may contain one of the following errors:

Error Code Description
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container doesn't exist

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"scaleGetAutoscale", "authorization_key":"$APIKEY", "data":{ "container_id":123,"get_options":1} }'

request={ 
	"action":"scaleGetAutoscale", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123,
		"get_options":1} }
	}
}

{
    "data": {
        "autoscales": {
            "bw": {
                "active": "0",
                "cap": "2",
                "cap_options": {"2": "2 TB"},
                "current": "2",
                "max": 2,
                "min": 2,
                "name": "Bandwidth",
                "price": "$0.20 per additional GB",
                "priceRaw": 0.2016,
                "step": "1",
                "step_options": {"1": "1 TB"},
                "threshold": "90",
                "threshold_options": {
                    "30": "30%",
                    "50": "50%",
                    "70": "70%",
                    "90": "90%"
                },
                "unit": "TB",
                "unitPlural": "TB"
            },
            "cpu": {
                "active": "1",
                "cap": "8",
                "cap_options": {
                    "5": "5 Cores",
                    "6": "6 Cores",
                    "7": "7 Cores",
                    "8": "8 Cores"
                },
                "current": "4",
                "max": 8,
                "min": 2,
                "name": "CPU",
                "price": "$10.00 per additional CPU Core",
                "priceRaw": 10.0008,
                "step": "1",
                "step_options": {
                    "1": "1 Cores",
                    "2": "2 Cores",
                    "3": "3 Cores",
                    "4": "4 Cores"
                },
                "threshold": "90",
                "threshold_options": {
                    "30": "30%",
                    "50": "50%",
                    "70": "70%",
                    "90": "90%"
                },
                "unit": "Core",
                "unitPlural": "Cores"
            },
            "hdd": {
                "active": "0",
                "cap": "40",
                "cap_options": {
                    "100": "100 GB",
                    "110": "110 GB",
                    "120": "120 GB",
                    "130": "130 GB",
                    "140": "140 GB",
                    "150": "150 GB",
                    "160": "160 GB",
                    "30": "30 GB",
                    "40": "40 GB",
                    "50": "50 GB",
                    "60": "60 GB",
                    "70": "70 GB",
                    "80": "80 GB",
                    "90": "90 GB"
                },
                "current": "20",
                "max": 160,
                "min": 20,
                "name": "Storage",
                "price": "$5.00 per additional 10 GB",
                "priceRaw": 0.49968,
                "step": "10",
                "step_options": {
                    "10": "10 GB",
                    "100": "100 GB",
                    "110": "110 GB",
                    "120": "120 GB",
                    "130": "130 GB",
                    "140": "140 GB",
                    "20": "20 GB",
                    "30": "30 GB",
                    "40": "40 GB",
                    "50": "50 GB",
                    "60": "60 GB",
                    "70": "70 GB",
                    "80": "80 GB",
                    "90": "90 GB"
                },
                "threshold": "90",
                "threshold_options": {
                    "30": "30%",
                    "50": "50%",
                    "70": "70%",
                    "90": "90%"
                },
                "unit": "GB",
                "unitPlural": "GB"
            },
            "mem": {
                "active": "1",
                "cap": "8",
                "cap_options": {
                    "5": "5 GB",
                    "6": "6 GB",
                    "7": "7 GB",
                    "8": "8 GB"
                },
                "current": "4",
                "max": 8,
                "min": 2,
                "name": "RAM",
                "price": "$10.00 per additional GB",
                "priceRaw": 10.0008,
                "step": "2",
                "step_options": {
                    "1": "1 GB",
                    "2": "2 GB",
                    "3": "3 GB",
                    "4": "4 GB"
                },
                "threshold": "90",
                "threshold_options": {
                    "30": "30%",
                    "50": "50%",
                    "70": "70%",
                    "90": "90%"
                },
                "unit": "GB",
                "unitPlural": "GB"
            }
        },
        "callback_url": "https://some.url/here"
    },
    "status": 1
}

Scale callback URL action

The Kyup scheduled and autoscale systems both support callback function, which means the system automatically provide scale event information to the provided API endpoint. This is especially helpful when you want to have your own service management system to be pinged whenever a container resources get scaled. In order to setup a callback URL you have to provide callback_url parameter within the configuration request structure for the respective scale type as shown in the documentation.

In case the callback URL is protected you have to also provide callback_auth_user and callback_auth_pass needed for our system to authenticate to the configured endpoint. Note, that the only supported authentication method is basic HTTP auth via Authorization header. As an additional security precaution you can limit access to the callback URL only to IPs of Kyup.

On right you can see the data object being sent via POST request to the callback endpoint.

(more…)


request={
	"container_id": 1234,
	"scale_type": auto/scheduled
	"container_name": "My container",
	"cpu": {
		"current": 2,
		"added_units": 1,
		"original": 1,
		"step": 1, //only if type auto
		"threshold": 90, //only if type auto
		"unit": "Core",
		"unitPlural": "Cores"
	}
	"mem": {
		"current": 3,
		"added_units": -1,
		"original": 4,
		"step": 1, //only if type auto
		"threshold": 90, //only if type auto
		"unit": "GB",
		"unitPlural": "GB"
	}
}

Create a DNS zone

This action provides the ability to create a DNS zone file within the Kyup DNS system. In order to do so you have to send a POST request to the API with action: nsAddDomain

Please note, that in order for the DNS zone file to take action the respective domain name have to be pointed to the Kyup's name servers as follows:

NS1: nimbus.kyup.com (181.224.128.6)
NS2: cumulus.kyup.com (198.20.77.76)

Request

The data object of this action must have valid container_id and domain elements. The DNS zone will be created with records representing the IP address of the container with the provided identifier. You can check your containers IDs by using the Get Active Containers action. A list of the required elements for this action follows:

Name Type Description Required
container_id integer The DNS zone will be created with records pointing to the IP address of the container with the provided ID Yes
domain string Fully qualified domain name to create a DNS zone for Yes

Response

The response of this API action will provide a status and a JSON data object with a domain_id element. This element represents an unique identifier of the newly created domain DNS zone and can be used later to preview, edit or delete the zone.

Name Type Description
domain_id integer Unique identified of the newly created DNS zone

Erros

In case of a wrongly structured JSON request or failure of the API to execute the task it will provide a response with a General Error or one of the following errors for this specific action:

Error Code Description
208 Missing parameter domain
218 Incorrect parameter domain
298 Invalid domain name
299 You have chosen unavailable domain name
269 Failed to add domain
300 Failed to add domain zone

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsAddDomain","authorization_key":"$APIKEY","data":{"container_id":123,"domain":"domain.com"}}'

request={
	"action":"nsAddDomain",
	"authorization_key":"$APIKEY",
	"data":{
		"domain" : "domain.com",
		"container_id" : 123,
	}
}

{
    "data": {
        "domain_id": 236
    },
    "status": 1
}

Remove a DNS zone

This action will delete an existing DNS zone file part of your Kyup account. In order to do so you have to send a POST request with action name: nsRemoveDomain

Request

Name Type Description Required
domain_id integer Unique ID of the zone file to be deleted. To get a list of all zone files use the List all DNS zones action Yes

Response

Upon success the API service will provide a JSON response with status code 1.

Erros

In case of a wrongly structured JSON request or failure of the API to execute the task it will provide a response with a General Error or one of the following errors for this specific action:

Error Code Description
265 Missing parameter domain_id
266 Incorrect parameter domain_id
291 Domain doesn't exist
292 Domain does not belong to your identity

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsRemoveDomain","authorization_key":"$APIKEY","data":{"domain_id":236}}'

request={
	"action":"nsRemoveDomain",
	"authorization_key":"$APIKEY",
	"data":{
		"domain_id" : 236,
	}
}

{
    "data": {
        "status": 1
    },
    "status": 1
}

List all DNS zones

This API action will provide a list of all domain DNS zone files active for your Kyup account. In order to to execute it you have to send a POST request with action name: nsListDomains

Request

In order to successfully retrieve a list of all your domain DNS zones you have to provide a valid API key and an empty data JSON object.

Response

The JSON response of this action will be a data object containing a list array. This array will contain objects representing the informational elements of each individual DNS zone file as follows:

Name Type Description
id integer Unique identified of the DNS zone file. Can be used to preview, edit or delete the zone.
domain string The domain name this DNS zone file was created for
ip string IP address of the container chosen upon the creation of the zone file
container_id integer The ID of the container chosen upon the creation of the zone file

Erros

In case of wrongly structured JSON request the API service will provide with response containing a general error.

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsListDomains","authorization_key":"$APIKEY","data":{}}'

request={
	"action":"nsListDomains",
	"authorization_key":"$APIKEY",
	"data":{}
}

{
    "data": {
        "list": [
            {
                "container_id": 123,
                "domain": "domain.com",
                "id": 127,
                "ip": "185.56.84.5"
            },
            {
                "container_id": 234,
                "domain": "domain1.com",
                "id": 185,
                "ip": "185.56.84.11"
            }
        ]
    },
    "status": 1
}

List a DNS zone

Using this action you can preview a specific DNS zone file and its records. To do so you have to send a POST request with action name: nsList

Request

Name Type Description Required
domain_id integer Unique ID of the zone file to be listed. To get a list of all zone files use the List all DNS zones action

Response

The API will provide a JSON response of a list object containing nested objects named from 0 to N. Each record of the DNS zone file represents a respective JSON nested object. This name can be later used to modify an individual DNS zone file record. Each of the nested objects contains the following elements of the respective DNS zone file record:

Name Type Description
type string Type of the DNS record. Could be A, AAAA, CNAME, MX, TXT, NS, SRV
record string The name or alias defined for the respective record
ttl integer Time to live for the respective record
data string Variable data for the respective record depending on its type. For MX record type the priority is provided as a number separated by space before the mail exchange server hostname.

Erros

In case of a wrongly structured JSON request or failure of the API to execute the task it will provide a response with a General Error or one of the following errors for this specific action:

Error Code Description
265 Missing parameter domain_id
266 Incorrect parameter domain_id
292 Domain does not belong to your identity

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsList","authorization_key":"$APIKEY","data":{"domain_id":127}}'

request={
	"action":"nsList",
	"authorization_key":"$APIKEY",
	"data":{
		"domain_id" : "integer"
	}
}

{
    "data": {
        "list": {
            "0": {
                "data": "185.56.84.5",
                "record": "@",
                "ttl": 86400,
                "type": "A"
            },
            "1": {
                "data": "185.56.84.5",
                "record": "www",
                "ttl": 86400,
                "type": "A"
            },
            "2": {
                "data": "185.56.84.5",
                "record": "ftp",
                "ttl": 86400,
                "type": "A"
            },
            "3": {
                "data": "185.56.84.5",
                "record": "mail",
                "ttl": 86400,
                "type": "A"
            },
            "4": {
                "data": "185.56.84.5",
                "record": "webmail",
                "ttl": 86400,
                "type": "A"
            },
            "5": {
                "data": "127.0.0.1",
                "record": "localhost",
                "ttl": 86400,
                "type": "A"
            },
            "6": {
                "data": "10 mail.domain.com",
                "record": "@",
                "ttl": 86400,
                "type": "MX"
            }
        }
    },
    "status": 1
}

Add a DNS zone record

This action allows you to add a DNS zone file records. In order to do so you have to send a POST request with action name: nsAdd

Request

The data object of the JSON request for this action must have a domain_id element which represents the zone file the record to be added to. To retrieve a zone file ID use the List all DNS zones action. In addition the object must have the following elements to build a proper DNS zone record:

Name Type Description Required
domain_id integer Unique id of the domain zone file to add a record to. To retrieve a zone file ID use the List all DNS zones action Yes
type string Type of the record. Could be A, AAAA, CNAME, MX, TXT, NS, SRV Yes
record string The name or alias defined for the record. If empty it defaults to @ Yes
data string Variable data for the record depending on its type Yes
priority integer Priority of an MX record. This element is mandatory only when adding an MX record type No

Response

Upon success the API service will provide a JSON data object with a status code element with value 1.

Erros

In case of a wrongly structured JSON request or failure of the API to execute the task it will provide a response with a General Error or one of the following errors for this specific action:

Error Code Description
265 Missing parameter domain_id
266 Incorrect parameter domain_id
267 Incorrect parameter type
271 Invalid record. Only alphanumeric characters and . - _ @ : are allowed
272 Invalid IP address
273 Invalid Hostname
274 MX Priority must be a positive integer
275 Invalid data. Only alphanumeric characters and . - _ @ are allowed
276 Invalid data
287 Missing parameter type
291 Domain doesn't exist
292 Domain does not belong to your identity
295 Failed to save DNS record
296 Failed to add DNS record

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsAdd","authorization_key":"$APIKEY","data":{"domain_id":237,"type":"A","record":"sub","data":"192.168.0.1"}}' 

request={
	"action":"nsAdd",
	"authorization_key":"$APIKEY",
	"data":{
		"domain_id" : 237,
		"type" : "A",
		"record" : "sub",
		"data" : "192.168.0.1"
	}
}

{
    "data": {
        "status": 1
    },
    "status": 1
}

Remove a DNS zone record

This action allows you do permanently remove an individual record from a DNS zone file of your account. In order to do so you have to send a POST request with action name: nsRemove

Request

The JSON data object for this action must have a valid domain_id element, which is the unique ID of the zone file to remove a record from, and record_number element which is the row number of the record to be removed. To retrieve the row number of the record use the List a DNS zone action.

Name Type Description Required
domain_id integer Unique ID of the zone file to remove a record from. To get a list of all zone files use the List all DNS zones action Yes
record_number integer Unique row number of the record to be deleted. For more info refer to List a DNS zone Yes

Response

Upon success the API service will provide a JSON data object with a status code element with value 1.

Erros

In case of a wrongly structured JSON request or failure of the API to execute the task it will provide a response with a General Error or one of the following errors for this specific action:

Error Code Description
265 Missing parameter domain_id
266 Incorrect parameter domain_id
286 Missing parameter record_number
289 Incorrect parameter record_number
291 Domain doesn't exist
292 Domain does not belong to your identity
293 DNS records not found
295 Failed to save DNS record
297 Failed to remove DNS record
(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsRemove","authorization_key":"$APIKEY","data":{"domain_id":237,"record_number":7}}'

request={
	"action":"nsRemove",
	"authorization_key":"$APIKEY",
	"data":{
		"record_number" : 7,
		"domain_id" : 237
	}
}

{
	"status":1,
	"data":{
		"status": 1
	}
}

Modify a DNS zone record

This API action allows you to modify an existing DNS record of a zone file. In order to do so you have to send a POST request with action name: nsEdit

Request

The JSON data object for this request must have a valid domain_id element, which is the unique ID of the zone file to remove a record from, and record_number element which is the row number of the record to be removed. To retrieve the row number of the record use the List a DNS zone action. The value of the last element is the new variable data for the receptive record being modified:

Name Type Description Required
domain_id integer Unique ID of the zone file the record belongs to. To get a list of all zone files use the List all DNS zones action Yes
record_number integer Unique row number of the record to be modified. For more info refer to List a DNS zone Yes
data string New variable data for the record depending on its type Yes

Response

Upon success the API service will provide a JSON data object with a status code element with value 1.

Erros

In case of a wrongly structured JSON request or failure of the API to execute the task it will provide a response with a General Error or one of the following errors for this specific action:

Error Code Description
265 Missing parameter domain_id
266 Incorrect parameter domain_id
286 Missing parameter record_number
288 Missing parameter data
289 Incorrect parameter record_number
291 Domain doesn't exist
292 Domain does not belong to your identity
293 DNS records not found
294 Failed to update DNS record
295 Failed to save DNS record

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"nsEdit","authorization_key":"$APIKEY","data":{"domain_id":237,"record_number":7,"data":"192.168.0.2"}}'

request={
	"action":"nsEdit",
	"authorization_key":"$APIKEY",
	"data":{
		"record_number" : 7,
		"domain_id" : 237,
		"data" : "192.168.0.2"
	}
}

{
    "data": {
        "status": 1
    },
    "status": 1
}

Change password

This action can be used to change the root password of a container. You have to send a POST request with action name: cloudChangePassword

Request

The data object of the JSON request must have a container_id element with a valid id of the container the root password to be changed for. You can retrieve all unique ids of your containers using the Get Active Containers action. The new password for the root user of the container should be provided as a string value of the password element. Note, that the password parameter must be encrypted. For more info please check Data Encryption. All required parameters for this action are:

Parameter Type Description Required
container_id integer Container's ID. Yes
password string New password for the root user of the container. Password should be between 10 and 50 characters, should contain at least one letter, at least one number and at least one special character/capital letter. The password MUST BE encrypted. For more info please check Data Encryption Yes

Response

If the request is properly submitted the API will provide a task ID in the JSON response. This task_id then can be used to retrieve the status of password change operation.

Parameter Type Description
task_id integer Id of task responsible for the requested operation. You can check task's status using Get Task Status

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

Error Code Description
201 Missing parameter "container_id"
202 Container with this ID doesn't belong to your identity
203 Container with that ID doesn't exist
205 Missing parameter "password"
246 Password should be 10-50 characters
247 Password is not strong enough
248 Password change failed

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"cloudChangePassword", "authorization_key":"$APIKEY", "data":{"container_id":123,"password":"newpassword"} }'

request={ 
	"action":"cloudChangePassword", 
	"authorization_key":"$APIKEY", 
	"data":{
		"container_id":123,
		"password":"newpassword",
	} 
}


{
    "data": {
        "task_id": 4489
    },
    "status": 1
}

Add SSH key

It is highly advised to use SSH key to access your container's command line, instead of using password authentication. To add an SSH key on your Kyup you have to send a POST request with action name: sshAddKey

Please note, that the SSH key is only added to your Kyup account. Once present in your account you can later install it on an existing container or provision a new one with it.

Request

The SSH key for the root user of the container should be provided as a URL-encoded string value of the key element. Please note, that only the public part of the key pair is accepted. No private keys are accepted by the API. All required parameters for this action are:

Name Type Description Required
key string The public part of the key to be added on the container. Note, that this string must be URL encoded Yes
title string Human-readable title of the key. This title will be displayed for the respective key in the Kyup User Area Yes

Response

If the request is properly submitted the API will provide a key_id in the JSON response. This key_id can be later used to retrieve any details of the key or install it on a container

Name Type Description
key_id integer Unique identifier assigned to the just added key

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

Error code Description
249 Missing parameter key
317 Incorrect parameter key
244 Incorrect parameter title
253 Missing parameter title
251 Please DO NOT use your private key. Public key is required

(more…)


curl -s "https://api.kyup.com/client/v1" --data-urlencode 'request={ "action":"sshAddKey", "authorization_key":"$APIKEY", "data":{"key":"public SSH key","title":"key1"} }'
request={
    "action":"sshAddKey",
    "authorization_key":"$APIKEY",
    "data":{
        "key":"public SSH key", 
        "title":"string"
    }
}
{
    "data": {
        "key_id": 156,
    },
    "status": 1
}

Remove SSH key

Deletes an SSH key previously added to your Kyup account. You have to send a POST request with action name: sshRemoveKey

Request

In order to properly use this action you have to supply a valid SSH key_id value over the data object of the JSON request:

Name Type Description Required
key_id integer Unique ID of the SSH key. You can retrieve the IDs of all keys using the Get SSH Keys action.

Response

If the request is properly submitted the API will provide a status code:

Name Type Description
success integer 1 - Success; 0 - Failed to remove the key

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

Error code Description
249 Missing parameter key_id
250 Incorrect parameter key_id
311 Key does not belong to your identity

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"sshRemoveKey", "authorization_key":"$APIKEY", "data":{ "key_id":123 } }'

request={
	"action":"sshRemoveKey",
	"authorization_key":"$APIKEY",      
	"data":{     
		"key_id":184
	} 
}

{
    "data": {
        "success": 1
    },
    "status": 1
}

Get SSH keys

This action will provide a list of SSH keys added to your Kyup account. To do so you have to send a POST request with action name: sshGetKeys

Request

The data object of the JSON request could be either empty or can have a container_id element with a valid id of a container. You can retrieve all unique ids of your containers using the Get Active Containers action. If a container_id is provided the API service will return details only for SSH keys installed on the respective container:

Parameter Type Description Required
container_id integer Container's ID. No

Response

The API will return a JSON response with data object that will contain an array named keys. This array will contain and object for each key installed on the container. Each of those objects will have a key and title elements:

Parameter Type Description
key string The public SSH key
key_id integer Unique ID of the key
title string Title of the key

The key array will be empty in case there are no keys added on your Kyup account or installed on the container with the specified ID. Please note that this API will return only the keys that are installed through the Kyup system. It will not list any keys that have been manually installed on your containers.

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

Error Code Description
203 Container with that ID doesn't exist
202 Container with this ID doesn't belong to your identity

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={ "action":"sshGetKeys", "authorization_key":"$APIKEY", "data":{ "container_id":123} }'

request={ 
	"action":"sshGetKeys", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"container_id":123 //optional
	} 
}

{
    "data": {
        "keys": [
            {
                "key": "public ssh key string",
                "key_id": 100,
                "title": "key1"
            }
        ]
    },
    "status": 1
}

Get SSH key details

This API action will provide you with detailed information for a single SSH key in your Kyup account. To do so you have to send a POST request with action name: sshGetKeyDetails

Request

The data object of this JSON request must have a valid key_id element. If you need to retrieve the IDs of all your keys you can use the Get SSH keys API action

Parameter Type Description Required
key_id integer Unique identifier of the key to get details for Yes

Response

The API service will return a JSON response with data object that will contain elements representing the key details. Those elements are:

Parameter Type Description
key string The public SSH key
key_id integer Unique ID of the key
title string Title of the key
containers array An array of containers' IDs the key is installed on.

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

Error Code Description
249 Missing parameter key_id
250 Incorrect parameter key_id
211 Key does not belong to your identity

(more…)

curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"sshGetKeyDetails", "authorization_key":"$APIKEY", "data": {"key_id":446}}'

request={ 
	"action":"sshGetKeyDetails", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"key_id":446 
	} 
}

{
    "data": {
        "containers": [
            2375
        ],
        "key": "public key",
        "key_id": 446,
        "title": "Key Name"
    },
    "status": 1
}

Install SSH key

This API action will install on a specified container any of your Kyup account SSH keys. In order to do so you have to send a POST request with action name: sshInstallKey

Request

The data object of this JSON request must have valid key_id and container_id elements. The key_id element represents the key to be installed and the container_id elements represents the container the key to be installed on:

Parameter Type Description Required
container_id integer Container's ID. You can retrieve your containers' IDs by using the Get Active Containers action No
key_id integer SSH Key ID. You can retrieve your keys' IDs by using the Get SSH Keys action No

Response

If the request is properly submitted the API will provide a status code:

Name Type Description
success integer 1 - Success; 0 - Failed to remove the key

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

Error code Description
249 Missing parameter key_id
250 Incorrect parameter key_id
311 Key does not belong to your identity
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container does not exist
320 Key already added to container
318 Failed to add key to container

(more…)


curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"sshInstallKey", "authorization_key":"$APIKEY", "data": {"key_id":440,"container_id":2375}}'

request={ 
	"action":"sshInstallKey", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"key_id":440, 
		"container_id":2375,
	} 
}

{
    "data": {
        "success": 1
    },
    "status": 1
}

Uninstall SSH key

This API action will delete/uninstall a specified SSH key from your container. To do so you have to send a POST request with action name: sshUninstallKey

Request

The data object of this JSON request must have valid key_id and container_id elements. The key_id element represents the key to be uninstalled and the container_id elements represents the container the key to be uninstalled from:

Response

If the request is properly submitted the API will provide a status code:

Parameter Type Description Required
container_id integer Container's ID. You can retrieve your containers' IDs by using the Get Active Containers action No
key_id integer SSH Key ID. You can retrieve your keys' IDs by using the Get SSH Keys action No
Name Type Description
success integer 1 - Success; 0 - Failed to remove the key

Errors

In case of wrongly built JSON request or failure of the API service to execute the requested action, the API will provide one of the following errors.

(more…)

Error code Description
249 Missing parameter key_id
250 Incorrect parameter key_id
311 Key does not belong to your identity
201 Missing parameter container_id
202 Container does not belong to your identity
203 Container does not exist
319 Failed to remove key from container

curl -s "https://api.kyup.com/client/v1" --data 'request={"action":"sshUninstallKey", "authorization_key":"$APIKEY", "data": {"key_id":440,"container_id":2375}}'

request={ 
	"action":"sshUninstallKey", 
	"authorization_key":"$APIKEY", 
	"data":{ 
		"key_id":440, 
		"container_id":2375,
	} 
}

{
    "data": {
        "success": 1
    },
    "status": 1
}