Getting started with the Cloud Panel API
You can access the API using the following URL:
https://api.cloudbuilder.es/v1
You can also send your HTTP requests to this URL.
To execute a function, you must enter the resources at the end of the above-mentioned URL. For example, to list all existing servers, you add the server parameter:
https://api.cloudbuilder.es/v1/servers
More information in the following chapters:
- Creating a Token
- Using HTTP Methods
Creating a Token
To communicate with the API, you must authenticate yourself with a token. You can create this token in the Arsys Cloudbuilder. To create a token, proceed as follows:
- In the left menu, click Mangement > Users.
- In the Users section, click Create.
- Enter the desired user name.
- In the Password field, enter the password and repeat it.
- Enter the desired e-mail address.
- Click Create.
- Select the created user.
- In the details of the User, in the API section, click on "Disabled".
- Click Yes.
- Click Apply Changes.
- Optional: Assign an IP address to the API. If you assign an IP address to the API, then you can access the API only using this specified IP address.
- In the API Key section, click Display User Information. The API Key will be displayed.
Using HTTP Methods
You can use the following HTTP methods to access the functions of the Arsys Cloudbuilder:
- GET: Retrieves information. With this method, you can get, for example, all information on a particular server.
- POST: Creates a new object. With this method, you can create, for example, a new server.
- PUT: Edits an object. With this method, you can edit, for example, the properties of a new server.
- DELETE: Deletes an object. With this method, you can, for example, delete a server.
After each call, the API returns an HTTP code. If the call can be successfully processed, you will also receive a JSON-encoded hash. The API uses the following HTTP codes:
- 200: Ok. The call has been successfully executed.
- 201: Created. A new element has been created successfully.
- 202: Accepted. A new element creation has been accepted and it's just being created.
- 400: Bad Request. The call contains incorrect parameters or values.
- 401: Unauthorized. This happens when an invalid TOKEN is used.
- 403: Forbidden. This happens when you try to do a forbidden operation.
- 404: Not Found. This happens when you try to perform some operation to a non-existent element.
- 405: Method not allowed. This happens when you try to access a non-existent method.
- 406: Not Acceptable. Source IP is not allowed to access the API.
- 429: Too many requests. The maximum number of hourly requests has been exceeded.
- 500: Internal error.
Security
In order to guarantee the security of the Arsys Cloudbuilder API, there are some limitations. The maximum number of requests allowed per hour is 1,500. Moreover, the API has a self-protection mechanism to block a high number of simultaneous requests.
You can see these limitations in the headers.There are two parameters that show the number of requests allowed and the requests remaining:
- X-Rate-Limit-Limit: number of requests allowed per hour
- X-Rate-Limit-Remaining: number of inquiries remaining
Servers
Collection of available methods for servers
Returns a list of your servers.
Adds a new server.
get
/servers
Returns a list of your servers.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of servers that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": "string",
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": "integer",
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string", "null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": "object",
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": "object",
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy ID"
},
"name": {
"type": "string",
"descripition": "Firewall policy name"
}
}
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Private network ID"
},
"name": {
"type": "string",
"descripition": "Private network name"
}
}
}
},
"reverse_dns": {
"type": "string",
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Private network ID"
},
"name": {
"type": "string",
"descripition": "Private network name"
}
}
}
}
}
}
}
Example:
[
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"cloudpanel_id": "958FA92",
"name": "My Server 1",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-04T06:32:15+00:00",
"first_password": "Fg52K21nz8",
"ssh_password": true,
"status": {
"state": "POWERED_OFF",
"percent": 0
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "8C626C1A7005D0D1F527143C413D461E",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "3C3B80327CBBD7F0023F793F666C24D0",
"name": "w2008r2datacenter64std"
},
"dvd": {},
"snapshot": {},
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": "",
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/servers
Adds a new server.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","hardware","appliance_id"],
"properties": {
"name": {
"type": "string",
"description": "Name of the server",
"maxLength": 128
},
"hardware": {
"type": "object",
"description": "Hardware features of the server. Choose your resources using fixed_instance_size_id or customizing your hardware.",
"oneOf" : [{
"required" : ["fixed_instance_size_id"]
}, {
"required" : ["vcore","cores_per_processor","ram","hdds"]
}
],
"properties": {
"fixed_instance_size_id": {
"type": "string",
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"required": ["is_main","size"],
"properties": {
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"appliance_id": {
"type": "string",
"description": "Image will be installed on server"
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the server will be created"
},
"ssh_password": {
"type": "boolean",
"description": "When False, disable accessing to the server using SSH Password, so that only SSH Keys access would be allowed.",
"default": true
},
"public_key": {
"type": "array",
"description": "List of SSH Key IDs to be copied in the server. Then you will be able to access to the server using your SSH keys.",
"items": {
"type": "string"
}
},
"rsa_key": {
"type": "string",
"description": "Put a valid public SSH Key to be copied into the server during creation. Then you will be able to access to the server using your SSH keys."
},
"description": {
"type": "string",
"description": "Description of the server",
"maxLength": 256
},
"password": {
"type": "string",
"description": "Password of the server. Password must contain more than 8 characters using uppercase letters, numbers and other special symbols.",
"minLength": 8,
"maxLength": 64
},
"power_on": {
"type": "boolean",
"description": "Power on server after creation",
"default": true
},
"firewall_policy_id": {
"type": "string",
"description": "Firewall policy's ID. If it is not provided, the server will assign the best firewall policy, creating a new one if necessary. If the parameter is sent with a 0 value, the server will be created with all ports blocked."
},
"ip_id": {
"type": "string",
"description": "IP's ID"
},
"load_balancer_id": {
"type": "string",
"description": "Load balancer's ID"
},
"monitoring_policy_id": {
"type": "string",
"description": "Monitoring policy's ID"
}
}
}
Example:
{
"name": "My server",
"description": "My server description",
"hardware": {
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"size": 40,
"is_main": true
},
{
"size": 20,
"is_main": false
}
]
},
"appliance_id": "B5F778B85C041347BCDCFC3172AB3F3C",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36"
}
HTTP status code 202
A new server creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "4B86A3ACC4CEB7A89E012E49FC17F312",
"cloudpanel_id": "FE7ED7D",
"name": "My server",
"description": "My server description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-07T08:25:37+00:00",
"first_password": "Nm4gP97xSw",
"ssh_password": true,
"status": {
"state": "DEPLOYING",
"percent": 20
},
"hardware": {
"fixed_instance_size_id": 0,
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"hdds": []
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": null,
"snapshot": null,
"ips": null,
"alerts": [],
"monitoring_policy": null,
"private_networks": null
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "First HDD must be main HDD",
"Errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Collection of available methods for fixed_instance_sizes
Returns a list of your fixed_instance_sizes.
get
/servers/fixed_instance_sizes
Returns a list of your fixed_instance_sizes.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Fixed instance size name",
"type": "string"
},
"id": {
"description": "Fixed instance size ID",
"type": "string"
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
}
}
}
}
Example:
[
{
"name": "M",
"id": "8C626C1A7005D0D1F527143C413D461E",
"hardware": {
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"unit": "GB",
"hdds": [
{
"size": 40,
"unit": "GB",
"is_main": true
}
]
}
},
{
"name": "L",
"id": "8C626C1A7005D0D1F527143C413D461F",
"hardware": {
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"unit": "GB",
"hdds": [
{
"size": 80,
"unit": "GiB",
"is_main": true
}
]
}
},
{
"name": "XL",
"id": "8C626C1A7005D0D1F527143C413D4620",
"hardware": {
"vcore": 2,
"cores_per_processor": 1,
"ram": 4,
"unit": "GB",
"hdds": [
{
"size": 120,
"unit": "GB",
"is_main": true
}
]
}
},
{
"name": "XXL",
"id": "8C626C1A7005D0D1F527143C413D4621",
"hardware": {
"vcore": 4,
"cores_per_processor": 1,
"ram": 8,
"unit": "GB",
"hdds": [
{
"size": 160,
"unit": "GiB",
"is_main": true
}
]
}
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a fixed_instance_size
Returns information about one fix server
get
/servers/fixed_instance_sizes/{fixed_instance_size_id}
Returns information about one fix server
URI Parameters
- fixed_instance_size_id: required (string)
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"description": "Fixed instance size name",
"type": "string"
},
"id": {
"description": "Fixed instance size ID",
"type": "string"
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
}
}
}
Example:
{
"name": "M",
"id": "8C626C1A7005D0D1F527143C413D461E",
"hardware": {
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"unit": "GB",
"hdds": [
{
"size": 40,
"unit": "GB",
"is_main": true
}
]
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"type": "FIXED_SIZE_NOT_FOUND",
"message": "Fixed size does not exists",
"errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns server's information.
Modifies a server.
Removes a server.
get
/servers/{server_id}
Returns server's information.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"cloudpanel_id": "958FA92",
"name": "My Server 1",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-04T06:32:15+00:00",
"first_password": "Fg52K21nz8",
"ssh_password": true,
"status": {
"state": "POWERED_OFF",
"percent": null
},
"hardware": {
"fixed_instance_size_id": "74DEF9D7C4D6C217057160F9656DC780",
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "8C626C1A7005D0D1F527143C413D461E",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "3C3B80327CBBD7F0023F793F666C24D0",
"name": "w2008r2datacenter64std"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": null,
"main": true,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/servers/{server_id}
Modifies a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","description"],
"properties": {
"name": {
"type": "string",
"description": "Server name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Server description",
"maxLength": 256
}
}
}
Example:
{
"name": "My Server remame",
"description": "My server rename description"
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"cloudpanel_id": "958FA92",
"name": "My Server remame",
"description": "My server rename description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-04T06:32:15+00:00",
"first_password": "Fg52K21nz8",
"ssh_password": true,
"status": {
"state": "POWERED_OFF",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "8C626C1A7005D0D1F527143C413D461E",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "3C3B80327CBBD7F0023F793F666C24D0",
"name": "w2008r2datacenter64std"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) name missing or empty. ",
"Errors": {
"required": "name"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}
Removes a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the <
Body
Media type: application/json
Type: object
Example:
{
"id": "6DD7C9714E555230BCFFED4E249358F0",
"cloudpanel_id": "B1F3EC8",
"name": "My Server 3",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-05T10:54:07+00:00",
"first_password": "Qg4s9dFH0u",
"ssh_password": true,
"status": {
"state": "REMOVING",
"percent": 25
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "07E96155551EC584407DD8F2CE9EE956",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "3C3F2FA3DB91318E8DCCB9F405339F76",
"name": "centos7-64std"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "B9CDBDDCA78167DB51F2F86F25208A05",
"ip": "10.4.140.251",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": {
"id": "5F1D473B4949F9665577A0249AE162CD",
"name": "Default Policy"
},
"private_networks": []
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a hardware
Returns information about the server's hardware.
Modifies the server's hardware.
get
/servers/{server_id}/hardware
Returns information about the server's hardware.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
}
Example:
{
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "8C626C1A7005D0D1F527143C413D461E",
"size": 40,
"is_main": true
}
]
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/servers/{server_id}/hardware
Modifies the server's hardware.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"oneOf" : [{
"required" : ["fixed_instance_size_id"]
}, {
"required" : ["vcore","cores_per_processor","ram"]
}
],
"properties": {
"fixed_instance_size_id": {
"type": "string",
"description": "ID of the instance size for the server. It is no possible to resize to a fixed instance with the SSD smaller than the current one."
},
"vcore": {
"type": "integer",
"description": "Total amount of virtual cores. It is only possible to decrease the number of vCore if the server is powered off. Some operating systems don't allow to increase the CPU if they are powered on.",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor. It is only possible to modify the cores per processor if the server is powered off. The valid values are 1, a even number and the total amount of cores.",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size. It is only possible to decrease the RAM if the server is powered off. Some operating systems don't allow to increase the RAM if they are powered on.",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
}
}
}
Example:
{
"vcore": 1,
"cores_per_processor": 1,
"ram": 2
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"cloudpanel_id": "958FA92",
"name": "My Server remame",
"description": "My server rename description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-04T06:32:15+00:00",
"first_password": "Fg52K21nz8",
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": 10
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "8C626C1A7005D0D1F527143C413D461E",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "3C3B80327CBBD7F0023F793F666C24D0",
"name": "w2008r2datacenter64std"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": null,
"main": true,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Cores per processor cannot be greater than the number of vCPUs",
"Errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a hdd
Returns a list of the server's hard disks.
Adds new hard disk(s) to the server.
get
/servers/{server_id}/hardware/hdds
Returns a list of the server's hard disks.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"description": "Hard disks",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
Example:
[
{
"id": "1964560F458D95DE1884E443B00E33E7",
"size": 40,
"is_main": true
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/servers/{server_id}/hardware/hdds
Adds new hard disk(s) to the server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["hdds"],
"properties": {
"hdds": {
"type": "array",
"description": "List of hard disks will be added to the server",
"items": {
"type": "object",
"required": ["size"],
"properties": {
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main",
"default": true
}
}
}
}
}
}
Example:
{
"hdds":[
{
"size": 40,
"is_main": false
}
]
}
HTTP status code 202
A new hdd creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "4B86A3ACC4CEB7A89E012E49FC17F312",
"cloudpanel_id": "FE7ED7D",
"name": "My Server remame",
"description": "My server rename description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-07T08:25:37+00:00",
"first_password": "Nm4gP97xSw",
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": 10
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "0DDE06DFA47743DF928E76AE7DC195C1",
"size": 40,
"is_main": true
},
{
"id": "B6DAEB7FA4D0CABFD8FE878EC467CA7E",
"size": 20,
"is_main": false
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": null,
"main": true,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "TECHNICAL_TARIFF_VIOLATION",
"Message": "Too high 3 > 2.00",
"Errors": {
"prefix": "ngcs.vm.hdd",
"desired": 3,
"required": "2.00"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a hdd
Returns information about a server's hard disk.
Modifies the size of a server's hard disk.
Removes a server's hard disk.
get
/servers/{server_id}/hardware/hdds/{hdd_id}
Returns information about a server's hard disk.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- hdd_id: required (string)
Unique hard disk's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
Example:
{
"id": "1964560F458D95DE1884E443B00E33E7",
"size": 40,
"is_main": true
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "HDDS_NOT_FOUND",
"Message": "Hard disk SSD not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/servers/{server_id}/hardware/hdds/{hdd_id}
Modifies the size of a server's hard disk.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- hdd_id: required (string)
Unique hard disk's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["size"],
"properties": {
"size": {
"type": "number",
"description": "Size of he disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 0.5
}
}
}
Example:
{
"size": 40
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "4B86A3ACC4CEB7A89E012E49FC17F312",
"cloudpanel_id": "FE7ED7D",
"name": "My Server remame",
"description": "My server rename description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-07T08:25:37+00:00",
"first_password": "Nm4gP97xSw",
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": 10
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "0DDE06DFA47743DF928E76AE7DC195C1",
"size": 40,
"is_main": true
},
{
"id": "B6DAEB7FA4D0CABFD8FE878EC467CA7E",
"size": 20,
"is_main": false
},
{
"id": "49CC5F63F13D5CA9398868B50ADB57C7",
"size": 40,
"is_main": false
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": null,
"main": true,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "TECHNICAL_TARIFF_VIOLATION",
"Message": "Wrong step 30 - 20.00",
"Errors": {
"prefix": "ngcs.vm.hdd.size",
"desired": 30,
"required": "20.00",
"step": true
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "HDDS_NOT_FOUND",
"Message": "Hard disk SSD not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}/hardware/hdds/{hdd_id}
Removes a server's hard disk.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- hdd_id: required (string)
Unique hard disk's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "4B86A3ACC4CEB7A89E012E49FC17F312",
"cloudpanel_id": "FE7ED7D",
"name": "My Server remame",
"description": "My server rename description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-07T08:25:37+00:00",
"first_password": "Nm4gP97xSw",
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": 10
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "0DDE06DFA47743DF928E76AE7DC195C1",
"size": 40,
"is_main": true
},
{
"id": "B6DAEB7FA4D0CABFD8FE878EC467CA7E",
"size": 40,
"is_main": false
},
{
"id": "49CC5F63F13D5CA9398868B50ADB57C7",
"size": 40,
"is_main": false
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "D609028BC090EE05665072C721EA4A7A",
"ip": "10.4.141.43",
"type": "IPV4",
"reverse_dns": null,
"firewall_policies": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "HDDS_NOT_FOUND",
"Message": "Hard disk SSD not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a image
Returns information about a server's image.
Reinstalls a new image into a server.
get
/servers/{server_id}/image
Returns information about a server's image.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
}
Example:
{
"id": "76EBF29C1250167C8754B2B3D1C05F68",
"name": "centos7-64std"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/servers/{server_id}/image
Reinstalls a new image into a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"password": {
"type": "string",
"description": "Password of the server. Password must contain more than 8 characters using uppercase letters, numbers and other special symbols.",
"minLength": 8,
"maxLength": 64
},
"ssh_password": {
"type": "boolean",
"description": "When False, disable accessing to the server using SSH Password, so that only SSH Keys access would be allowed.",
"default": true
},
"public_key": {
"type": "array",
"description": "List of SSH Key IDs to be copied in the server. Then you will be able to access to the server using your SSH keys.",
"items": {
"type": "string"
}
},
"rsa_key": {
"type": "string",
"description": "Put a valid public SSH Key to be copied into the server during creation. Then you will be able to access to the server using your SSH keys."
}
}
}
Example:
{
"id": "B5F778B85C041347BCDCFC3172AB3F3C",
"password": "Test2015",
"firewall_policy": {
"id": "071C8EB665DBA2EE574F3ED1256E5694"
}
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "D6F1239315503A1C44607BB04B3BD9C9",
"cloudpanel_id": "CC8C8F5",
"name": "My Server 2",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-05T09:30:19+00:00",
"first_password": "Qa3xFdc4MW",
"ssh_password": true,
"status": {
"state": "DEPLOYING",
"percent": 15
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "14B3CD8FE65C69F0AF28BE42431182E1",
"size": 40,
"is_main": true
},
{
"id": "A1F227BE1661CB14E290FF07ED1110C7",
"size": 20,
"is_main": false
}
]
},
"image": {
"id": "3C3F2FA3DB91318E8DCCB9F405339F76",
"name": "centos7-64std"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"reverse_dns": null,
"main": true,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) id missing or empty. ",
"Errors": {
"id": "15287F3524A6D41E0A03E951D64960E3"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a ip
Returns a list of the server's IPs.
Adds a new IP to the server.
get
/servers/{server_id}/ips
Returns a list of the server's IPs.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
}
}
}
}
Example:
[
{
"id": "01D4A802798AB77AA72DA2D05E1379E1",
"ip": "10.5.135.140",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/servers/{server_id}/ips
Adds a new IP to the server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"type_ip": {
"type": "string",
"description": "Type of IP. At the moment, only IPV4 is allowed.",
"enum": ["IPV4", "IPV6"],
"default": "IPV4"
}
}
}
Example:
{
"type": "IPV4"
}
HTTP status code 201
A new element has been created successfully.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server 2",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "9174B5D76EE67553EAA42CC77D53CB3C",
"ip": "10.4.141.64",
"type": "IPV4",
"reverse_dns": null,
"firewall_policies": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
},
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 09:47:34"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Invalid type. Only IPV4 allowed",
"Errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a ip
Returns information about a server's IP.
Releases an IP and optionally removes it
get
/servers/{server_id}/ips/{ip_id}
Returns information about a server's IP.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
}
}
}
Example:
{
"id": "01D4A802798AB77AA72DA2D05E1379E1",
"ip": "10.5.135.140",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}/ips/{ip_id}
Releases an IP and optionally removes it
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"keep_ip": {
"type": "boolean",
"description": "Set true for releasing the IP without removing it",
"default": false
}
}
}
Example:
{
"keep_ip": true
}
HTTP status code 202
Action has been accepted and the ip it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 09:56:13"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a firewall_policy
Lists firewall policies assigned to the IP
Adds a new firewall policy to the IP
Removes firewall policy from the IP
get
/servers/{server_id}/ips/{ip_id}/firewall_policy
Lists firewall policies assigned to the IP
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy ID assigned to IP"
},
"name": {
"type": "string",
"description": "Firewall policy name"
}
}
}
Example:
{
"id": "3C4F21EDFEEDD6ABB728EA5CE684E1AF",
"name": "Windows"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/servers/{server_id}/ips/{ip_id}/firewall_policy
Adds a new firewall policy to the IP
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "ID of the firewall policy that will be assigned"
}
}
}
Example:
{
"id": "071C8EB665DBA2EE574F3ED1256E5694"
}
HTTP status code 202
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:11:02"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 400
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Wrong value Field(s) id",
"Errors": {
"id": "15287F3524A6D41E0A03E951D64960E3"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}/ips/{ip_id}/firewall_policy
Removes firewall policy from the IP
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:09:25"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a load_balancer
Lists all load balancers assigned to the IP
Adds a new load balancer to the IP
get
/servers/{server_id}/ips/{ip_id}/load_balancers
Lists all load balancers assigned to the IP
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Load balancer ID"
},
"name": {
"type": "string",
"description": "Load balancer name"
}
}
}
}
Example:
[
{
"id": "37E2FDEB2945990CEE4B7927FB1ED425",
"name": "My load balancer"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/servers/{server_id}/ips/{ip_id}/load_balancers
Adds a new load balancer to the IP
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["load_balancer_id"],
"properties": {
"load_balancer_id": {
"type": "string",
"description": "ID of the load balancer that will be assigned"
}
}
}
Example:
{
"load_balancer_id": "65454FC7DA9172F229E5352C587075BA"
}
HTTP status code 202
A new load_balancer creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": [
{
"id": "4B9EF92B4954C550F0C269A6B4CB7ACC",
"name": "My Load Balancer 3"
}
]
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:15:29"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Wrong value Field(s) load_balancer_id",
"Errors": {
"load_balancer_id": "15287F3524A6D41E0A03E951D64960E3"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Removes load balancer from the IP
delete
/servers/{server_id}/ips/{ip_id}/load_balancers/{load_balancer_id}
Removes load balancer from the IP
URI Parameters
- server_id: required (string)
Unique server's identifier.
- ip_id: required (string)
Unique IP's identifier.
- load_balancer_id: required (string)
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:20:29"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "Public IP not found",
"Errors": null
}
{
"Type": "LOAD_BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a status
Returns information about a server's status.
get
/servers/{server_id}/status
Returns information about a server's status.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer","null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
}
Example:
{
"state": "POWERED_ON",
"percent": null
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Changes server's status
put
/servers/{server_id}/status/action
Changes server's status
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["action","method"],
"properties": {
"action": {
"type": "string",
"description": "Action will be executed",
"enum": ["POWER_ON", "POWER_OFF", "REBOOT"]
},
"method": {
"type": "string",
"description": "Select the method for powering off or rebooting",
"enum": ["SOFTWARE", "HARDWARE"]
}
}
}
Example:
{
"action": "POWER_OFF",
"method": "SOFTWARE"
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "CB22C6E0428239348A6B70BAE0D67E66",
"cloudpanel_id": "79B706F",
"name": "My Server 2",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-04-28T10:19:25+00:00",
"first_password": "Xh4yJ2b11u",
"ssh_password": true,
"status": {
"state": "POWERING_OFF",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "1964560F458D95DE1884E443B00E33E7",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "76EBF29C1250167C8754B2B3D1C05F68",
"name": "centos7-64std"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "01D4A802798AB77AA72DA2D05E1379E1",
"ip": "10.5.135.140",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "internal_ping",
"description": "CRITICAL - 10.5.135.153: rta nan, lost 100%",
"date": "2015-04-29 13:23:07"
},
{
"type": "cpu",
"description": "CHECK_NRPE: Socket timeout after 10 seconds.",
"date": "2015-04-30 08:24:11"
},
{
"type": "disk",
"description": "CHECK_NRPE: Socket timeout after 10 seconds.",
"date": "2015-04-30 08:25:55"
},
{
"type": "ram",
"description": "CHECK_NRPE: Socket timeout after 10 seconds.",
"date": "2015-04-30 08:27:40"
}
]
},
"monitoring_policy": {
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy"
},
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "VALIDATION_ERROR",
"Message": "Invalid action. Valid actions are POWER_ON, POWER_OFF and REBOOT.",
"Errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a dvd
Returns information about the DVD loaded into the virtual DVD unit of a server.
Loads a DVD into the virtual DVD unit of a server.
Unloads a DVD from the virtual DVD unit of a server.
get
/servers/{server_id}/dvd
Returns information about the DVD loaded into the virtual DVD unit of a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "DVD Id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
}
Example:
{
"id": "B77E19E062D5818532EFF11C747BD104",
"name": "Windows 2012 - 64 bits"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/servers/{server_id}/dvd
Loads a DVD into the virtual DVD unit of a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "ID of the ISO image"
}
}
}
Example:
{
"id": "05F2EF8C89A12782B7DBE445256BD7A5"
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": 50
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": null,
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:29:06"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) id missing or empty. ",
"Errors": {
"id": "15287F3524A6D41E0A03E951D64960E3"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}/dvd
Unloads a DVD from the virtual DVD unit of a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the DVD is being ejected.
Body
Media type: application/json
Type: object
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": 50
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:24:22"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a private_network
Returns a list of the server's private networks.
Assigns a private network to the server.
get
/servers/{server_id}/private_networks
Returns a list of the server's private networks.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Private network ID"
},
"name": {
"type": "string",
"description": "Private network name"
}
}
}
}
Example:
[
{
"id": "6B7051F17199EF9EA994CD3E4AA450E6",
"name": "New private network 1"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/servers/{server_id}/private_networks
Assigns a private network to the server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "Private network's ID"
}
}
}
Example:
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4"
}
HTTP status code 202
A new private_network creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:43:36"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) id missing or empty. ",
"Errors": {
"id": "15287F3524A6D41E0A03E951D64960E3"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a private_network
Returns information about a server's private network.
Unassigns a private network from the server.
get
/servers/{server_id}/private_networks/{private_network_id}
Returns information about a server's private network.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Private network ID"
},
"name": {
"type": "string",
"description": "Private network name"
}
}
}
Example:
{
"id": "6B7051F17199EF9EA994CD3E4AA450E6",
"name": "New private network 1",
"description": null,
"network_address": null,
"subnet_mask": null,
"state": "ACTIVE",
"creation_date": "2015-05-07T10:31:12+00:00",
"servers": [
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"name": "My server"
}
],
"cloudpanel_id": "pn8962D_1"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}/private_networks/{private_network_id}
Unassigns a private network from the server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the private_network it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "POWERED_ON",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": null,
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:41:54"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": [
{
"id": "6B7051F17199EF9EA994CD3E4AA450E6",
"name": "New private network 1"
}
]
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a snapshot
Returns a list of the server's snapshots.
Creates a new snapshot of the server.
get
/servers/{server_id}/snapshots
Returns a list of the server's snapshots.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
}
}
Example:
[
{
"id": "B77E19E062D5818532EFF11C747BD104",
"creation_date": "2015-04-06T23:48:38Z",
"deletion_date": "2015-04-09T23:48:38Z"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/servers/{server_id}/snapshots
Creates a new snapshot of the server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type: object
Example:
{}
HTTP status code 202
A new snapshot creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": {
"id": "D609F69D08EB0C77D8EADE22F70462B4",
"creation_date": "2015-05-07T10:47:23+00:00"
},
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:47:23"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": [
{
"id": "6B7051F17199EF9EA994CD3E4AA450E6",
"name": "New private network 1"
}
]
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "TECHNICAL_TARIFF_VIOLATION",
"message": "Too high 2 < 1.00",
"errors": {
"prefix": "ngcs.servers.snapshots",
"desired": 2,
"required": "1.00"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a snapshot
Restores a snapshot into the server.
Removes a snapshot
put
/servers/{server_id}/snapshots/{snapshot_id}
Restores a snapshot into the server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
- snapshot_id: required (string)
Unique snapshot's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type: object
Example:
{}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "4B86A3ACC4CEB7A89E012E49FC17F312",
"cloudpanel_id": "FE7ED7D",
"name": "My Server remame",
"description": "My server rename description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-07T08:25:37+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"hdds": [
{
"id": "0DDE06DFA47743DF928E76AE7DC195C1",
"size": 40,
"is_main": true
},
{
"id": "531CE4594248FAF91B1164B05BFB152C",
"size": 40,
"is_main": false
}
]
},
"image": {
"id": "15287F3524A6D41E0A03E951D64960E3",
"name": "w2012r2datacenter64iso"
},
"dvd": {
"id": "15287F3524A6D41E0A03E951D64960E3",
"name": "w2012r2datacenter64iso"
},
"snapshot": {
"id": "B198CE46BDE59DDCD15C352EF10EB0EA",
"creation_date": "2015-05-07T10:49:22+00:00"
},
"ips": [
{
"id": "D609028BC090EE05665072C721EA4A7A",
"ip": "10.4.141.43",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "7DFF10879F4EBA8D478A1D58A46665AE",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 202
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) id missing or empty. ",
"Errors": {
"id": "15287F3524A6D41E0A03E951D64960E3"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "SNAPSHOT_NOT_FOUND",
"Message": "Snapshot not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/servers/{server_id}/snapshots/{snapshot_id}
Removes a snapshot
URI Parameters
- server_id: required (string)
Unique server's identifier.
- snapshot_id: required (string)
Unique snapshot's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the snapshot it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"cloudpanel_id": "5061DE9",
"name": "My server",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-06T11:09:55+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "CONFIGURING",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"hdds": [
{
"id": "77F5BC74C9B3532A37D31FEED070BE01",
"size": 40,
"is_main": true
}
]
},
"image": {
"id": "07C170D67C8EC776933FCFF1C299C1C5",
"name": "w2012r2datacenter64min"
},
"dvd": {
"id": "05F2EF8C89A12782B7DBE445256BD7A5",
"name": "centos7-64iso"
},
"snapshot": {
"id": "D609F69D08EB0C77D8EADE22F70462B4",
"creation_date": "2015-05-07T10:47:23+00:00"
},
"ips": [
{
"id": "696469547988D3945B3FE59DFCB93C90",
"ip": "10.4.141.161",
"type": "IPV4",
"reverse_dns": null,
"firewall_policy": {
"id": "5DE607955050915229D602931F942F32",
"name": "Linux"
},
"load_balancers": []
}
],
"alerts": {
"critical": [
{
"type": "agent",
"description": "MONITORING_AGENT_NOT_INSTALLED",
"date": "2015-05-07 10:52:52"
},
{
"type": "internal_ping",
"description": "CRITICAL - 10.4.141.161: rta nan, lost 100%",
"date": "2015-05-07 09:59:21"
}
]
},
"monitoring_policy": {
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1"
},
"private_networks": [
{
"id": "6B7051F17199EF9EA994CD3E4AA450E6",
"name": "New private network 1"
}
]
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
{
"Type": "SNAPSHOT_NOT_FOUND",
"Message": "Snapshot not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a clone
Clones a server.
post
/servers/{server_id}/clone
Clones a server.
URI Parameters
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Name of the new server",
"maxLength": 128
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the server will be created"
}
}
}
Example:
{
"name": "Copy of My server",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36"
}
HTTP status code 202
A new clone creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Server name"
},
"description": {
"type": "string",
"description": "Server description"
},
"creation_date": {
"type": "string",
"description": "Date when server was created"
},
"first_password": {
"type": ["string", "null"],
"description": "The first root password for the server if it was created automatically"
},
"ssh_password": {
"type": "boolean",
"description": "When true, server access through SSH password is enabled."
},
"status": {
"type": "object",
"description": "Server state",
"properties": {
"state": {
"type": "string",
"description": "Server state"
},
"percent": {
"type": ["integer", "null"],
"description": "In case the server is performing any action, it shows the complete percentage"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"hardware": {
"type": "object",
"description": "Hardware features of the server",
"properties": {
"fixed_instance_size_id": {
"type": ["string","null"],
"description": "Size of the ID desired for the server"
},
"vcore": {
"type": "integer",
"description": "Total amount of processors",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"cores_per_processor": {
"type": "integer",
"description": "Number of cores per processor",
"minimum": 1,
"maximum": 16,
"multipleOf": 1
},
"ram": {
"type": "number",
"description": "RAM memory size",
"minimum": 1,
"maximum": 128,
"multipleOf": 0.5
},
"hdds": {
"type": "array",
"description": "Hard disks",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "HDD identifier"
},
"is_main": {
"type": "boolean",
"description": "Set true if it's main"
},
"size": {
"type": "integer",
"description": "Size of the hard disk",
"minimum": 20,
"maximum": 2000,
"multipleOf": 20
}
}
}
}
}
},
"image": {
"type": "object",
"description": "Image installed on server",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
}
}
},
"dvd": {
"type": ["object","null"],
"description": "Loaded DVD",
"properties": {
"id": {
"type": "string",
"description": "DVD id"
},
"name": {
"type": "string",
"description": "DVD name"
}
}
},
"snapshot": {
"type": ["object","null"],
"description": "Information about snapshots",
"properties": {
"id": {
"type": "string",
"description": "Snapshot ID"
},
"creation_date": {
"type": "string",
"description": "Date when snapshot was created"
},
"deletion_date": {
"type": "string",
"description": "Date when the snapshot will be deleted"
}
}
},
"ips": {
"type": "array",
"description": "Server IPs",
"items": {
"type": "object",
"properties": {
"firewall_policy": {
"type": "object",
"description": "Firewall policy assigned to IP"
},
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"load_balancers": {
"type": "array",
"description": "Load balancer(s) assigned to IP"
},
"reverse_dns": {
"type": ["string", "null"],
"description": "Reverse name of the IP"
},
"type": {
"type": "string",
"description": "IP type"
},
"main": {
"type": "boolean",
"description": "Indicates if the IP is automatically provided through DHCP"
}
}
}
},
"alerts": {
"type": ["object", "null"],
"description": "Server alerts",
"properties": {
"critical": {
"type": "array",
"description": "Critical alerts",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
},
"warning": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Alert date"
},
"description": {
"type": "string",
"description": "Alert description"
},
"type": {
"type": "string",
"description": "Alert type"
}
}
}
}
}
},
"monitoring_policy": {
"type": ["object", "null"],
"description": "Monitoring policy assigned to server",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"descripition": "Monitoring policy name"
}
}
},
"private_networks": {
"type": "array",
"description": "Private networks where server is added"
}
}
}
Example:
{
"id": "796A272DE4FD866898486309EF950826",
"cloudpanel_id": "26FCD5E",
"name": "Test clone",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-05-07T10:51:09+00:00",
"first_password": null,
"ssh_password": true,
"status": {
"state": "DEPLOYING",
"percent": null
},
"hardware": {
"fixed_instance_size_id": null,
"vcore": 1,
"cores_per_processor": 1,
"ram": 2,
"hdds": []
},
"image": {
"id": "3C3F2FA3DB91318E8DCCB9F405339F76",
"name": "centos7-64std"
},
"dvd": null,
"snapshot": null,
"ips": [],
"alerts": null,
"monitoring_policy": null,
"private_networks": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) name missing or empty. ",
"Errors": {
"name": 1
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Images
Collection of available methods for images
Returns a list of your images.
Adds a new image.
get
/images
Returns a list of your images.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of images that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"os_family": {
"type": "string",
"description": "Operating system family",
"enum": ["Windows", "Linux", "Other"]
},
"os": {
"type": "string",
"description": "Operating system version"
},
"os_version": {
"type": "string",
"description": "Operating system distribution"
},
"os_architecture": {
"type": "number",
"description": "Hardware architecture required for the selected OS",
"enum": [32, 64]
},
"os_image_type": {
"type": ["string","null"],
"description": "Operating system image type",
"enum": ["STANDARD", "MINIMAL", "ISO_OS", "ISO_TOOL", null]
},
"type": {
"type": "string",
"description": "Image type",
"enum": ["IMAGE", "MY_IMAGE", "APPLICATION", "ISO"]
},
"min_hdd_size": {
"type": "number",
"description": "Minimum HDD required size"
},
"licenses": {
"type": "array",
"description": "Image licenses acquired"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"state": {
"type": "string",
"description": "Image state"
},
"description": {
"type": "string",
"description": "Image description"
},
"hdds": {
"type": "array",
"description": "HDDs of the images",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Disk identifier"
},
"size": {
"type": "number",
"description": "Disk size"
},
"is_main": {
"type": "boolean",
"description": "Main HDD"
}
}
}
},
"server_id": {
"type": "string",
"description": "The ID of the server that is the source of the image"
},
"frequency": {
"type": "string",
"description": "Frequency with which the image is made",
"enum": ["ONCE", "DAILY", "WEEKLY"]
},
"num_images": {
"type": "integer",
"description": "Maximum number of images will be stored",
"minimum": 1,
"maximum": 50,
"multipleOf": 1
},
"creation_date": {
"type": "string",
"description": "Date when image was created"
}
}
}
}
Example:
[
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977E",
"name": "New image name",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos7",
"architecture": 64,
"os_image_type": null,
"type": "MY_IMAGE",
"min_hdd_size": 40,
"licenses": [],
"cloudpanel_id": "ap99AA4_1",
"state": "DEPLOYING",
"description": "New image description",
"hdds": [
{
"id": "200FC47388A30470A376913E73B9C32C",
"size": 40,
"is_main": true
}
],
"server_id": "E83777750130E1111AA89623B9557CAF",
"frequency": "DAILY",
"num_images": 5,
"creation_date": "2015-04-29T07:46:40+00:00"
},
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977F",
"name": "New image name 2",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"name": "United States"
},
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos7",
"architecture": 64,
"os_image_type": null,
"type": "MY_IMAGE",
"min_hdd_size": 40,
"licenses": [],
"cloudpanel_id": "ap99AA4_1",
"state": "DEPLOYING",
"description": "New image description",
"hdds": [
{
"id": "200FC47388A30470A376913E73B9C32D",
"size": 40,
"is_main": true
}
],
"server_id": "E83777750130E1111AA89623B9557CAF",
"frequency": "DAILY",
"num_images": 5,
"creation_date": "2015-04-29T07:46:40+00:00"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/images
Adds a new image.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["server_id","name","frequency"],
"properties": {
"server_id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Image name",
"maxLength": 128
},
"frequency": {
"type": "string",
"description": "Creation policy frequency. Frecuency policy is only allowed in default datacenter.",
"enum": ["ONCE", "DAILY", "WEEKLY"]
},
"num_images": {
"type": "integer",
"description": "Maximum number of images. Required when image is created with frequency policy.",
"minimum": 1,
"maximum": 50,
"multipleOf": 1
},
"description": {
"type": "string",
"description": "Image description",
"maxLength": 256
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the shared storage will be created"
},
"source": {
"type": "string",
"description": "Source of the new image: server (from an existing server), image (from an imported image) or iso (from an imported iso)",
"enum": ["server", "image", "iso"],
"default": "server"
},
"url": {
"type": "string",
"description": "URL where the image can be downloaded. It is required when the source is image or iso."
},
"os_id": {
"type": "string",
"description": "ID of the Operative System you want to import. You can get a list of the available ones with the method /iamges/os."
},
"type": {
"type": "string",
"description": "Type of the ISO you want to import: os (Operative System) or app (Application). It is required when the source is iso.",
"enum": ["os", "app"]
}
}
}
Example:
{
"server_id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My image",
"description": "My image description",
"frequency": "WEEKLY",
"num_images": 5
}
HTTP status code 202
A new image creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "E1817F51F5A9322116579150247E0004",
"name": "My image 2_20150506",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2012R2",
"architecture": 64,
"os_image_type": "Personal",
"type": "MY_IMAGE",
"min_hdd_size": 40,
"licenses": [
{
"name": "Windows 2012 Standard"
}
],
"cloudpanel_id": "ap8962D_253",
"state": "DEPLOYING",
"description": "My image 2 description",
"hdds": [
{
"id": "D0289C1FDF48628FE53335470EEC05DB",
"size": 40,
"is_main": true
}
],
"server_id": "638ED28205B1AFD7ADEF569C725DD85F",
"frequency": "WEEKLY",
"num_images": 5,
"creation_date": "2015-05-06T08:04:41+00:00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Number of images must be between 1 and 50",
"Errors": null
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_STATE",
"message": "Appliance cannot be created when VM is in state: DEPLOYING",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "Image not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a image
Returns image's information.
Modifies a image.
Removes a image.
get
/images/{image_id}
Returns image's information.
URI Parameters
- image_id: required (string)
Unique image's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Image ID"
},
"name": {
"type": "string",
"description": "Image name"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"os_family": {
"type": "string",
"description": "Operating system family",
"enum": ["Windows", "Linux", "Other"]
},
"os": {
"type": "string",
"description": "Operating system version"
},
"os_version": {
"type": "string",
"description": "Operating system distribution"
},
"os_architecture": {
"type": "number",
"description": "Hardware architecture required for the selected OS",
"enum": [32, 64]
},
"os_image_type": {
"type": ["string", "null"],
"description": "Operating system image type",
"enum": ["STANDARD", "MINIMAL", "ISO_OS", "ISO_TOOL", null]
},
"type": {
"type": "string",
"description": "Image type",
"enum": ["IMAGE", "MY_IMAGE", "APPLICATION", "ISO"]
},
"min_hdd_size": {
"type": "number",
"description": "Minimum HDD required size"
},
"licenses": {
"type": "array",
"description": "Image licenses acquired"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"state": {
"type": "string",
"description": "Image state"
},
"description": {
"type": "string",
"description": "Image description"
},
"hdds": {
"type": "array",
"description": "HDDS of the images",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Disk identifier"
},
"size": {
"type": "number",
"description": "Disk size"
},
"is_main": {
"type": "boolean",
"description": "Main HDD"
}
}
}
},
"server_id": {
"type": "string",
"description": "The ID of the server that is the source of the image"
},
"frequency": {
"type": "string",
"description": "Frequency with which the image is made",
"enum": ["ONCE", "DAILY", "WEEKLY"]
},
"num_images": {
"type": "integer",
"description": "Maximum number of images will be stored",
"minimum": 1,
"maximum": 50,
"multipleOf": 1
},
"creation_date": {
"type": "string",
"description": "Date when image was created"
}
}
}
Example:
{
"id": "842F09CAF954298C6A4BCD25E1CA3689",
"name": "My Image 2",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos6",
"architecture": 64,
"os_image_type": null,
"type": "MY_IMAGE",
"min_hdd_size": 40,
"licenses": [],
"cloudpanel_id": "ap8962D_248",
"state": "ACTIVE",
"description": "",
"hdds": [
{
"id": "35AAD7EB668D7ECF58AF9413DB127BD3",
"size": 40,
"is_main": true
}
],
"server_id": "CB8A023E99CE2026981A110018A00764",
"frequency": "ONCE",
"num_images": 1,
"creation_date": "2015-04-14T07:18:20+00:00"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "Image not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/images/{image_id}
Modifies a image.
URI Parameters
- image_id: required (string)
Unique image's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "Image name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Image description",
"maxLength": 256
},
"frequency": {
"type": "string",
"description": "Remove creation policy",
"enum": ["ONCE"]
}
}
}
Example:
{
"name": "New image name",
"description": "New image description",
"frequency": "ONCE"
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "842F09CAF954298C6A4BCD25E1CA3689",
"name": "New image name",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos6",
"architecture": 64,
"os_image_type": null,
"type": "MY_IMAGE",
"min_hdd_size": 40,
"licenses": [],
"cloudpanel_id": "ap8962D_248",
"state": "ACTIVE",
"description": "New image description",
"hdds": [
{
"id": "35AAD7EB668D7ECF58AF9413DB127BD3",
"size": 40,
"is_main": true
}
],
"server_id": "CB8A023E99CE2026981A110018A00764",
"frequency": "ONCE",
"num_images": 1,
"creation_date": "2015-04-14T07:18:20+00:00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Invalid frequency. Only ONCE allowed",
"Errors": null
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_STATE",
"message": "Cannot change frequency while deploying",
"errors": {
"element_type": "Image",
"id": "BEF044516F466A57D49EC9AA68143D7A",
"state": "DEPLOYING"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "Image not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/images/{image_id}
Removes a image.
URI Parameters
- image_id: required (string)
Unique image's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the image it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "842F09CAF954298C6A4BCD25E1CA3689",
"name": "New image name",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos6",
"architecture": 64,
"os_image_type": null,
"type": "MY_IMAGE",
"min_hdd_size": 40,
"licenses": [],
"cloudpanel_id": "ap8962D_248",
"state": "REMOVING",
"description": "New image description",
"hdds": [
{
"id": "35AAD7EB668D7ECF58AF9413DB127BD3",
"size": 40,
"is_main": true
}
],
"server_id": "CB8A023E99CE2026981A110018A00764",
"frequency": "ONCE",
"num_images": 1,
"creation_date": "2015-04-14T07:18:20+00:00"
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_STATE",
"message": "Cannot delete while deploying",
"errors": {
"element_type": "Image",
"id": "BEF044516F466A57D49EC9AA68143D7A",
"state": "DEPLOYING"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "Image not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Block Storages
Collection of available methods for block_storages
Returns a list of your block_storages.
Adds a new block_storage.
get
/block_storages
Returns a list of your block_storages.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of block_storages that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Block storage ID"
},
"size": {
"type": "integer",
"description": "Block storage total size",
"minimum": 20,
"maximum": 500,
"multipleOf": 10
},
"state": {
"type": "string",
"description": "Block storage state"
},
"description": {
"type": "string",
"description": "Block storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"name": {
"type": "string",
"description": "Block storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when Block storage was created"
},
"server": {
"type": ["object","null"],
"descripition": "Server allowed to access to the block storage",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
}
Example:
[
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My block storage for containers",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 1",
"creation_date": "2015-05-06T08:33:25+00:00",
"server":
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1"
}
},
{
"id": "4406CE4723BB441C7956E25C51CE8C1B",
"size": 50,
"state": "ACTIVE",
"description": "My block storage description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 3",
"creation_date": "2015-03-17T11:57:48+00:00",
"server": null
},
{
"id": "1A5418172DD3BD39F8010A6633F1018A",
"size": 250,
"state": "ACTIVE",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 2",
"creation_date": "2015-05-05T09:36:31+00:00",
"server":
{
"id": "748ED28205B1AFD7ADEF569C725DD85E",
"name": "My server 2"
}
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/block_storages
Adds a new block_storage.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","size"],
"properties": {
"name": {
"type": "string",
"description": "Name of the shared storage",
"maxLength": 128
},
"size": {
"type": "integer",
"description": "Size of shared storage",
"minimum": 20,
"maximum": 500,
"multipleOf": 10
},
"description": {
"type": "string",
"description": "Description of the shared storage",
"maxLength": 256
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the shared storage will be created"
},
"server_id": {
"type": "string",
"description": "ID of the server that will be attached to the block storage"
}
}
}
Example:
{
"name": "My new block storage",
"description": "My block storage description",
"size": 20,
"server" : "638ED28205B1AFD7ADEF569C725DD85F",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36"
}
HTTP status code 202
A new block_storage creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "CONFIGURING",
"description": "My block storage description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 4",
"creation_date": "2015-05-06T08:33:25+00:00",
"server": null
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "TECHNICAL_TARIFF_VIOLATION",
"message": "Too high 11 > 10.00",
"errors": {
"prefix": "ngcs.blockstorage",
"desired": 11,
"required": "10.00"
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a block_storage
Returns information about a block storage.
Modifies a block storage.
Removes a block storage.
get
/block_storages/{block_storage_id}
Returns information about a block storage.
URI Parameters
- block_storage_id: required (string)
Unique block storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Block storage ID"
},
"size": {
"type": "integer",
"description": "Block storage total size",
"minimum": 20,
"maximum": 500,
"multipleOf": 10
},
"state": {
"type": "string",
"description": "Block storage state"
},
"description": {
"type": "string",
"description": "Block storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"name": {
"type": "string",
"description": "Block storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when Block storage was created"
},
"server": {
"type": ["object","null"],
"descripition": "Server allowed to access to the block storage",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My block storage for containers",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 1",
"creation_date": "2015-05-06T08:33:25+00:00",
"server":
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BLOCK_STORAGE_NOT_FOUND",
"Message": "Block storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/block_storages/{block_storage_id}
Modifies a block storage.
URI Parameters
- block_storage_id: required (string)
Unique block storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "Name of the shared storage",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Description of the shared storage",
"maxLength": 256
},
"size": {
"type": "integer",
"description": "Size of the shared storage",
"minimum": 20,
"maximum": 500,
"multipleOf": 10
}
}
}
Example:
{
"name": "My block storage renamed",
"description": "My new description",
"size": 250
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Block storage ID"
},
"size": {
"type": "integer",
"description": "Block storage total size",
"minimum": 20,
"maximum": 500,
"multipleOf": 10
},
"state": {
"type": "string",
"description": "Block storage state"
},
"description": {
"type": "string",
"description": "Block storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"name": {
"type": "string",
"description": "Block storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when Block storage was created"
},
"server": {
"type": ["object","null"],
"descripition": "Server allowed to access to the block storage",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "CONFIGURING",
"description": "My block storage description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 4",
"creation_date": "2015-05-06T08:33:25+00:00",
"server":
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1"
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "TECHNICAL_TARIFF_VIOLATION",
"Message": "Wrong step 275 - 20.00",
"Errors": {
"prefix": "ngcs.blockstorage.size",
"desired": 275,
"required": "20.00",
"step": true
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "BLOCK_STORAGE_NOT_FOUND",
"Message": "Block storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/block_storages/{block_storage_id}
Removes a block storage.
URI Parameters
- block_storage_id: required (string)
Unique block storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the Block Storage is being removed.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Block storage ID"
},
"size": {
"type": "integer",
"description": "Block storage total size",
"minimum": 20,
"maximum": 500,
"multipleOf": 10
},
"state": {
"type": "string",
"description": "Block storage state"
},
"description": {
"type": "string",
"description": "Block storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"name": {
"type": "string",
"description": "Block storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when Block storage was created"
},
"server": {
"type": ["object","null"],
"descripition": "Server allowed to access to the block storage",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "REMOVING",
"description": "My block storage for containers",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 1",
"creation_date": "2015-05-06T08:33:25+00:00",
"server":
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "BLOCK_STORAGE_NOT_FOUND",
"Message": "Block storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Attaches a server to a block storage.
Returns server's information.
post
/block_storages/{block_storage_id}/server
Attaches a server to a block storage.
URI Parameters
- block_storage_id: required (string)
Unique block storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["server_id"],
"properties": {
"server_id": {
"type": "string",
"description": "Server ID"
}
}
}
Example:
{
"server_id": "638ED28205B1AFD7ADEF569C725DD85F"
}
HTTP status code 202
Body
Media type: application/json
Type: object
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My block storage for containers",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"name": "My block storage 1",
"creation_date": "2015-05-06T08:33:25+00:00",
"server":
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1"
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) servers missing or empty. ",
"Errors": {
"servers": 1
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
get
/block_storages/{block_storage_id}/server
Returns server's information.
URI Parameters
- block_storage_id: required (string)
Unique block storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My Server"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BLOCK_STORAGE_NOT_FOUND",
"Message": "Block storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Shared Storages
Collection of available methods for shared_storages
Returns a list of your shared_storages.
Adds a new shared_storage.
get
/shared_storages
Returns a list of your shared_storages.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of shared_storages that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Shared storage ID"
},
"size": {
"type": "integer",
"description": "Shared storage total size",
"minimum": 50,
"maximum": 2000,
"multipleOf": 50
},
"state": {
"type": "string",
"description": "Shared storage status"
},
"description": {
"type": "string",
"description": "Shared storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"size_used": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Size used of shared storage in percentage"
},
"cifs_path": {
"type": "string",
"description": "CIFS path for accessing to shared storage from Windows systems"
},
"nfs_path": {
"type": "string",
"description": "NFS path for accessing to shared storage from UNIX systems"
},
"name": {
"type": "string",
"description": "Shared storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when shared storage was created"
},
"servers": {
"type": "array",
"descripition": "Servers allowed to access to the shared storage",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"rights": {
"type": "string",
"description": "Access rights on server",
"enum": ["R", "RW"]
}
}
}
}
}
}
}
Example:
[
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My shared storage test description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"cloudpanel_id": "vid35780",
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage test",
"creation_date": "2015-05-06T08:33:25+00:00",
"servers": [
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1",
"rights": "RW"
}
]
},
{
"id": "4406CE4723BB441C7956E25C51CE8C1B",
"size": 50,
"state": "ACTIVE",
"description": "My shared storage description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"cloudpanel_id": "vid30534",
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage",
"creation_date": "2015-03-17T11:57:48+00:00",
"servers": []
},
{
"id": "1A5418172DD3BD39F8010A6633F1018A",
"size": 250,
"state": "ACTIVE",
"description": "",
"cloudpanel_id": "vid19857",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage 2",
"creation_date": "2015-05-05T09:36:31+00:00",
"servers": []
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/shared_storages
Adds a new shared_storage.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","size"],
"properties": {
"name": {
"type": "string",
"description": "Name of the shared storage",
"maxLength": 128
},
"size": {
"type": "integer",
"description": "Size of shared storage",
"minimum": 50,
"maximum": 2000,
"multipleOf": 50
},
"description": {
"type": "string",
"description": "Description of the shared storage",
"maxLength": 256
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the shared storage will be created"
}
}
}
Example:
{
"name": "My shared storage test",
"description": "My shared storage test description",
"size": 200,
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36"
}
HTTP status code 202
A new shared_storage creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "CONFIGURING",
"description": "My shared storage test description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"cloudpanel_id": "vid35780",
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage test",
"creation_date": "2015-05-06T08:33:25+00:00",
"servers": []
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "TECHNICAL_TARIFF_VIOLATION",
"message": "Too high 11 > 10.00",
"errors": {
"prefix": "ngcs.sharedstorage",
"desired": 11,
"required": "10.00"
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a shared_storage
Returns information about a shared storage.
Modifies a shared storage.
Removes a shared storage.
get
/shared_storages/{shared_storage_id}
Returns information about a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Shared storage ID"
},
"size": {
"type": "integer",
"description": "Shared storage total size",
"minimum": 50,
"maximum": 2000,
"multipleOf": 50
},
"state": {
"type": "string",
"description": "Shared storage status"
},
"description": {
"type": "string",
"description": "Shared storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"size_used": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Size used of shared storage in percentage"
},
"cifs_path": {
"type": "string",
"description": "CIFS path for accessing to shared storage from Windows systems"
},
"nfs_path": {
"type": "string",
"description": "NFS path for accessing to shared storage from UNIX systems"
},
"name": {
"type": "string",
"description": "Shared storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when shared storage was created"
},
"servers": {
"type": "array",
"description": "Servers allowed to access to the shared storage",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"rights": {
"type": "string",
"description": "Access rights on server",
"enum": ["R", "RW"]
}
}
}
}
}
}
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My shared storage test description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"cloudpanel_id": "vid35780",
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage test",
"creation_date": "2015-05-06T08:33:25+00:00",
"servers": [
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "My server 1",
"rights": "RW"
}
]
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SHARED_STORAGE_NOT_FOUND",
"Message": "Shared storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/shared_storages/{shared_storage_id}
Modifies a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "Name of the shared storage",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Description of the shared storage",
"maxLength": 256
},
"size": {
"type": "integer",
"description": "Size of the shared storage",
"minimum": 50,
"maximum": 2000,
"multipleOf": 50
}
}
}
Example:
{
"name": "My shared storage test rename",
"description": "My shared storage rename",
"size": 250
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Shared storage ID"
},
"size": {
"type": "integer",
"description": "Shared storage total size",
"minimum": 50,
"maximum": 2000,
"multipleOf": 50
},
"state": {
"type": "string",
"description": "Shared storage status"
},
"description": {
"type": "string",
"description": "Shared storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"size_used": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Size used of shared storage in percentage"
},
"cifs_path": {
"type": "string",
"description": "CIFS path for accessing to shared storage from Windows systems"
},
"nfs_path": {
"type": "string",
"description": "NFS path for accessing to shared storage from UNIX systems"
},
"name": {
"type": "string",
"description": "Shared storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when shared storage was created"
},
"servers": {
"type": "array",
"description": "Servers allowed to access to the shared storage",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"rights": {
"type": "string",
"description": "Access rights on server",
"enum": ["R", "RW"]
}
}
}
}
}
}
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My shared storage description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"cloudpanel_id": "vid35780",
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage test rename",
"creation_date": "2015-05-06T08:33:25+00:00",
"servers": [
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "Mi servidor 1",
"rights": "RW"
}
]
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "TECHNICAL_TARIFF_VIOLATION",
"Message": "Wrong step 275 - 50.00",
"Errors": {
"prefix": "ngcs.sharedstorage.size",
"desired": 275,
"required": "50.00",
"step": true
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SHARED_STORAGE_NOT_FOUND",
"Message": "Shared storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/shared_storages/{shared_storage_id}
Removes a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the Shared Storage is being removed.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Shared storage ID"
},
"size": {
"type": "integer",
"description": "Shared storage total size",
"minimum": 50,
"maximum": 2000,
"multipleOf": 50
},
"state": {
"type": "string",
"description": "Shared storage status"
},
"description": {
"type": "string",
"description": "Shared storage description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"size_used": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Size used of shared storage in percentage"
},
"cifs_path": {
"type": "string",
"description": "CIFS path for accessing to shared storage from Windows systems"
},
"nfs_path": {
"type": "string",
"description": "NFS path for accessing to shared storage from UNIX systems"
},
"name": {
"type": "string",
"description": "Shared storage's name"
},
"creation_date": {
"type": "string",
"description": "Date when shared storage was created"
},
"servers": {
"type": "array",
"description": "Servers allowed to access to the shared storage",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"rights": {
"type": "string",
"description": "Access rights on server",
"enum": ["R", "RW"]
}
}
}
}
}
}
Example:
{
"id": "A911FD8D77037426880A9774992FE2A6",
"cloudpanel_id": "vid38511",
"name": "My Shared Storage Test",
"description": "",
"size": 50,
"state": "REMOVING",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"creation_date": "2015-04-06T23:48:38Z",
"size_used": 3.23,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"servers": [
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My Server",
"rights": "RW"
},
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4",
"name": "My Server 2",
"rights": "R"
}
]
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SHARED_STORAGE_NOT_FOUND",
"Message": "Shared storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns a list of the servers attached to a shared storage.
Attaches servers to a shared storage.
get
/shared_storages/{shared_storage_id}/servers
Returns a list of the servers attached to a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"rights": {
"type": "string",
"description": "Access rights on server",
"enum": ["R", "RW"]
}
}
}
}
Example:
[
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My Server",
"rights": "RW"
},
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4",
"name": "My Server 2",
"rights": "R"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SHARED_STORAGE_NOT_FOUND",
"Message": "Shared storage not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/shared_storages/{shared_storage_id}/servers
Attaches servers to a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["servers"],
"properties": {
"servers": {
"type": "array",
"items": {
"type": "object",
"required": ["id","rights"],
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"rights": {
"type": "string",
"description": "Rights for accessing from servers",
"enum": ["R", "RW"]
}
}
}
}
}
}
Example:
{
"servers":[
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"rights": "RW"
},
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"rights": "R"
}
]
}
HTTP status code 202
Body
Media type: application/json
Type: object
Example:
{
"id": "6AD2F180B7B666539EF75A02FE227084",
"size": 200,
"state": "ACTIVE",
"description": "My shared storage description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"cloudpanel_id": "vid35780",
"size_used": 0.00,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"name": "My shared storage test rename",
"creation_date": "2015-05-06T08:33:25+00:00",
"servers": [
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "Mi servidor 1",
"rights": "RW"
},
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My Server remame",
"rights": "R"
}
]
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) servers missing or empty. ",
"Errors": {
"servers": 1
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns information about a server attached to a shared storage.
Unattaches a server from a shared storage.
get
/shared_storages/{shared_storage_id}/servers/{server_id}
Returns information about a server attached to a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Server information",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"rights": {
"type": "string",
"description": "Access rights on server",
"enum": ["R", "RW"]
}
}
}
Example:
{
"id": "638ED28205B1AFD7ADEF569C725DD85F",
"name": "Mi servidor 1",
"rights": "RW"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "SHARED_STORAGE_NOT_FOUND",
"Message": "Shared storage not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/shared_storages/{shared_storage_id}/servers/{server_id}
Unattaches a server from a shared storage.
URI Parameters
- shared_storage_id: required (string)
Unique shared storage's identifier.
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the server it's just being unattached.
Body
Media type: application/json
Type: object
Example:
{
"id": "A911FD8D77037426880A9774992FE2A6",
"cloudpanel_id": "vid38511",
"name": "My Shared Storage Test",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"size": 50,
"state": "CREATING",
"creation_date": "2015-04-06T23:48:38Z",
"size_used": 3.23,
"cifs_path": "\\\\vid50995.nas1.lan\\vid50995",
"nfs_path": "vid50995.nas1.lan/:vid50995",
"servers": [
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My Server",
"rights": "RW"
}
]
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SHARED_STORAGE_NOT_FOUND",
"Message": "Shared storage not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Returns the credentials for accessing the shared storages.
Changes the password for accessing the shared storages.
get
/shared_storages/access
Returns the credentials for accessing the shared storages.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"kerberos_content_file": {
"description": "The Kerberos key is an encryption file. This encryption file is needed to set up the shared storage.",
"type": "string"
},
"state": {
"type": "string",
"description": "Shared storage state"
},
"user_domain": {
"type": "string",
"description": "User of the shared storage account"
}
}
}
}
Example:
[
{
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"state": "CONFIGURING",
"kerberos_content_file": "BQIAAABSAAIACERFVjEuTEFOAANuZnMAEnVpZDYyNDQ1OS5kZXYxLmxhbgAAAAEAAAAAQAASACAobHpZknT8WqX14kQhOrFI9hwO37NUg/p3Ne/8w2MPJA==",
"needs_password_reset": 0,
"user_domain": "nas2\\uid183564"
},
{
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"state": "CONFIGURING",
"kerberos_content_file": "BQIAAABSAAIACERFVjEuTEFOAANuZnMAEnVpZDYyNDQ1OS5kZXYxLmxhbgAAAAEAAAAAQQASACAobHpZknT8WqX14kQhOrFI9hwO37NUg/p3Ne/8w2MPJA==",
"needs_password_reset": 0,
"user_domain": "nas2\\uid183564"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/shared_storages/access
Changes the password for accessing the shared storages.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["password"],
"properties": {
"password": {
"type": "string",
"description": "New user pass for accessing to storages. Pass must contain at least 8 characters using uppercase letters, numbers and other special symbols.",
"minLength": 8,
"maxLength": 64
}
}
}
Example:
{
"password": "asdasdfgagsw32"
}
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: object
Example:
[
{
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"state": "CONFIGURING",
"kerberos_content_file": "BQIAAABSAAIACERFVjEuTEFOAANuZnMAEnVpZDYyNDQ1OS5kZXYxLmxhbgAAAAEAAAAAQAASACAobHpZknT8WqX14kQhOrFI9hwO37NUg/p3Ne/8w2MPJA==",
"needs_password_reset": 0,
"user_domain": "nas2\\uid183564"
},
{
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"state": "CONFIGURING",
"kerberos_content_file": "BQIAAABSAAIACERFVjEuTEFOAANuZnMAEnVpZDYyNDQ1OS5kZXYxLmxhbgAAAAEAAAAAQQASACAobHpZknT8WqX14kQhOrFI9hwO37NUg/p3Ne/8w2MPJA==",
"needs_password_reset": 0,
"user_domain": "nas2\\uid183564"
}
]
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Wrong value Field(s) password",
"Errors": {
"password": 1
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Firewall Policies
Collection of available methods for firewall_policies
Returns a list of your firewall_policies.
Adds a new firewall_policy.
get
/firewall_policies
Returns a list of your firewall_policies.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of firewall_policies that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"description": "Firewall policies",
"$schema": "http://json-schema.org/draft-06/schema",
"items":{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy identifier"
},
"name": {
"type": "string",
"description": "Firewall policy name"
},
"description": {
"type": "string",
"description": "Firewall policy description"
},
"state": {
"type": "string",
"description": "Firewall policy state"
},
"creation_date": {
"type": "string",
"description": "Date when firewall policy was created"
},
"default": {
"type": "integer",
"description": "Define default panel firewalls (1)"
},
"rules": {
"type": "array",
"description": "Firewall policy rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range",
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to firewall policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
}
Example:
[
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "My firewall policy test",
"description": "My firewall policy description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
},
{
"id": "83522FC7DA9172F229E5352C587075B9",
"name": "My firewall policy test 2",
"description": "My firewall policy description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86F",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A64A",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/firewall_policies
Adds a new firewall_policy.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","rules"],
"properties": {
"name": {
"type": "string",
"description": "Firewall policy name",
"maxLength": 128
},
"rules": {
"type": "array",
"items": {
"type": "object",
"required": ["protocol"],
"properties": {
"port_from": {
"type": "integer",
"description": "First port in range. Required for UDP and TCP protocols, otherwise it will be set up automatically.",
"minimum": 1,
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range. Required for UDP and TCP protocols, otherwise it will be set up automatically.",
"maximum": 65535
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","AH","ESP", "GRE"]
},
"source": {
"type": "string",
"description": "IPs from which access is available. Setting 0.0.0.0 all IPs are allowed.",
"default": "0.0.0.0"
}
}
}
},
"description": {
"type": "string",
"description": "Firewall policy description",
"maxLength": 256
}
}
}
Example:
{
"name": "My firewall policy",
"description": "My firewall policy description",
"rules": [
{
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
]
}
HTTP status code 202
A new firewall_policy creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "My firewall policy test",
"description": "My firewall policy description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_NAME",
"Message": "A firewall policy already exists with this name",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a firewall_policy
Returns firewall_policy's information.
Modifies a firewall_policy.
Removes a firewall_policy.
get
/firewall_policies/{firewall_id}
Returns firewall_policy's information.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy identifier"
},
"name": {
"type": "string",
"description": "Firewall policy name"
},
"description": {
"type": "string",
"description": "Firewall policy description"
},
"state": {
"type": "string",
"description": "Firewall policy state"
},
"creation_date": {
"type": "string",
"description": "Date when firewall policy was created"
},
"default": {
"type": "integer",
"description": "Define default panel firewalls (1)"
},
"rules": {
"type": "array",
"description": "Firewall policy rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range",
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to the firewall policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "My firewall policy test",
"description": "My firewall policy description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/firewall_policies/{firewall_id}
Modifies a firewall_policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "Firewall policy name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Firewall policy description",
"maxLength": 256
}
}
}
Example:
{
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description"
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_NAME",
"Message": "A firewall policy already exists with this name",
"Errors": null
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default firewall policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/firewall_policies/{firewall_id}
Removes a firewall_policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the firewall_policy it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description",
"state": "REMOVING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default firewall policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server_ip
Returns a list of the servers/IPs attached to a firewall policy.
Assigns servers/IPs to a firewall policy.
get
/firewall_policies/{firewall_id}/server_ips
Returns a list of the servers/IPs attached to a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"description": "Servers assigned to the firewall policy",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
}
Example:
[
{
"id": "01D4A802798AB77AA72DA2D05E1379E1",
"ip": "10.5.135.140",
"server_name": "My Server 2"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/firewall_policies/{firewall_id}/server_ips
Assigns servers/IPs to a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["server_ips"],
"properties": {
"server_ips": {
"type": "array",
"items": {
"type": "string",
"description": "Server ID"
}
}
}
}
Example:
{
"server_ips":[
"01D4A802798AB77AA72DA2D05E1379E1"
]
}
HTTP status code 202
A new server_ip creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [
{
"id": "01D4A802798AB77AA72DA2D05E1379E1",
"ip": "10.5.135.140",
"server_name": "My Server 2"
}
],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Required field(s) server_ips missing or empty. ",
"errors": {
"required": "server_ips"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server_ip
Returns information about a server/IP assigned to a firewall policy.
Unassigns a server/IP from a firewall policy.
get
/firewall_policies/{firewall_id}/server_ips/{server_ip}
Returns information about a server/IP assigned to a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
- server_ip: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Servers assigned to the firewall policy",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
Example:
{
"id": "01D4A802798AB77AA72DA2D05E1379E1",
"ip": "10.5.135.140",
"server_name": "My Server 2"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/firewall_policies/{firewall_id}/server_ips/{server_ip}
Unassigns a server/IP from a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
- server_ip: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the server_ip it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy identifier"
},
"name": {
"type": "string",
"description": "Firewall policy name"
},
"description": {
"type": "string",
"description": "Firewall policy description"
},
"state": {
"type": "string",
"description": "Firewall policy state"
},
"creation_date": {
"type": "string",
"description": "Date when firewall policy was created"
},
"default": {
"type": "integer",
"description": "Define default panel firewalls (1)"
},
"rules": {
"type": "array",
"description": "Firewall policy rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range",
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to the firewall policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a rule
Returns a list of the rules of a firewall policy.
Adds new rules to a firewall policy.
get
/firewall_policies/{firewall_id}/rules
Returns a list of the rules of a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"description": "Servers assigned to the firewall policy",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
}
Example:
[
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/firewall_policies/{firewall_id}/rules
Adds new rules to a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["rules"],
"properties": {
"rules": {
"type": "array",
"items": {
"type": "object",
"required": ["protocol"],
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range. Required for UDP and TCP protocols, otherwise it will be set up automatically.",
"minimum": 1,
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range. Required for UDP and TCP protocols, otherwise it will be set up automatically.",
"maximum": 65535
},
"source": {
"type": "string",
"description": "IPs from which access is available. Setting 0.0.0.0 all IPs are allowed."
}
}
}
}
}
}
Example:
{
"rules": [
{
"protocol": "TCP",
"port_from": 4567,
"port_to": 4567,
"source": "0.0.0.0"
}
]
}
HTTP status code 202
A new rule creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy identifier"
},
"name": {
"type": "string",
"description": "Firewall policy name"
},
"description": {
"type": "string",
"description": "Firewall policy description"
},
"state": {
"type": "string",
"description": "Firewall policy state"
},
"creation_date": {
"type": "string",
"description": "Date when firewall policy was created"
},
"default": {
"type": "integer",
"description": "Define default panel firewalls (1)"
},
"rules": {
"type": "array",
"description": "Firewall policy rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range",
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to the firewall policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
},
{
"id": "353E9F751630074CF7219747436A8D71",
"protocol": "TCP",
"port_from": 4567,
"port_to": 4567,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Required field(s) rules missing or empty. ",
"errors": {
"required": "rules"
}
}
HTTP status code 403
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default firewall policy",
"errors": null
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a rule
Returns information about a rule of a firewall policy.
Removes a rule from a firewall policy.
get
/firewall_policies/{firewall_id}/rules/{rule_id}
Returns information about a rule of a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
- rule_id: required (string)
Unique rule's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Firewall policy rules",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range",
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
Example:
{
"id": "353E9F751630074CF7219747436A8D71",
"protocol": "TCP",
"port_from": 4567,
"port_to": 4567,
"source": "0.0.0.0"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
{
"Type": "RULE_NOT_FOUND",
"Message": "Firewall rule does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/firewall_policies/{firewall_id}/rules/{rule_id}
Removes a rule from a firewall policy.
URI Parameters
- firewall_id: required (string)
Unique firewall's identifier.
- rule_id: required (string)
Unique rule's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the rule it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Firewall policy identifier"
},
"name": {
"type": "string",
"description": "Firewall policy name"
},
"description": {
"type": "string",
"description": "Firewall policy description"
},
"state": {
"type": "string",
"description": "Firewall policy state"
},
"creation_date": {
"type": "string",
"description": "Date when firewall policy was created"
},
"default": {
"type": "integer",
"description": "Define default panel firewalls (1)"
},
"rules": {
"type": "array",
"description": "Firewall policy rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP","UDP","ICMP","TCP/UDP","IPSEC", "GRE"]
},
"port_from": {
"type": "integer",
"description": "First port in range",
"maximum": 65535
},
"port_to": {
"type": "integer",
"description": "Second port in range",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to the firewall policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "83522FC7DA9172F229E5352C587075BA",
"name": "Firewall policy rename test",
"description": "Firewall policy rename test description",
"state": "CONFIGURING",
"creation_date": "2015-04-29T10:43:11+00:00",
"default": 0,
"rules": [
{
"id": "DA5CC179ED00079AE7DE595F0073D86E",
"protocol": "TCP",
"port_from": 80,
"port_to": 80,
"source": "0.0.0.0"
},
{
"id": "0766EC674A0CD9D4EC0FA0B07978A649",
"protocol": "TCP",
"port_from": 443,
"port_to": 443,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "FW99AA4_7"
}
HTTP status code 403
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default firewall policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "FIREWALL_NOT_FOUND",
"Message": "Firewall policy not found",
"Errors": null
}
{
"Type": "RULE_NOT_FOUND",
"Message": "Firewall rule does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Load Balancers
Collection of available methods for load_balancers
Returns a list of your load_balancers.
Adds a new load_balancer.
get
/load_balancers
Returns a list of your load_balancers.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of load_balancers that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Load balancer ID"
},
"name": {
"type": "string",
"description": "Load balancer name"
},
"state": {
"type": "string",
"description": "Load balancer status"
},
"creation_date": {
"type": "string",
"description": "Date when load balancer was created"
},
"description": {
"type": "string",
"description": "Load balancer description"
},
"ip": {
"type": "string",
"description": "Load balancer IP"
},
"health_check_test": {
"type": "string",
"description": "Type of health check",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period",
"minimum": 5,
"maximum": 300
},
"health_check_path": {
"type": ["string", "null"],
"description": "URL to call for checking"
},
"health_check_path_parser": {
"type": ["string", "null"],
"description": "Regular expression to check"
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time",
"minimum": 30,
"maximum": 1200
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"rules": {
"type": "array",
"description": "Load balancer rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer",
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to load balancer",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
}
Example:
[
{
"id": "B23F1B4F84E983B4FEDD5459E877058A",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-03-03T11:12:00+00:00",
"description": "My load balancer description",
"ip": "10.5.138.52",
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "D7A0A7C445D844848EBB439C28B46183",
"protocol": "TCP",
"port_balancer": 22,
"port_server": 22,
"source": "0.0.0.0"
},
{
"id": "9AE836CDE379EEB361287F07B3300F84",
"protocol": "TCP",
"port_balancer": 85,
"port_server": 85,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
},
{
"id": "B23F1B4F84E983B4FEDD5459E877058B",
"name": "My Load Balancer II",
"state": "CONFIGURING",
"creation_date": "2015-03-03T11:12:00+00:00",
"description": "My load balancer II description",
"ip": "10.5.138.53",
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"region": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "D7A0A7C445D844848EBB439C28B46184",
"protocol": "TCP",
"port_balancer": 22,
"port_server": 22,
"source": "0.0.0.0"
},
{
"id": "9AE836CDE379EEB361287F07B3300F85",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 9999,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
]
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Persistence time is required",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/load_balancers
Adds a new load_balancer.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","health_check_test","health_check_interval","persistence","persistence_time","method","rules"],
"properties": {
"name": {
"type": "string",
"description": "Load balancer name",
"maxLength": 128
},
"health_check_test": {
"type": "string",
"description": "Type of the health check. At the moment, HTTP is not allowed.",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period in seconds",
"minimum": 5,
"maximum": 300,
"multipleOf": 1
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time in seconds. Required if persistence is enabled.",
"minimum": 30,
"maximum": 1200,
"multipleOf": 1
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the load balancer will be created"
},
"rules": {
"type": "array",
"required": ["protocol","port_balancer","port_server"],
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "number",
"description": "Port in balancer. Port 0 means every port. Only can be used if also 0 is set in port_server and health_check_test is set to NONE or ICMP.",
"minimum": 0,
"maximum": 65535
},
"port_server": {
"type": "number",
"description": "Port in server. Port 0 means every port. Only can be used if also 0 is set in port_balancer and health_check_test is set to NONE or ICMP.",
"minimum": 0,
"maximum": 65535
},
"source": {
"type": "string",
"description": "IPs from which access is available. Setting 0.0.0.0 allows all IPs",
"default": "0.0.0.0"
}
}
}
},
"description": {
"type": "string",
"description": "Description of the load balancer",
"maxLength": 256
},
"health_check_path": {
"type": ["string", "null"],
"description": "Url to call for cheking. Required for HTTP health check.",
"maxLength": 1000
},
"health_check_parse": {
"type": ["string", "null"],
"description": "Regular expression to check. Required for HTTP health check.",
"maxLength": 64
}
}
}
Example:
{
"name": "My load balancer",
"description": "My load balancer description",
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"rules": [
{
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
]
}
HTTP status code 202
A new load_balancer creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "BD8318616581A9C3C53F94402503230F",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-05-04T07:26:24+00:00",
"description": "My load balancer description",
"ip": null,
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "BCFAF421227674B2B324F779C1163ECB",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "7390C04142800E006FF1B0132FFD8F9A",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Persistence time is required",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a load_balancer
Returns load_balancer's information.
Modifies a load_balancer.
Removes a load_balancer.
get
/load_balancers/{load_balancer_id}
Returns load_balancer's information.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Load balancer ID"
},
"name": {
"type": "string",
"description": "Load balancer name"
},
"state": {
"type": "string",
"description": "Load balancer status"
},
"creation_date": {
"type": "string",
"description": "Date when load balancer was created"
},
"description": {
"type": "string",
"description": "Load balancer description"
},
"ip": {
"type": ["string","null"],
"description": "Load balancer IP"
},
"health_check_test": {
"type": "string",
"description": "Type of health check",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period",
"minimum": 5,
"maximum": 300
},
"health_check_path": {
"type": ["string","null"],
"description": "URL to call for checking"
},
"health_check_path_parser": {
"type": ["string","null"],
"description": "Regular expression to check"
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time",
"minimum": 30,
"maximum": 1200
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"rules": {
"type": "array",
"description": "Load balancer rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer",
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to load balancer",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "B23F1B4F84E983B4FEDD5459E877058A",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-03-03T11:12:00+00:00",
"description": "My load balancer description",
"ip": "10.5.138.52",
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"method": "ROUND_ROBIN",
"rules": [
{
"id": "D7A0A7C445D844848EBB439C28B46183",
"protocol": "TCP",
"port_balancer": 22,
"port_server": 22,
"source": "0.0.0.0"
},
{
"id": "9AE836CDE379EEB361287F07B3300F84",
"protocol": "TCP",
"port_balancer": 85,
"port_server": 85,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/load_balancers/{load_balancer_id}
Modifies a load_balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "Load balancer name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Load balancer description",
"maxLength": 256
},
"health_check_test": {
"type": "string",
"description": "Type of health check. At the moment, HTTP is not allowed.",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period in seconds",
"minimum": 5,
"maximum": 300,
"multipleOf": 1
},
"health_check_path": {
"type": "string",
"description": "Url to call for checking. Required for HTTP health check.",
"maxLength": 1000
},
"health_check_parse": {
"type": "string",
"description": "Regular expression to check. Required for HTTP health check.",
"maxLength": 64
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time in seconds. Required if persistence is enabled.",
"minimum": 30,
"maximum": 1200,
"multipleOf": 1
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
}
}
}
Example:
{
"name": "My load balancer rename",
"description": "My load balancer rename description",
"health_check_test": "TCP",
"health_check_interval": 40,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN"
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "B23F1B4F84E983B4FEDD5459E877058A",
"name": "My load rename balancer",
"state": "CONFIGURING",
"creation_date": "2015-03-03T11:12:00+00:00",
"description": "My load balancer rename description",
"ip": "10.5.138.52",
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "D7A0A7C445D844848EBB439C28B46183",
"protocol": "TCP",
"port_balancer": 22,
"port_server": 22,
"source": "0.0.0.0"
},
{
"id": "9AE836CDE379EEB361287F07B3300F84",
"protocol": "TCP",
"port_balancer": 85,
"port_server": 85,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Invalid method. Valid methods are ROUND_ROBIN and LEAST_CONNECTIONS",
"Errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/load_balancers/{load_balancer_id}
Removes a load_balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the load_balancer it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "BD8318616581A9C3C53F94402503230F",
"name": "My load balancer",
"state": "REMOVING",
"creation_date": "2015-05-04T07:26:24+00:00",
"description": "My load balancer description",
"ip": null,
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "4E2E2E596F3D7839554C3CCB091038C2",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "38797962095C33C2ACE883E1254A0EFA",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server_ip
Returns a list of the servers/IPs attached to a load balancer.
Assigns servers/IPs to a firewall policy.
get
/load_balancers/{load_balancer_id}/server_ips
Returns a list of the servers/IPs attached to a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Servers assigned to load balancer",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
}
Example:
[
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"ip": "123.45.79.100",
"server_name": "My server 1"
},
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"ip": "87.64.31.100",
"server_name": "My server 2"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/load_balancers/{load_balancer_id}/server_ips
Assigns servers/IPs to a firewall policy.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["server_ips"],
"properties": {
"server_ips": {
"type": "array",
"items": {
"type": "string",
"description": "Server ID"
}
}
}
}
Example:
{
"server_ips":[
"7C88E50FBC500A3D9D7F94E414255D6B",
"7288E50FBC500A3D9D7F94E414255D6B"
]
}
HTTP status code 202
A new server_ip creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "BD8318616581A9C3C53F94402503230F",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-05-04T07:26:24+00:00",
"description": "My load balancer description",
"ip": null,
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "BCFAF421227674B2B324F779C1163ECB",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "7390C04142800E006FF1B0132FFD8F9A",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
],
"server_ips": [
{
"id": "6F033A13C3EFCE0FB60783280A118D63",
"ip": "10.5.133.191",
"server_name": "My Server 1"
}
],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Required field(s) server_ips missing or empty. ",
"errors": {
"required": "server_ips"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server_ip
Returns information about a server/IP assigned to a load balancer.
Unassigns a server/IP from a load balancer.
get
/load_balancers/{load_balancer_id}/server_ips/{server_ip}
Returns information about a server/IP assigned to a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
- server_ip: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"ip": "123.46.79.100",
"server_name": "My server 1"
}
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"ip": "123.46.79.100",
"server_name": "My server 1"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/load_balancers/{load_balancer_id}/server_ips/{server_ip}
Unassigns a server/IP from a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
- server_ip: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the server_ip it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Load balancer ID"
},
"name": {
"type": "string",
"description": "Load balancer name"
},
"state": {
"type": "string",
"description": "Load balancer status"
},
"creation_date": {
"type": "string",
"description": "Date when load balancer was created"
},
"description": {
"type": "string",
"description": "Load balancer description"
},
"ip": {
"type": ["string","null"],
"description": "Load balancer IP"
},
"health_check_test": {
"type": "string",
"description": "Type of health check",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period",
"minimum": 5,
"maximum": 300
},
"health_check_path": {
"type": ["string","null"],
"description": "URL to call for checking"
},
"health_check_path_parser": {
"type": ["string","null"],
"description": "Regular expression to check"
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time",
"minimum": 30,
"maximum": 1200
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"rules": {
"type": "array",
"description": "Load balancer rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer",
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to load balancer",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "BD8318616581A9C3C53F94402503230F",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-05-04T07:26:24+00:00",
"description": "My load balancer description",
"ip": null,
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "BCFAF421227674B2B324F779C1163ECB",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "7390C04142800E006FF1B0132FFD8F9A",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a rule
Returns a list of the rules of a load balancer.
Adds new rules to a load balancer.
get
/load_balancers/{load_balancer_id}/rules
Returns a list of the rules of a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"description": "Servers assigned to the firewall policy",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
}
Example:
[
{
"id": "BCFAF421227674B2B324F779C1163ECB",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "7390C04142800E006FF1B0132FFD8F9A",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/load_balancers/{load_balancer_id}/rules
Adds new rules to a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["rules"],
"properties": {
"rules": {
"type": "array",
"required": ["protocol","port_balancer","port_server"],
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer. Port 0 means every port. Only can be used if also 0 is set in port_server and health_check_test is set to NONE or ICMP.",
"minimum": 0,
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server. Port 0 means every port. Only can be used if also 0 is set in port_balancer and health_check_test is set to NONE or ICMP.",
"minimum": 0,
"maximum": 65535
},
"source": {
"type": "string",
"description": "IPs from which access is available. Seting 0.0.0.0 allows access for all IPs",
"default": "0.0.0.0"
}
}
}
}
}
}
Example:
{
"rules":[
{
"protocol": "TCP",
"port_balancer": 82,
"port_server": 82,
"source": "0.0.0.0"
}
]
}
HTTP status code 202
A new rule creation has been accepted and it's just being created.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Load balancer ID"
},
"name": {
"type": "string",
"description": "Load balancer name"
},
"state": {
"type": "string",
"description": "Load balancer status"
},
"creation_date": {
"type": "string",
"description": "Date when load balancer was created"
},
"description": {
"type": "string",
"description": "Load balancer description"
},
"ip": {
"type": ["string","null"],
"description": "Load balancer IP"
},
"health_check_test": {
"type": "string",
"description": "Type of health check",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period",
"minimum": 5,
"maximum": 300
},
"health_check_path": {
"type": ["string","null"],
"description": "URL to call for checking"
},
"health_check_path_parser": {
"type": ["string","null"],
"description": "Regular expression to check"
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time",
"minimum": 30,
"maximum": 1200
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"rules": {
"type": "array",
"description": "Load balancer rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer",
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to load balancer",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "BD8318616581A9C3C53F94402503230F",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-05-04T07:26:24+00:00",
"description": "My load balancer description",
"ip": null,
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "4E2E2E596F3D7839554C3CCB091038C2",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "38797962095C33C2ACE883E1254A0EFA",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
},
{
"id": "C734A7EF31C00A3D0AA157C9A0A6F350",
"protocol": "TCP",
"port_balancer": 82,
"port_server": 82,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETER",
"message": "The rules are overlapping",
"errors": null
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a rule
Returns information about a rule of a load balancer.
Removes a rule from a load balancer.
get
/load_balancers/{load_balancer_id}/rules/{rule_id}
Returns information about a rule of a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
- rule_id: required (string)
Unique rule's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer",
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
Example:
{
"id": "BCFAF421227674B2B324F779C1163ECB",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
{
"Type": "RULE_NOT_FOUND",
"Message": "Load balancer rule does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/load_balancers/{load_balancer_id}/rules/{rule_id}
Removes a rule from a load balancer.
URI Parameters
- load_balancer_id: required (string)
Unique load balancer's identifier.
- rule_id: required (string)
Unique rule's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the rule it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Load balancer ID"
},
"name": {
"type": "string",
"description": "Load balancer name"
},
"state": {
"type": "string",
"description": "Load balancer status"
},
"creation_date": {
"type": "string",
"description": "Date when load balancer was created"
},
"description": {
"type": "string",
"description": "Load balancer description"
},
"ip": {
"type": ["string","null"],
"description": "Load balancer IP"
},
"health_check_test": {
"type": "string",
"description": "Type of health check",
"enum": ["NONE","TCP","HTTP","ICMP"]
},
"health_check_interval": {
"type": "integer",
"description": "Health check period",
"minimum": 5,
"maximum": 300
},
"health_check_path": {
"type": ["string","null"],
"description": "URL to call for checking"
},
"health_check_path_parser": {
"type": ["string","null"],
"description": "Regular expression to check"
},
"persistence": {
"type": "boolean",
"description": "Persistence"
},
"persistence_time": {
"type": "integer",
"description": "Persistence time",
"minimum": 30,
"maximum": 1200
},
"method": {
"type": "string",
"description": "Balancing procedure",
"enum": ["ROUND_ROBIN", "LEAST_CONNECTIONS"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"rules": {
"type": "array",
"description": "Load balancer rules",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Rule ID"
},
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port_balancer": {
"type": "integer",
"description": "Port in balancer",
"maximum": 65535
},
"port_server": {
"type": "integer",
"description": "Port in server",
"maximum": 65535
},
"source": {
"type": "string",
"description": "Array of IPs from which access to API will be available"
}
}
}
},
"server_ips": {
"type": "array",
"description": "Servers assigned to load balancer",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"ip": {
"type": "string",
"description": "Server IP"
},
"server_name": {
"type": "string",
"description": "Server name"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "BD8318616581A9C3C53F94402503230F",
"name": "My load balancer",
"state": "CONFIGURING",
"creation_date": "2015-05-04T07:26:24+00:00",
"description": "My load balancer description",
"ip": null,
"health_check_test": "TCP",
"health_check_interval": 40,
"health_check_path": null,
"health_check_path_parser": null,
"persistence": true,
"persistence_time": 1200,
"method": "ROUND_ROBIN",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"rules": [
{
"id": "4E2E2E596F3D7839554C3CCB091038C2",
"protocol": "TCP",
"port_balancer": 80,
"port_server": 80,
"source": "0.0.0.0"
},
{
"id": "38797962095C33C2ACE883E1254A0EFA",
"protocol": "TCP",
"port_balancer": 9999,
"port_server": 8888,
"source": "0.0.0.0"
}
],
"server_ips": [],
"cloudpanel_id": "LB99AA4_1"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "BALANCER_NOT_FOUND",
"Message": "Load balancer not found",
"Errors": null
}
{
"Type": "RULE_NOT_FOUND",
"Message": "Load balancer rule does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Public IPs
Collection of available methods for public_ips
Returns a list of your public_ips.
Adds a new public_ip.
get
/public_ips
Returns a list of your public_ips.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of public_ips that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"type": {
"type": "string",
"description": "Type of IP (currently, only IPv4 is available)",
"enum": ["IPV4", "IPV6"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"assigned_to": {
"type": ["object","null"],
"properties": {
"id": {
"type": "string",
"description": "IP owner�s ID"
},
"name": {
"type": "string",
"description": "IP owner�s name"
},
"type": {
"type": "string",
"description": "IP owner",
"enum": ["SERVER", "LOAD_BALANCER"]
}
}
},
"reverse_dns": {
"type": "null",
"description": "Reverse DNS name"
},
"is_dhcp": {
"type": "boolean",
"description": "True if IP is assigned using DHCP"
},
"state": {
"type": "string",
"description": "IP status"
},
"creation_date": {
"type": "string",
"description": "Date when IP was created"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
}
Example:
[
{
"id": "569FA2EC06DD48C9E8635F3384A018DB",
"ip": "10.5.138.52",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": {
"id": "B23F1B4F84E983B4FEDD5459E877058A",
"name": "My load balancer",
"type": "LOAD_BALANCER"
},
"reverse_dns": null,
"is_dhcp": false,
"state": "ACTIVE",
"creation_date": "2015-03-03T11:12:10+00:00"
},
{
"id": "6F033A13C3EFCE0FB60783280A118D63",
"ip": "10.5.133.191",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": {
"id": "BDAF0EC6A36E9E554B80B7E7365821F5",
"name": "My Server 1",
"type": "SERVER"
},
"reverse_dns": null,
"is_dhcp": true,
"state": "ACTIVE",
"creation_date": "2015-05-04T07:21:37+00:00"
},
{
"id": "39C73A57B33DAF2F9FA1EBEA4C301FCF",
"ip": "10.5.138.81",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": {
"id": "B23F1B4F84E983B4FEDD5459E877058A",
"name": "My load balancer",
"type": "LOAD_BALANCER"
},
"reverse_dns": null,
"is_dhcp": false,
"state": "ACTIVE",
"creation_date": "2015-03-03T11:13:16+00:00"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/public_ips
Adds a new public_ip.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"reverse_dns": {
"type": "string",
"description": "Reverse DNS name",
"maxLength": 256
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the IP will be created (only for unassigned IPs)"
},
"type": {
"type": "string",
"description": "Type of IP. Currently, only IPV4 is available.",
"enum": ["IPV4", "IPV6"],
"default": "IPV4"
}
}
}
Example:
{
"reverse_dns": "example.com",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD362",
"type": "IPV4"
}
HTTP status code 201
A new public_ip creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "44972922D045B9648118AA80FF2A51C9",
"ip": "10.4.140.155",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": null,
"reverse_dns": "example.com",
"is_dhcp": false,
"state": "ACTIVE",
"creation_date": "2015-05-06T08:17:33+00:00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Invalid type. Only IPV4 allowed",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a public_ip
Returns public_ip's information.
Modifies a public_ip.
Removes a public_ip.
get
/public_ips/{ip_id}
Returns public_ip's information.
URI Parameters
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "IP identifier"
},
"ip": {
"type": "string",
"description": "IP"
},
"type": {
"type": "string",
"description": "Type of IP (currently, only IPv4 is available)",
"enum": ["IPV4", "IPV6"]
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"assigned_to": {
"type": ["object","null"],
"properties": {
"id": {
"type": "string",
"description": "IP owner’s ID"
},
"name": {
"type": "string",
"description": "IP owner’s name"
},
"type": {
"type": "string",
"description": "IP owner",
"enum": ["SERVER", "LOAD_BALANCER"]
}
}
},
"reverse_dns": {
"type": "null",
"description": "Reverse DNS name"
},
"is_dhcp": {
"type": "boolean",
"description": "True if IP is assigned using DHCP"
},
"state": {
"type": "string",
"description": "IP status"
},
"creation_date": {
"type": "string",
"description": "Date when IP was created"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "F77CC589EBC120905B4F4719217BFF6D",
"ip": "10.5.132.106",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": null,
"reverse_dns": null,
"is_dhcp": false,
"state": "ACTIVE",
"creation_date": "2015-04-30T09:44:28+00:00"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "IP_NOT_FOUND",
"Message": "Ip not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/public_ips/{ip_id}
Modifies a public_ip.
URI Parameters
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"reverse_dns": {
"type": "string",
"description": "Reverse DNS name. If this field is blank removes previus reverse name",
"maxLength": 256
}
}
}
Example:
{
"reverse_dns": "example.es"
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "F77CC589EBC120905B4F4719217BFF6D",
"ip": "10.5.132.106",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": null,
"reverse_dns": "example.es",
"is_dhcp": false,
"state": "ACTIVE",
"creation_date": "2015-04-30T09:44:28+00:00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Wrong value Field(s) reverse_dns",
"errors": {
"invalid": "reverse_dns"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IP_NOT_FOUND",
"Message": "Ip not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/public_ips/{ip_id}
Removes a public_ip.
URI Parameters
- ip_id: required (string)
Unique IP's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the public_ip it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "8D135204687B9CF9E79E7A93C096E336",
"ip": "10.4.140.213",
"type": "IPV4",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"assigned_to": null,
"reverse_dns": null,
"is_dhcp": true,
"state": "CONFIGURING",
"creation_date": "2015-05-04T06:32:18+00:00"
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_STATE",
"message": "Cannot delete ip attached to load balancer",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IP_NOT_FOUND",
"Message": "Ip not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Private Networks
Collection of available methods for private_networks
Returns a list of your private_networks.
Adds a new private_network.
get
/private_networks
Returns a list of your private_networks.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of private_networks that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Private Network ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Private network name"
},
"description": {
"type": "string",
"description": "Private network description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"network_address": {
"type": "string",
"description": "Network address"
},
"subnet_mask": {
"type": "string",
"description": "Subnet mask"
},
"state": {
"type": "string",
"description": "State of the private network"
},
"creation_date": {
"type": "string",
"description": "Date when private network was created"
},
"servers": {
"type": "array",
"description": "Servers assigned to private network",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
}
}
Example:
[
{
"id": "6058B5DAF8182D20E1C68C3CED78EE22",
"name": "My private network",
"description": "My private network description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "192.168.1.0",
"subnet_mask": "255.255.255.0",
"state": "ACTIVE",
"creation_date": "2015-04-28T10:21:19+00:00",
"servers": [],
"cloudpanel_id": "pn99AA4_1"
},
{
"id": "6058B5DAF8182D20E1C68C3CED78EE23",
"name": "My private network 2",
"description": "My private network description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "",
"subnet_mask": "",
"state": "ACTIVE",
"creation_date": "2015-04-28T10:21:19+00:00",
"servers": [],
"cloudpanel_id": "pn99AA4_1"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/private_networks
Adds a new private_network.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Private network name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Private network description",
"maxLength": 256
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the private network will be created"
},
"network_address": {
"type": "string",
"description": "Private network address (valid IP)"
},
"subnet_mask": {
"type": "string",
"description": "Subnet mask (valid subnet for the given IP)"
}
}
}
Example:
{
"name": "My Private Network",
"description": "My Private network description",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"network_address": "192.168.1.0",
"subnet_mask": "255.255.255.0"
}
HTTP status code 202
A new private_network creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "403B689686A5B48F84E153C3F90E6B8A",
"name": "My Private Network Test",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "",
"subnet_mask": "",
"state": "CONFIGURING",
"creation_date": "2015-05-04T08:35:12+00:00",
"servers": [],
"cloudpanel_id": "pn99AA4_2"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "TECHNICAL_TARIFF_VIOLATION",
"Message": "Too high 2 > 1",
"Errors": {
"prefix": "private_network",
"desired": 2,
"required": 1
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a private_network
Returns private_network's information.
Modifies a private_network.
Removes a private_network.
get
/private_networks/{private_network_id}
Returns private_network's information.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Private network ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Private network name"
},
"description": {
"type": "string",
"description": "Private network description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"network_address": {
"type": "string",
"description": "Network address"
},
"subnet_mask": {
"type": "string",
"description": "Subnet mask"
},
"state": {
"type": "string",
"description": "State of the private network"
},
"creation_date": {
"type": "string",
"description": "Date when private network was created"
},
"servers": {
"type": "array",
"description": "Servers assigned to private network",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
}
Example:
{
"id": "7786BE739765D4EC0635A90C19F44D91",
"cloudpanel_id": "pn90282_1",
"name": "Private Network",
"description": "Private network description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "",
"subnet_mask": "",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"servers": [
{
"id": "7786BE739765D4EC0635A90C19F44D91",
"name": "My server name"
},
{
"id": "7786BE739765D4EC0635A90C19F44D91",
"name": "My server name 2"
}
]
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/private_networks/{private_network_id}
Modifies a private_network.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Private network name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Private network description",
"maxLength": 256
},
"network_address": {
"type": "string",
"description": "Private network address (valid IP)"
},
"subnet_mask": {
"type": "string",
"description": "Subnet mask (valid subnet for the given IP)"
}
}
}
Example:
{
"name": "Private Network",
"description": "Private network description",
"network_address": "192.168.1.0",
"subnet_mask": "255.255.255.0"
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "7786BE739765D4EC0635A90C19F44D91",
"cloudpanel_id": "pn90282_1",
"name": "Private Network",
"description": "Private network description",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "192.168.1.0",
"subnet_mask": "255.255.255.0",
"state": "POWERED_ON",
"creation_date": "2015-04-06T23:48:38Z",
"servers": [
{
"id": "7786BE739765D4EC0635A90C19F44D91",
"name": "My server name"
},
{
"id": "7786BE739765D4EC0635A90C19F44D91",
"name": "My server name 2"
}
]
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Wrong value Field(s) network_address",
"errors": {
"invalid": "network_address"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/private_networks/{private_network_id}
Removes a private_network.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the private_network it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "E9E144DED84EAC9D97C1A022E0351024",
"name": "New private network 1",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "",
"subnet_mask": "",
"state": "REMOVING",
"creation_date": "2015-05-06T11:34:41+00:00",
"servers": [],
"cloudpanel_id": "pn8962D_1"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns a list of the servers attached to a private network.
Attaches servers to a private network.
get
/private_networks/{private_network_id}/servers
Returns a list of the servers attached to a private network.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
Example:
[
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My server 1"
},
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4",
"name": "My server 2"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/private_networks/{private_network_id}/servers
Attaches servers to a private network.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["servers"],
"properties": {
"servers": {
"type": "array",
"description": "Array of desired servers' ID",
"items": {
"type": "string",
"description": "Server's ID"
}
}
}
}
Example:
{
"servers":[
"01D4A802798AB77AA72DA2D05E1379E1"
]
}
HTTP status code 202
A new server creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
[
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My server 1"
},
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4",
"name": "My server 2"
},
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4",
"name": "My server 4"
}
]
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Required field(s) servers missing or empty. ",
"errors": {
"required": "servers"
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns information about a server attached to a private network.
Unattaches a server from a private network.
get
/private_networks/{private_network_id}/servers/{server_id}
Returns information about a server attached to a private network.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
Example:
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My server 1"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/private_networks/{private_network_id}/servers/{server_id}
Unattaches a server from a private network.
URI Parameters
- private_network_id: required (string)
Unique private network's identifier.
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the server it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Private network ID"
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
},
"name": {
"type": "string",
"description": "Private network name"
},
"description": {
"type": "string",
"description": "Private network description"
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"network_address": {
"type": "string",
"description": "Network address"
},
"subnet_mask": {
"type": "string",
"description": "Subnet mask"
},
"state": {
"type": "string",
"description": "State of the private network"
},
"creation_date": {
"type": "string",
"description": "Date when private network was created"
},
"servers": {
"type": "array",
"description": "Servers assigned to private network",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
}
}
Example:
{
"id": "E9E144DED84EAC9D97C1A022E0351024",
"name": "New private network 1",
"description": "",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US"
},
"network_address": "",
"subnet_mask": "",
"state": "CONFIGURING",
"creation_date": "2015-05-06T11:34:41+00:00",
"servers": [
{
"id": "92AA60BEC8333A21EDB9EAAA61852860",
"name": "My monitoring policy"
}
],
"cloudpanel_id": "pn8962D_1"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "PRIVATE_NETWORK_NOT_FOUND",
"Message": "Private network not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
VPNs
Collection of available methods for vpns
Returns a list of your vpns.
Adds a new vpn.
get
/vpns
Returns a list of your vpns.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of vpns that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "VPN ID"
},
"name": {
"type": "string",
"description": "VPN name"
},
"description": {
"type": "string",
"description": "VPN description"
},
"state": {
"type": "string",
"description": "VPN status",
"enum": ["ACTIVE"]
},
"datacenter": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Datacenter ID"
},
"location": {
"type": "string",
"description": "Datacenter location"
},
"country_code": {
"type": "string",
"description": "Datacenter country code"
}
}
},
"type": {
"type": "string",
"description": "VPN type",
"enum": ["SSL"]
},
"ips": {
"type": "array",
"description": "Array with VPN IPs",
"items": {
"type": "string",
"description": "VPN IP"
}
},
"cloudpanel_id": {
"type": "string",
"description": "VPN ID in the Cloud Panel"
},
"creation_date": {
"type": "string",
"description": "Date when VPN was created"
}
}
}
}
Example:
[
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My VPN 1",
"description": "My VPN 1 description",
"state": "ACTIVE",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"type": "SSL",
"ips": [
"10.131.1.233",
"10.131.0.233"
],
"cloudpanel_id": "FW99AA4_7",
"creation_date": "30-06-2015T 14:52:35+00.00"
},
{
"id": "987565F5D5B02FA02D58173094EBAF96",
"name": "My VPN",
"description": "",
"state": "ACTIVE",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"type": "SSL",
"ips": [
"10.131.1.45",
"10.131.0.45"
],
"cloudpanel_id": "FW99AA4_8",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/vpns
Adds a new vpn.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"requierd": ["name"],
"properties": {
"name": {
"type": "string",
"description": "VPN name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "VPN description",
"maxLength": 256
},
"datacenter_id": {
"type": "string",
"description": "ID of the datacenter where the server will be created"
}
}
}
Example:
{
"name": "My VPN",
"description": "My VPN description",
"datacenter_id": "D0F6D8C8ED29D3036F94C27BBB7BAD36"
}
HTTP status code 202
A new vpn creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "987565F5D5B02FA02D58173094EBAF96",
"name": "My VPN",
"description": "",
"state": "ACTIVE",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"type": "SSL",
"ips": [
"10.131.1.45",
"10.131.0.45"
],
"cloudpanel_id": "FW99AA4_8",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Required field(s) name missing or empty. ",
"errors": {
"required": "name"
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a vpn
Returns vpn's information.
Modifies a vpn.
Removes a vpn.
get
/vpns/{vpn_id}
Returns vpn's information.
URI Parameters
- vpn_id: required (string)
Unique VPN identifier
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "VPN ID"
},
"name": {
"type": "string",
"description": "VPN name"
},
"description": {
"type": "string",
"description": "VPN description"
},
"state": {
"type": "string",
"description": "VPN status",
"enum": ["ACTIVE"]
},
"datacenter": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Datacenter ID"
},
"location": {
"type": "string",
"description": "Datacenter location"
},
"country_code": {
"type": "string",
"description": "Datacenter country code"
}
}
},
"type": {
"type": "string",
"description": "VPN type",
"enum": ["SSL"]
},
"ips": {
"type": "array",
"description": "Array with VPN IPs",
"items": {
"type": "string",
"description": "VPN IP"
}
},
"cloudpanel_id": {
"type": "string",
"description": "VPN ID in the Cloud Panel"
},
"creation_date": {
"type": "string",
"description": "Date when user was created"
}
}
}
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My VPN 1",
"description": "My VPN 1 description",
"state": "ACTIVE",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"type": "SSL",
"ips": [
"10.131.1.233",
"10.131.0.233"
],
"cloudpanel_id": "FW99AA4_7",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "VPN_NOT_FOUND",
"Message": "VPN does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/vpns/{vpn_id}
Modifies a vpn.
URI Parameters
- vpn_id: required (string)
Unique VPN identifier
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "VPN name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "VPN description",
"maxLength": 256
}
}
}
Example:
{
"name": "My VPN rename",
"description": "My VPN rename description"
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My VPN rename",
"description": "My VPN rename description",
"state": "ACTIVE",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"type": "SSL",
"ips": [
"10.131.1.233",
"10.131.0.233"
],
"cloudpanel_id": "FW99AA4_7",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Wrong value Field(s) name",
"errors": {
"invalid": "name"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "VPN_NOT_FOUND",
"Message": "VPN does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/vpns/{vpn_id}
Removes a vpn.
URI Parameters
- vpn_id: required (string)
Unique VPN identifier
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the vpn it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My VPN 1",
"description": "My VPN 1 description",
"state": "REMOVING",
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB789536",
"location": "Spain",
"country_code": "ES"
},
"type": "SSL",
"ips": [
"10.131.1.233",
"10.131.0.233"
],
"cloudpanel_id": "FW99AA4_7",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "VPN_NOT_FOUND",
"Message": "VPN does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Download your VPN configuration file
get
/vpns/{vpn_id}/configuration_file
Download your VPN configuration file
URI Parameters
- vpn_id: required (string)
Unique VPN identifier
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type: object
Example:
[
{
"name": "M",
"id": "8C626C1A7005D0D1F527143C413D461E",
"hardware": {
"vcore": 1,
"cores_per_processor": 1,
"ram": 1,
"unit": "GB",
"hdds": [
{
"size": 40,
"unit": "GB",
"is_main": true
}
]
}
},
{
"name": "L",
"id": "8C626C1A7005D0D1F527143C413D461F",
"hardware": {
"vcore": 2,
"cores_per_processor": 1,
"ram": 2,
"unit": "GB",
"hdds": [
{
"size": 80,
"unit": "GiB",
"is_main": true
}
]
}
},
{
"name": "XL",
"id": "8C626C1A7005D0D1F527143C413D4620",
"hardware": {
"vcore": 2,
"cores_per_processor": 1,
"ram": 4,
"unit": "GB",
"hdds": [
{
"size": 120,
"unit": "GB",
"is_main": true
}
]
}
},
{
"name": "XXL",
"id": "8C626C1A7005D0D1F527143C413D4621",
"hardware": {
"vcore": 4,
"cores_per_processor": 1,
"ram": 8,
"unit": "GB",
"hdds": [
{
"size": 160,
"unit": "GiB",
"is_main": true
}
]
}
}
]
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "VPN_NOT_FOUND",
"Message": "VPN does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Monitoring Center
Collection of available methods for monitoring_center
Lists usages and alerts of monitoring servers.
get
/monitoring_center
Lists usages and alerts of monitoring servers.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of monitoring_center that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"status": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Server status"
},
"cpu": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "CPU status"
}
}
},
"ram": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "RAM status"
}
}
},
"disk": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Disk status"
}
}
},
"transfer": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Transfer status"
}
}
},
"internal_ping": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Internal ping status"
}
}
}
}
},
"alerts": {
"type": "object",
"description": "Server alerts",
"properties": {
"resources": {
"type": "object",
"descriptions": "Resources notifications",
"properties": {
"critical": {
"type": "integer",
"description": "Number of critical alerts"
},
"warning": {
"type": "integer",
"description": "Number of warnings"
},
"ok": {
"type": "integer",
"description": "Resources without problems"
}
}
},
"ports": {
"type": "object",
"description": "Ports notifications",
"properties": {
"critical": {
"type": "integer",
"description": "Number of critical alerts"
},
"warning": {
"type": "integer",
"description": "Number of warnings"
},
"ok": {
"type": "integer",
"description": "Ports ok"
}
}
},
"process": {
"type": "object",
"descriptions": "Processes notifications",
"properties": {
"critical": {
"type": "integer",
"description": "Number of critical alerts"
},
"warning": {
"type": "integer",
"description": "Number of warnings"
},
"ok": {
"type": "integer",
"description": "Processes ok"
}
}
}
}
},
"agent": {
"type": "object",
"description": "Monitoring agent status",
"properties": {
"agent_installed": {
"type": "boolean",
"description": "True if agent is installed"
},
"monitoring_needs_agent": {
"type": "boolean",
"description": "True if monitoring policy requires agent"
},
"missing_agent_alert": {
"type": "boolean",
"description": "True if agent installation is pending"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
}
}
}
}
Example:
[
{
"id": "ABA6F4C16FE9893B09B354A4CF6321DF",
"name": "My Server remame",
"status": {
"state": "POWERED_ON",
"cpu": {
"state": "CPU usage: OK - CPU_Total 0% used: CPU0 0% used"
},
"ram": {
"state": "RAM usage: OK 789MB (39%) used"
},
"disk": {
"state": "Disk usage: OK C: 12.04GB (30%) used"
},
"transfer": {
"state": "Network traffic: OK - 0 Kbps received: 0 Kbps transmitted:"
},
"internal_ping": {
"state": "OK - 10.4.141.242: rta 0.671ms, lost 0%"
}
},
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"name": "United States"
},
"alerts": {
"resources": {
"critical": 1,
"warning": 0,
"ok": 3
},
"ports": {
"critical": 0,
"warning": 0,
"ok": 0
},
"process": {
"critical": 0,
"warning": 0,
"ok": 0
}
},
"agent": {
"agent_installed": false,
"monitoring_needs_agent": false,
"missing_agent_alert": false
}
},
{
"id": "BDAF0EC6A36E9E554B80B7E7365821F5",
"name": "My Server 1",
"status": {
"state": "POWERED_ON",
"cpu": {
"state": "CPU usage: OK - CPU_Total 0% used: CPU0 0% used"
},
"ram": {
"state": "RAM usage: OK 789MB (39%) used"
},
"disk": {
"state": "Disk usage: OK C: 12.04GB (30%) used"
},
"transfer": {
"state": "Network traffic: OK - 0 Kbps received: 0 Kbps transmitted:"
},
"internal_ping": {
"state": "OK - 10.4.141.242: rta 0.671ms, lost 0%"
}
},
"region": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"name": "United States"
},
"alerts_count": {
"resources": {
"critical": 0,
"warning": 0,
"ok": 4
},
"ports": {
"critical": 0,
"warning": 0,
"ok": 0
},
"process": {
"critical": 0,
"warning": 0,
"ok": 0
}
},
"agent": {
"agent_installed": false,
"monitoring_needs_agent": false,
"missing_agent_alert": false
}
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Returns the usage of the resources for the specified time range.
get
/monitoring_center/{server_id}
Returns the usage of the resources for the specified time range.
URI Parameters
- server_id: required (string)
Server's ID
Query Parameters
- period: required (one of LAST_HOUR, LAST_24H, LAST_7D, LAST_30D, LAST_365D, CUSTOM)
Time range whose logs will be shown.
- start_date: required (datetime)
The first date in a custom range. Required only if selected period is "CUSTOM".
- end_date: required (datetime)
The second date in a custom range. Required only if selected period is "CUSTOM".
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
},
"status": {
"type": "object",
"properties": {
"state": {
"type": "string",
"description": "Server status"
}
}
},
"alerts": {
"type": "object",
"description": "Server alerts",
"properties": {
"resources": {
"type": "object",
"descriptions": "Resources notifications",
"properties": {
"critical": {
"type": "integer",
"description": "Number of critical alerts"
},
"warning": {
"type": "integer",
"description": "Number of warnings"
},
"ok": {
"type": "integer",
"description": "Resources without problems"
}
}
},
"ports": {
"type": "object",
"description": "Ports notifications",
"properties": {
"critical": {
"type": "integer",
"description": "Number of critical alerts"
},
"warning": {
"type": "integer",
"description": "Number of warnings"
},
"ok": {
"type": "integer",
"description": "Ports ok"
}
}
},
"process": {
"type": "object",
"descriptions": "Processes notifications",
"properties": {
"critical": {
"type": "integer",
"description": "Number of critical alerts"
},
"warning": {
"type": "integer",
"description": "Number of warnings"
},
"ok": {
"type": "integer",
"description": "Processes ok"
}
}
}
}
},
"agent": {
"type": "object",
"description": "Monitoring agent status",
"properties": {
"agent_installed": {
"type": "boolean",
"description": "True if agent is installed"
},
"monitoring_needs_agent": {
"type": "boolean",
"description": "True if monitoring policy requires agent"
},
"missing_agent_alert": {
"type": "boolean",
"description": "True if agent installation is pending"
}
}
},
"datacenter": {
"type": "object",
"description": "Location where the resource is available",
"properties": {
"id": {
"type": "string",
"description": "Datacenter Id"
},
"country_code": {
"type": "string",
"description": "Country Id"
},
"location": {
"type": "string",
"description": "Location name"
}
}
},
"cpu": {
"type": "object",
"description": "CPU information",
"properties": {
"critical": {
"type": "integer",
"description": "Critical value"
},
"warning": {
"type": "integer",
"description": "Warning value"
},
"data": {
"type": "array",
"description": "CPU used percent",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date of the sample"
},
"used_percent": {
"type": "number",
"description": "CPU used percent"
}
}
}
},
"unit": {
"type": "object",
"properties": {
"used_percent": {
"type": "string",
"description": "Used percent unit"
}
}
},
"status": {
"type": "string",
"description": "CPU status"
}
}
},
"ram": {
"type": "object",
"description": "RAM information",
"properties": {
"critical": {
"type": "integer",
"description": "Critical value"
},
"warning": {
"type": "integer",
"description": "Warning value"
},
"data": {
"type": "array",
"description": "RAM used percent",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date of the sample"
},
"used_percent": {
"type": "number",
"description": "RAM used percent"
}
}
}
},
"unit": {
"type": "object",
"properties": {
"used_percent": {
"type": "string",
"description": "Used percent unit"
}
}
},
"status": {
"type": "string",
"description": "RAM status"
}
}
},
"disk": {
"type": "object",
"description": "Disks information",
"properties": {
"critical": {
"type": "integer",
"description": "Critical value"
},
"warning": {
"type": "integer",
"description": "Warning value"
},
"status": {
"type": "string",
"description": "Disk status"
}
}
},
"internal_ping": {
"type": "object",
"description": "Internal ping information",
"properties": {
"critical": {
"type": "integer",
"description": "Critical value"
},
"warning": {
"type": "integer",
"description": "Warning value"
},
"data": {
"type": "array",
"description": "Internal ping samples",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date of the sample"
},
"pl": {
"type": "number",
"description": "Packages lost"
},
"rta": {
"type": "integer",
"description": "Access time"
}
}
}
},
"unit": {
"type": "object",
"properties": {
"pl": {
"type": "string",
"description": "Packages lost unit"
},
"rta": {
"type": "string",
"description": "Time access unit"
}
}
},
"status": {
"type": "string",
"description": "Internal ping status"
}
}
},
"transfer": {
"type": "object",
"description": "Transfer information",
"properties": {
"critical": {
"type": "integer",
"description": "Critical value"
},
"warning": {
"type": "integer",
"description": "Warning value"
},
"data": {
"type": "array",
"description": "Data transfer information",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date of the sample"
},
"downstream": {
"type": "number",
"description": "Downstream speed"
},
"upstream": {
"type": "number",
"description": "Upstream speed"
}
}
}
},
"unit": {
"type": "object",
"properties": {
"downstream": {
"type": "string",
"description": "Downstream unit"
},
"upstream": {
"type": "string",
"description": "Upstream unit"
}
}
},
"status": {
"type": "string",
"description": "Transfer status"
}
}
}
}
}
Example:
{
"id": "BDAF0EC6A36E9E554B80B7E7365821F5",
"name": "My Server 1",
"status": {
"state": "POWERED_ON"
},
"datacenter": {
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"name": "United States"
},
"alerts_count": {
"resources": {
"critical": 0,
"warning": 0,
"ok": 4
},
"ports": {
"critical": 0,
"warning": 0,
"ok": 0
},
"process": {
"critical": 0,
"warning": 0,
"ok": 0
}
},
"agent": {
"agent_installed": false,
"monitoring_needs_agent": false,
"missing_agent_alert": false
},
"cpu": {
"warning": 90,
"critical": 95,
"data": [
{
"date": "2015-19-05T00:05:00Z",
"used_percent": 0.4011
},
{
"date": "2015-19-05T00:10:00Z",
"used_percent": 1.0435
},
{
"date": "2015-19-05T00:15:00Z",
"used_percent": 0.4065
},
{
"date": "2015-19-05T00:20:00Z",
"used_percent": 0.49866666666667
},
{
"date": "2015-19-05T00:25:00Z",
"used_percent": 0.30266666666667
}
],
"unit": {
"used_percent": "%"
},
"status": "CPU usage: OK - CPU_Total 0% used: CPU0 0% used"
},
"ram": {
"warning": 90,
"critical": 95,
"data": [
{
"date": "2015-19-05T00:05:00Z",
"used_percent": 1.99
},
{
"date": "2015-19-05T00:10:00Z",
"used_percent": 1
},
{
"date": "2015-19-05T00:15:00Z",
"used_percent": 3.96
},
{
"date": "2015-19-05T00:20:00Z",
"used_percent": 5.9633333333333
},
{
"date": "2015-19-05T00:25:00Z",
"used_percent": 2.0433333333333
}
],
"unit": {
"used_percent": "%"
},
"status": "RAM usage: OK 789MB (39%) used"
},
"transfer": {
"warning": 1000,
"critical": 2000,
"data": [
{
"date": "2015-19-05T00:05:00Z",
"downstream": 0,
"upstream": 0
},
{
"date": "2015-19-05T00:10:00Z",
"downstream": 0,
"upstream": 0
},
{
"date": "2015-19-05T00:15:00Z",
"downstream": 0,
"upstream": 0
},
{
"date": "2015-19-05T00:20:00Z",
"downstream": 0,
"upstream": 0
},
{
"date": "2015-19-05T00:25:00Z",
"downstream": 0,
"upstream": 0
}
],
"unit": {
"downstream": "bps",
"upstream": "bps"
},
"status": "Network traffic: OK - 0 Kbps received: 0 Kbps transmitted:"
},
"internal_ping": {
"warning": 50,
"critical": 100,
"data": [
{
"date": "2015-19-05T00:05:00Z",
"pl": 100,
"rta": 0
},
{
"date": "2015-19-05T00:10:00Z",
"pl": 100,
"rta": 0
},
{
"date": "2015-19-05T00:15:00Z",
"pl": 100,
"rta": 0
},
{
"date": "2015-19-05T00:20:00Z",
"pl": 100,
"rta": 0
},
{
"date": "2015-19-05T00:25:00Z",
"pl": 100,
"rta": 0
}
],
"unit": {
"pl": "%",
"rta": "ms"
},
"status": "OK - 10.4.141.242: rta 0.657ms, lost 0%"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Monitoring Policies
Collection of available methods for monitoring_policies
Returns a list of your monitoring_policies.
Adds a new monitoring_policy.
get
/monitoring_policies
Returns a list of your monitoring_policies.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of monitoring_policies that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"description": "Monitoring policy name"
},
"description": {
"type": "string",
"description": "Monitoring policy description"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default policy"
},
"state": {
"type": "string",
"description": "Monitoring policy status"
},
"creation_date": {
"type": "string",
"description": "Date when monitoring policy was created"
},
"email": {
"type": "string",
"description": "User's e-mail for notifications"
},
"agent": {
"type": "boolean",
"description": "True if monitoring policy agent will be installed"
},
"servers": {
"type": "array",
"servers": "Servers assigned to monitoring policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
},
"thresholds": {
"type": "object",
"properties": {
"cpu": {
"type": "object",
"description": "Consumption limits of CPU",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"ram": {
"type": "object",
"description": "Consumption limits of RAM",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"maximum": 100
}
}
}
}
},
"disk": {
"type": "object",
"description": "Consumption limits of hard disk",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"internal_ping": {
"type": "object",
"description": "Response limits of internal ping",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"maximum": 100
}
}
}
}
},
"transfer": {
"type": "object",
"description": "Consumption limits for transfer",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"maximum": 2000
}
}
}
}
}
}
},
"ports": {
"type": "array",
"description": "Array of ports that will be monitored",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"processes": {
"type": "array",
"description": "Array of processes that will be monitored",
"items": {
"type": "object",
"properties": {
"process": {
"type": "string",
"description": "Name of the process"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
}
Example:
[
{
"id": "0F9A1604FC80EB625FC6AEE7394893BE",
"name": "Default Policy",
"description": "Default Policy Description",
"default": 1,
"state": "ACTIVE",
"creation_date": "2014-10-29T07:52:46+00:00",
"email": "",
"agent": false,
"servers": [
{
"id": "E83777750130E1111AA89623B9557CAF",
"name": "My Server 1"
},
{
"id": "CB22C6E0428239348A6B70BAE0D67E66",
"name": "My Server 2"
},
{
"id": "6AAA2BD60813F419DEC8D69C6E4F6477",
"name": "My Server 3"
}
],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [],
"cloudpanel_id": "mo99AA4_1"
},
{
"id": "C81F17AF6F6F6717372B79A882B25E92",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-02-26T07:23:42+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [
{
"id": "5F67F2706335AF34FFCDF71E5AF08B2B",
"protocol": "TCP",
"port": 22,
"alert_when": false,
"alert": true
}
],
"processes": [
{
"id": "13CF2BEADA60230C6241C81C248F3C4B",
"process": "test",
"alert_when": false,
"alert": true
}
],
"cloudpanel_id": "mo99AA4_2"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/monitoring_policies
Adds a new monitoring_policy.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","agent","email","thresholds","ports","processes"],
"properties": {
"name": {
"type": "string",
"description": "Monitoring policy name",
"maxLength": 128
},
"agent": {
"type": "boolean",
"description": "Set true for using agent"
},
"email": {
"type": "string",
"description": "User's email",
"maxLength": 128
},
"thresholds": {
"type": "object",
"required": ["cpu","ram","disk","internal_ping","transfer"],
"properties": {
"cpu": {
"type": "object",
"required": ["warning","critical"],
"description": "Consumption limits of CPU",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"ram": {
"type": "object",
"description": "Consumption limits of RAM",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"disk": {
"type": "object",
"description": "Consumption limits of hard disk",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"internal_ping": {
"type": "object",
"description": "Response limits of internal ping",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"maximum": 100
}
}
}
}
},
"transfer": {
"type": "object",
"description": "Consumption limits for transfer",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"required": ["alert","value"],
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"maximum": 2000
}
}
}
}
}
}
},
"ports": {
"type": "array",
"description": "Array of ports that will be monitoring",
"items": {
"type": "object",
"required": ["protocol","port","alert_if","email_notification"],
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"processes": {
"type": "array",
"description": "Array of processes that will be monitoring",
"items": {
"type": "object",
"required": ["process","alert_if","email_notification"],
"properties": {
"process": {
"type": "string",
"description": "Name of the process",
"maxLength": 50
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"description": {
"type": "string",
"description": "Monitoring description",
"maxLength": 256
}
}
}
Example:
{
"name": "My monitoring policy",
"description": "My monitoring policy description",
"email": "",
"agent": true,
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [
{
"protocol": "TCP",
"port": 22,
"alert_if": "RESPONDING",
"email_notification": true
}
],
"processes": [
{
"process": "test",
"alert_if": "NOT_RUNNING",
"email_notification": true
}
]
}
HTTP status code 201
A new monitoring_policy creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "631F6C2271FD7F499E5C9C5B4EBE4C0B",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-05-07T07:34:41+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [
{
"id": "68EEA5DFB7275484CF0476DC3F94848B",
"protocol": "TCP",
"port": 22,
"alert_if": "RESPONDING",
"email_notification": true
}
],
"processes": [
{
"id": "2F5AA2335A79125074CDBDD307465482",
"process": "test",
"alert_if": "NOT_RUNNING",
"email_notification": true
}
],
"cloudpanel_id": "mo8962D_3"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "TECHNICAL_TARIFF_VIOLATION",
"Message": "Too high 4 > 3.00",
"Errors": {
"prefix": "ngcs.monitoring.policies",
"desired": 4,
"required": "3.00"
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a monitoring_policy
Returns monitoring_policy's information.
Modifies a monitoring_policy.
Removes a monitoring_policy.
get
/monitoring_policies/{monitoring_policy_id}
Returns monitoring_policy's information.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"description": "Monitoring policy name"
},
"description": {
"type": "string",
"description": "Monitoring policy description"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default policy"
},
"state": {
"type": "string",
"description": "Monitoring policy status"
},
"creation_date": {
"type": "string",
"description": "Date when monitoring policy was created"
},
"email": {
"type": "string",
"description": "User's e-mail for notifications"
},
"agent": {
"type": "boolean",
"description": "True if monitoring policy agent will be installed"
},
"servers": {
"type": "array",
"servers": "Servers assigned to monitoring policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
},
"thresholds": {
"type": "object",
"properties": {
"cpu": {
"type": "object",
"description": "Consumption limits of CPU",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"ram": {
"type": "object",
"description": "Consumption limits of RAM",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"disk": {
"type": "object",
"description": "Consumption limits of hard disk",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"internal_ping": {
"type": "object",
"description": "Response limits of internal ping",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"maximum": 100
}
}
}
}
},
"transfer": {
"type": "object",
"description": "Consumption limits for transfer",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"maximum": 2000
}
}
}
}
}
}
},
"ports": {
"type": "array",
"description": "Array of ports that will be monitored",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"processes": {
"type": "array",
"description": "Array of processes that will be monitored",
"items": {
"type": "object",
"properties": {
"process": {
"type": "string",
"description": "Name of the process"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "92B74394A397ECC3359825C1656D67A6",
"name": "Default Policy",
"description": "Default Policy Description",
"default": 1,
"state": "ACTIVE",
"creation_date": "2015-04-30T11:56:54+00:00",
"email": "",
"agent": false,
"servers": [
{
"id": "ABA6F4C16FE9893B09B354A4CF6321DF",
"name": "My Server 2"
},
{
"id": "BDAF0EC6A36E9E554B80B7E7365821F5",
"name": "My Server 1"
}
],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [],
"cloudpanel_id": "mo99AA4_1"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/monitoring_policies/{monitoring_policy_id}
Modifies a monitoring_policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"description": "Monitoring policy name"
},
"description": {
"type": "string",
"description": "Monitoring policy description"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default policy"
},
"state": {
"type": "string",
"description": "Monitoring policy status"
},
"creation_date": {
"type": "string",
"description": "Date when monitoring policy was created"
},
"email": {
"type": "string",
"description": "User's e-mail for notifications"
},
"agent": {
"type": "boolean",
"description": "True if monitoring policy agent will be installed"
},
"servers": {
"type": "array",
"servers": "Servers assigned to monitoring policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
},
"thresholds": {
"type": "object",
"properties": {
"cpu": {
"type": "object",
"description": "Consumption limits of CPU",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"ram": {
"type": "object",
"description": "Consumption limits of RAM",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"disk": {
"type": "object",
"description": "Consumption limits of hard disk",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"internal_ping": {
"type": "object",
"description": "Response limits of internal ping",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"maximum": 100
}
}
}
}
},
"transfer": {
"type": "object",
"description": "Consumption limits for transfer",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"maximum": 2000
}
}
}
}
}
}
},
"ports": {
"type": "array",
"description": "Array of ports that will be monitored",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"processes": {
"type": "array",
"description": "Array of processes that will be monitored",
"items": {
"type": "object",
"properties": {
"process": {
"type": "string",
"description": "Name of the process"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"name": "New Monitoring Policy Name",
"description": "New Monitoring Policy Description",
"email": "test2@gmail.com",
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
}
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "2AAA70C3661915B7CA007299C140C63D",
"name": "New Monitoring Policy Name",
"description": "New Monitoring Policy Description",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-05-04T07:48:49+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [
{
"id": "5D8B0D9EC45F48B237ABABE6E979C0C3",
"protocol": "TCP",
"port": 22,
"alert_if": "NOT_RESPONDING",
"email_notification": true
}
],
"processes": [
{
"id": "B029ACABAEB5F8E512E238ED630EF8E8",
"process": "test",
"alert_if": "NOT_RESPONDING",
"email_notification": true
}
],
"cloudpanel_id": "mo99AA4_2"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Wrong value Field(s) thresholds",
"errors": {
"invalid": "thresholds"
}
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default monitoring policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/monitoring_policies/{monitoring_policy_id}
Removes a monitoring_policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the monitoring_policy it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "REMOVING",
"creation_date": "2015-04-30T07:26:58+00:00",
"email": "",
"agent": true,
"servers": [
{
"id": "CB22C6E0428239348A6B70BAE0D67E66",
"name": "My Server 2"
}
],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [],
"cloudpanel_id": "mo99AA4_3"
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default monitoring policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a port
Returns a list of the ports of a monitoring policy.
Adds new ports to a monitoring policy
get
/monitoring_policies/{monitoring_policy_id}/ports
Returns a list of the ports of a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
}
Example:
[
{
"id": "663D21E232530D79E4E584104C400EE4",
"protocol": "TCP",
"port": 22,
"alert_if": "RESPONDING",
"email_notifications": true
},
{
"id": "663D21E232530D79E4E584104C400AAA",
"protocol": "TCP",
"port": 80,
"alert_if": "NOT_RESPONDING",
"email_notifications": true
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/monitoring_policies/{monitoring_policy_id}/ports
Adds new ports to a monitoring policy
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["ports"],
"properties": {
"ports": {
"type": "array",
"description": "List with ports will be added",
"items": {
"type": "object",
"required": ["protocol","port","alert_if","email_notification"],
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
}
}
}
Example:
{
"ports":[
{
"protocol": "TCP",
"port": 80,
"alert_if": "RESPONDING",
"email_notification": true
}
]
}
HTTP status code 202
A new port creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-04-30T07:26:58+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [
{
"id": "4B06342A42F0BFB4F2AD2C52334F40E5",
"protocol": "TCP",
"port": 22,
"alert_when": false,
"alert": true
}
],
"processes": [
{
"id": "04187715D8F971D3C671475D2D7C245D",
"process": "test",
"alert_when": false,
"alert": true
}
],
"cloudpanel_id": "mo99AA4_3"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Port 22 already monitored",
"Errors": null
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default monitoring policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a port
Returns information about a port of a monitoring policy.
Modifies a port from a monitoring policy.
Removes a port from a monitoring policy.
get
/monitoring_policies/{monitoring_policy_id}/ports/{port_id}
Returns information about a port of a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- port_id: required (string)
Unique port's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
Example:
{
"id": "663D21E232530D79E4E584104C400EE4",
"protocol": "TCP",
"port": 22,
"alert_if": "RESPONDING",
"email_notifications": true
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "PORT_NOT_FOUND",
"Message": "Monitoring policy port does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/monitoring_policies/{monitoring_policy_id}/ports/{port_id}
Modifies a port from a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- port_id: required (string)
Unique port's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["ports"],
"properties": {
"ports": {
"type": "object",
"description": "The port will be modified",
"required": ["protocol","port","alert_if","email_notification"],
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol (It can't be changed)"
},
"port": {
"type": "integer",
"description": "Port number (It can't be changed)"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
}
}
Example:
{
"ports": {
"protocol": "TCP",
"port": 80,
"alert_if": "RESPONDING",
"email_notification": true
}
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-04-30T07:26:58+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [
{
"id": "4B06342A42F0BFB4F2AD2C52334F40E5",
"protocol": "TCP",
"port": 22,
"alert_when": false,
"alert": true
}
],
"processes": [
{
"id": "04187715D8F971D3C671475D2D7C245D",
"process": "test",
"alert_when": false,
"alert": true
}
],
"cloudpanel_id": "mo99AA4_3"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Wrong value Field(s) ports",
"Errors": {
"ports": 1
}
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default monitoring policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "PORT_NOT_FOUND",
"Message": "Monitoring policy port does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/monitoring_policies/{monitoring_policy_id}/ports/{port_id}
Removes a port from a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- port_id: required (string)
Unique port's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the port it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-04-30T07:26:58+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [
{
"id": "04187715D8F971D3C671475D2D7C245D",
"process": "test",
"alert_when": false,
"alert": true
}
],
"cloudpanel_id": "mo99AA4_3"
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed in default monitoring policy",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "PORT_NOT_FOUND",
"Message": "Monitoring policy port does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a process
Returns a list of the processes of a monitoring policy.
Adds new processes to a monitoring policy
get
/monitoring_policies/{monitoring_policy_id}/processes
Returns a list of the processes of a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"process": {
"type": "string",
"description": "Name of the process"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
}
Example:
[
{
"id": "663D21E232530D79E4E584104C400EE4",
"process": "iexplorer",
"alert_if": "NOT_RUNNING",
"email_notifications": true
},
{
"id": "663D21E232530D79E4E584104C400EE4",
"process": "winword",
"alert_if": "NOT_RUNNING",
"email_notifications": true
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/monitoring_policies/{monitoring_policy_id}/processes
Adds new processes to a monitoring policy
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["processes"],
"properties": {
"processes": {
"type": "array",
"description": "List with processes will be added",
"items": {
"type": "object",
"required": ["process","alert_if","email_notification"],
"properties": {
"process": {
"type": "string",
"description": "Name of the process",
"maxLength": 50
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
}
}
}
Example:
{
"processes":[
{
"process": "taskmmgr",
"alert_if": "RUNNING",
"email_notification": true
}
]
}
HTTP status code 202
A new process creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
[
{
"id": "663D21E232530D79E4E584104C400EE4",
"process": "iexplorer",
"alert_if": "NOT_RUNNING",
"email_notifications": true
},
{
"id": "663D21E232530D79E4E584104C400EE4",
"process": "winword",
"alert_if": "NOT_RUNNING",
"email_notifications": true
},
{
"id": "663D21E232530D79E4E584104C400EE4",
"process": "taskmgr",
"alert_if": "NOT_RUNNING",
"email_notifications": true
}
]
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Process test already monitored",
"Errors": null
}
HTTP status code 403
Forbiden. This happens when you try to do a forbiden operation.
Body
Media type: application/json
Type: object
Example:
{
"type": "NOT_ALLOWED_ERROR",
"message": "Operation not allowed: agent required",
"errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a process
Returns information about a process of a monitoring policy.
Modifies a process from a monitoring policy.
Removes a process from a monitoring policy.
get
/monitoring_policies/{monitoring_policy_id}/processes/{process_id}
Returns information about a process of a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- process_id: required (string)
Unique process's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"process": {
"type": "string",
"description": "Name of the process"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
Example:
{
"id": "663D21E232530D79E4E584104C400EE4",
"process": "iexplorer",
"alert_if": "NOT_RUNNING",
"email_notifications": true
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "PROCESS_NOT_FOUND",
"Message": "Monitoring policy process does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/monitoring_policies/{monitoring_policy_id}/processes/{process_id}
Modifies a process from a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- process_id: required (string)
Unique process's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["processes"],
"properties": {
"processes": {
"type": "object",
"description": "Process will be modified",
"required": ["process","alert_if","email_notification"],
"properties": {
"process": {
"type": "string",
"description": "Name of the process (It can't be changed)",
"maxLength": 50
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
}
}
Example:
{
"processes":{
"process": "test",
"alert_if": "RUNNING",
"email_notification": false
}
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-04-30T07:26:58+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [
{
"id": "04187715D8F971D3C671475D2D7C245D",
"process": "test",
"alert_when": false,
"alert": false
}
],
"cloudpanel_id": "mo99AA4_3"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Wrong value Field(s) processes",
"Errors": {
"processes": 1
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "PROCESS_NOT_FOUND",
"Message": "Monitoring policy process does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/monitoring_policies/{monitoring_policy_id}/processes/{process_id}
Removes a process from a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- process_id: required (string)
Unique process's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the process it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "D0065C1A3EACCA186DAD7E11587C8C18",
"name": "My monitoring policy",
"description": "",
"default": 0,
"state": "ACTIVE",
"creation_date": "2015-04-30T07:26:58+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [],
"cloudpanel_id": "mo99AA4_3"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "PROCESS_NOT_FOUND",
"Message": "Monitoring policy process does not exist",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns a list of the servers attached to a monitoring policy.
Attaches servers to a monitoring policy.
get
/monitoring_policies/{monitoring_policy_id}/servers
Returns a list of the servers attached to a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
}
Example:
[
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My server 1"
},
{
"id": "4ECD9D188EB457317B2CF8F07885E7B4",
"name": "My server 2"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/monitoring_policies/{monitoring_policy_id}/servers
Attaches servers to a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["servers"],
"properties": {
"servers": {
"type": "array",
"description": "List of servers given by their ID will be added to monitoring policy",
"items": {
"type": "string",
"description": "Server's ID"
}
}
}
}
Example:
{
"servers": [
"92AA60BEC8333A21EDB9EAAA61852860",
"638ED28205B1AFD7ADEF569C725DD85F"
]
}
HTTP status code 202
A new server creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "5DF232A92E9635249B8A4EB31C5B14F4",
"name": "My Monitoring Policy 1",
"description": "",
"default": 0,
"state": "CONFIGURING",
"creation_date": "2015-05-07T07:16:14+00:00",
"email": "",
"agent": true,
"servers": [],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"disk": {
"warning": {
"value": 80,
"alert": false
},
"critical": {
"value": 90,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [],
"cloudpanel_id": "mo8962D_2"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) servers missing or empty. ",
"Errors": {
"servers": 1
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a server
Returns information about a server attached to a monitoring policy.
Unattaches a server from a monitoring policy.
get
/monitoring_policies/{monitoring_policy_id}/servers/{server_id}
Returns information about a server attached to a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
Example:
{
"id": "C72CF0A681B0CCE7EC624DD194D585C6",
"name": "My server 1"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/monitoring_policies/{monitoring_policy_id}/servers/{server_id}
Unattaches a server from a monitoring policy.
URI Parameters
- monitoring_policy_id: required (string)
Unique monitoring policy's identifier.
- server_id: required (string)
Unique server's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the server it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Monitoring policy ID"
},
"name": {
"type": "string",
"description": "Monitoring policy name"
},
"description": {
"type": "string",
"description": "Monitoring policy description"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default policy"
},
"state": {
"type": "string",
"description": "Monitoring policy status"
},
"creation_date": {
"type": "string",
"description": "Date when monitoring policy was created"
},
"email": {
"type": "string",
"description": "User's e-mail for notifications"
},
"agent": {
"type": "boolean",
"description": "True if monitoring policy agent will be installed"
},
"servers": {
"type": "array",
"servers": "Servers assigned to monitoring policy",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server ID"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
},
"thresholds": {
"type": "object",
"properties": {
"cpu": {
"type": "object",
"description": "Consumption limits of CPU",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"ram": {
"type": "object",
"description": "Consumption limits of RAM",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"disk": {
"type": "object",
"description": "Consumption limits of hard disk",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"minimum": 1,
"maximum": 95
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (%)",
"maximum": 100
}
}
}
}
},
"internal_ping": {
"type": "object",
"description": "Response limits of internal ping",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (ms)",
"maximum": 100
}
}
}
}
},
"transfer": {
"type": "object",
"description": "Consumption limits for transfer",
"properties": {
"warning": {
"type": "object",
"description": "Set limits for warning",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"minimum": 1
}
}
},
"critical": {
"type": "object",
"description": "Set limits for critical case",
"properties": {
"alert": {
"type": "boolean",
"description": "Enable alert"
},
"value": {
"type": "integer",
"description": "Advise when this value is exceeded (kbps)",
"maximum": 2000
}
}
}
}
}
}
},
"ports": {
"type": "array",
"description": "Array of ports that will be monitored",
"items": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Internet protocol",
"enum": ["TCP", "UDP"]
},
"port": {
"type": "integer",
"description": "Port number",
"minimum": 1,
"maximum": 65535
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RESPONDING", "NOT_RESPONDING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"processes": {
"type": "array",
"description": "Array of processes that will be monitored",
"items": {
"type": "object",
"properties": {
"process": {
"type": "string",
"description": "Name of the process"
},
"alert_if": {
"type": "string",
"description": "Case of alert",
"enum": ["RUNNING", "NOT_RUNNING"]
},
"email_notification": {
"type": "boolean",
"description": "Set true for sending e-mail notifications"
}
}
}
},
"cloudpanel_id": {
"type": "string",
"description": "Public identifier shown in panel that will be used in case of need of technical specialists help"
}
}
}
Example:
{
"id": "0F9A1604FC80EB625FC6AEE7394893BE",
"name": "Default Policy",
"description": "Default Policy Description",
"default": 1,
"state": "CONFIGURING",
"creation_date": "2014-10-29T07:52:46+00:00",
"email": "",
"agent": false,
"servers": [
{
"id": "E83777750130E1111AA89623B9557CAF",
"name": "My Server 1"
},
{
"id": "6AAA2BD60813F419DEC8D69C6E4F6477",
"name": "My Server 2"
}
],
"thresholds": {
"cpu": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"ram": {
"warning": {
"value": 90,
"alert": false
},
"critical": {
"value": 95,
"alert": false
}
},
"transfer": {
"warning": {
"value": 1000,
"alert": false
},
"critical": {
"value": 2000,
"alert": false
}
},
"internal_ping": {
"warning": {
"value": 50,
"alert": false
},
"critical": {
"value": 100,
"alert": false
}
}
},
"ports": [],
"processes": [],
"cloudpanel_id": "mo99AA4_1"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "MONITORING_POLICY_NOT_FOUND",
"Message": "Monitoring policy not found",
"Errors": null
}
{
"Type": "SERVER_NOT_FOUND",
"Message": "Server not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
SSH Keys
Collection of available methods for ssh_keys
Returns a list of your ssh_keys.
Adds a new ssh_key.
get
/ssh_keys
Returns a list of your ssh_keys.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of ssh_keys that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Ssh key ID"
},
"name": {
"type": "string",
"description": "Ssh key name"
},
"description": {
"type": "string",
"description": "Ssh key description"
},
"state": {
"type": "string",
"description": "Ssh key state"
},
"servers": {
"type": "array",
"description": "Servers using the ssh key",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server identifier"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
},
"md5": {
"type": "string",
"description": "Ssh key md5"
},
"public_key": {
"type": "string",
"description": "Ssh public key"
},
"creation_date": {
"type": "string",
"description": "Ssh key creation date"
}
}
}
}
Example:
[
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My SSH key 1",
"description": "My SSH key description",
"state": "ACTIVE",
"servers": [
{"id": "D0F6D8C8ED29D3036F94C27BBB789536","name": "Server 1"},
{"id": "E0F6D8C8ED29D3036F94C27BBB789537","name": "Server 2"}
],
"md5": "5df9f63916ebf8528697b629022993e8",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB",
"creation_date": "30-06-2015T 14:52:35+00.00"
},
{
"id": "39AA65F5D5B02FA02D58173094EBAF96",
"name": "My SSH key 2",
"description": "My SSH key description",
"state": "ACTIVE",
"servers": [
{"id": "D0F6D8C8ED29D3036F94C27BBB789536","name": "Server 1"},
{"id": "E0F6D8C8ED29D3036F94C27BBB789537","name": "Server 2"}
],
"md5": "5df9f63916ebf8528697b629022993e3",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAC",
"creation_date": "31-08-2017T 14:52:35+00.00"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/ssh_keys
Adds a new ssh_key.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "SSH Key name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "SSH Key description",
"maxLength": 256
},
"public_key": {
"type": "string",
"description": "Public key to import. If not given, new SSH key pair will be created and the private key is returned in the response.",
"maxLength": 256
}
}
}
Example:
{
"name": "My SSH Key",
"description": "My SSH description",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB"
}
HTTP status code 201
A new ssh_key creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My SSH key 1",
"description": "My SSH key description",
"state": "ACTIVE",
"servers": [],
"md5": "5df9f63916ebf8528697b629022993e8",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": " ",
"Errors": {
"invalid": "public_key"
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a ssh_key
Returns ssh_key's information.
Modifies a ssh_key.
Removes a ssh_key.
get
/ssh_keys/{ssh_key_id}
Returns ssh_key's information.
URI Parameters
- ssh_key_id: required (string)
Unique ssh key's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Ssh key ID"
},
"name": {
"type": "string",
"description": "Ssh key name"
},
"description": {
"type": "string",
"description": "Ssh key description"
},
"state": {
"type": "string",
"description": "Ssh key state"
},
"servers": {
"type": "array",
"description": "Servers using the ssh key",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Server identifier"
},
"name": {
"type": "string",
"description": "Server name"
}
}
}
},
"md5": {
"type": "string",
"description": "Ssh key md5"
},
"public_key": {
"type": "string",
"description": "Ssh public key"
},
"creation_date": {
"type": "string",
"description": "Ssh key creation date"
}
}
}
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My SSH key 1",
"description": "My SSH key description",
"state": "ACTIVE",
"servers": [
{"id": "D0F6D8C8ED29D3036F94C27BBB789536","name": "Server 1"},
{"id": "E0F6D8C8ED29D3036F94C27BBB789537","name": "Server 2"}
],
"md5": "5df9f63916ebf8528697b629022993e8",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "SSH Key not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/ssh_keys/{ssh_key_id}
Modifies a ssh_key.
URI Parameters
- ssh_key_id: required (string)
Unique ssh key's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "SSH Key name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "SSH Key description",
"maxLength": 256
}
}
}
Example:
{
"name": "My SSH Key rename",
"description": "My SSH Key rename description"
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My SSH key 1",
"description": "My SSH key description",
"state": "ACTIVE",
"servers": [
{"id": "D0F6D8C8ED29D3036F94C27BBB789536","name": "Server 1"},
{"id": "E0F6D8C8ED29D3036F94C27BBB789537","name": "Server 2"}
],
"md5": "5df9f63916ebf8528697b629022993e8",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "",
"Errors": {
"invalid": "public_key"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "SSH Key not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/ssh_keys/{ssh_key_id}
Removes a ssh_key.
URI Parameters
- ssh_key_id: required (string)
Unique ssh key's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the ssh_key it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "39AA65F5D5B02FA02D58173094EBAF95",
"name": "My SSH key 1",
"description": "My SSH key description",
"state": "DELETING",
"servers": [
{"id": "D0F6D8C8ED29D3036F94C27BBB789536","name": "Server 1"},
{"id": "E0F6D8C8ED29D3036F94C27BBB789537","name": "Server 2"}
],
"md5": "5df9f63916ebf8528697b629022993e8",
"public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB",
"creation_date": "30-06-2015T 14:52:35+00.00"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "IMAGE_NOT_FOUND",
"Message": "SSH Key not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Users
Collection of available methods for users
Returns a list of your users.
Adds a new user.
get
/users
Returns a list of your users.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of users that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
},
"description": {
"type": "string",
"description": "User description"
},
"email": {
"type": "string",
"description": "User e-mail"
},
"state": {
"type": "string",
"description": "User status",
"enum": ["ACTIVE", "DISABLED"]
},
"creation_date": {
"type": "string",
"description": "Date when user was created"
},
"api": {
"type": "object",
"description": "Information about the API",
"properties": {
"active": {
"type": "boolean",
"description": "True if API is active"
},
"key": {
"type": ["string","null"],
"description": "Token for accessing the API"
},
"allowed_ips": {
"type": "array",
"description": "Array of IPs from which access to API will be available",
"items": {
"type": "string"
}
}
}
},
"roles": {
"type": "object",
"description": "Role that the user belongs to",
"properties": {
"id": {
"type": "string",
"description": "Role Id"
},
"name": {
"type": "string",
"description": "Role name"
}
}
}
}
}
}
Example:
[
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138"
]
}
},
{
"id": "7C88E50FBC500A3D9D7F94E414255D6C",
"name": "034b011e.username",
"description": "User description",
"email": "useremail@arsys.es",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": false,
"key": null,
"allowed_ips": [
]
}
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/users
Adds a new user.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["name","password"],
"properties": {
"name": {
"type": "string",
"description": "User's name",
"maxLength": 30
},
"password": {
"type": "string",
"description": "User's password. Pass must contain at least 8 characters using uppercase letters, numbers and other special symbols.",
"minLength": 8,
"maxLength": 64
},
"description": {
"type": "string",
"description": "VPN description",
"maxLength": 256
},
"email": {
"type": "string",
"description": "User's e-mail",
"maxLength": 128
}
}
}
Example:
{
"name": "user",
"description": "User description",
"password": "test2015",
"email": "test@arsys.es"
}
HTTP status code 201
A new user creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "CREATING",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": false,
"key": null,
"allowed_ips": [
]
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) name, password missing or empty. ",
"Errors": {
"name": 1,
"password": 1
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a user
Returns user's information.
Modifies a user.
Removes a user.
get
/users/{user_id}
Returns user's information.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
},
"description": {
"type": "string",
"description": "User description"
},
"email": {
"type": "string",
"description": "User e-mail"
},
"state": {
"type": "string",
"description": "User status",
"enum": ["ACTIVE", "DISABLED"]
},
"creation_date": {
"type": "string",
"description": "Date when user was created"
},
"api": {
"type": "object",
"description": "Information about the API",
"properties": {
"active": {
"type": "boolean",
"description": "True if API is actived"
},
"key": {
"type": "string",
"description": "Token for accessing the API"
},
"allowed_ips": {
"type": "array",
"description": "Array of IPs from which access to IP will be available",
"items": {
"type": "string"
}
}
}
},
"roles": {
"type": "object",
"description": "Role that the user belongs to",
"properties": {
"id": {
"type": "string",
"description": "Role Id"
},
"name": {
"type": "string",
"description": "Role name"
}
}
}
}
}
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138"
]
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/users/{user_id}
Modifies a user.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"description": {
"type": "string",
"description": "User's description"
},
"email": {
"type": "string",
"description": "User's email",
"maxLength": 128
},
"password": {
"type": "string",
"description": "User's password. Pass must contain at least 8 characters using uppercase letters, numbers and other special symbols.",
"minLength": 8,
"maxLength": 64
},
"state": {
"type": "string",
"description": "Allows to enable or disable users",
"enum": ["ACTIVE", "DISABLE"]
}
}
}
Example:
{
"description": "User description",
"email": "test@arsys.es",
"password": "test2015",
"state": "ACTIVE"
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "User description",
"email": "user@arsys.es",
"state": "CONFIGURING",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138"
]
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Wrong value Field(s) password",
"Errors": {
"password": 1
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/users/{user_id}
Removes a user.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the user it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "REMOVING",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": false,
"key": null,
"allowed_ips": [
"214.4.143.138"
]
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a api
Information about API.
Modifies a api.
get
/users/{user_id}/api
Information about API.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"active": {
"type": "boolean",
"description": "True if API is active"
},
"key": {
"type": "string",
"description": "Token for accessing the API"
},
"allowed_ips": {
"type": "array",
"description": "Array of IPs from which access to API will be available",
"items": {
"type": "string"
}
}
}
}
Example:
{
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138"
]
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/users/{user_id}/api
Modifies a api.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"active": {
"type": "boolean",
"description": "Set true for enabling API",
"default": false
}
}
}
Example:
{
"active": true
}
HTTP status code 200
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138"
]
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) active missing or empty. ",
"Errors": {
"required": "active"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Shows the API key
Changes the API key
get
/users/{user_id}/api/key
Shows the API key
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Token for accessing the API"
}
}
}
Example:
{
"key": "f03c5c76aa853ff710b879909d0d7e3b"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/users/{user_id}/api/key
Changes the API key
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type: object
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "User description",
"email": "user@arsys.es",
"state": "CONFIGURING",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138"
]
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Collection of available methods for ips
IP's from which access to API is allowed.
Adds a new ip.
get
/users/{user_id}/api/ips
IP's from which access to API is allowed.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"description": "Array of IPs from which access to API will be available",
"items": {
"type": "string"
}
}
Example:
[
"214.4.143.138",
"214.4.143.139",
"214.4.143.140"
]
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/users/{user_id}/api/ips
Adds a new ip.
URI Parameters
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"required": ["ips"],
"properties": {
"ips": {
"type": "array",
"description": "Array of new IPs from which access to API will be available.",
"items": {
"type": "string",
"description": "IP"
}
}
}
}
Example:
{
"ips": [
"214.4.143.151",
"214.4.143.152"
]
}
HTTP status code 201
A new ip creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
"214.4.143.138",
"214.4.143.139",
"214.4.143.151",
"214.4.143.152",
]
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) ips missing or empty. ",
"Errors": {
"required": "ips"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Deletes an IP and forbides API access for it.
delete
/users/{user_id}/api/ips/{ip}
Deletes an IP and forbides API access for it.
URI Parameters
- user_id: required (string)
Unique user's identifier.
- ip: required (string)
Desired IP
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and it's just being done.
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
},
"description": {
"type": "string",
"description": "User description"
},
"email": {
"type": "string",
"description": "User e-mail"
},
"state": {
"type": "string",
"description": "User status",
"enum": ["ACTIVE", "DISABLED"]
},
"creation_date": {
"type": "string",
"description": "Date when user was created"
},
"api": {
"type": "object",
"description": "Information about the API",
"properties": {
"active": {
"type": "boolean",
"description": "True if API is actived"
},
"key": {
"type": "string",
"description": "Token for accessing the API"
},
"allowed_ips": {
"type": "array",
"description": "Array of IPs from which access to IP will be available",
"items": {
"type": "string"
}
}
}
},
"roles": {
"type": "object",
"description": "Role that the user belongs to",
"properties": {
"id": {
"type": "string",
"description": "Role Id"
},
"name": {
"type": "string",
"description": "Role name"
}
}
}
}
}
Example:
{
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user",
"description": "",
"email": "user@arsys.es",
"state": "ACTIVE",
"creation_date": "2015-04-06T23:48:38Z",
"api": {
"active": true,
"key": "f03c5c76aa853ff710b879909d0d7e3b",
"allowed_ips": [
]
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "USER_NOT_FOUND",
"Message": "User not found",
"Errors": null
}
{
"Type": "IP_NOT_FOUND",
"Message": "IP not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Collection of available methods for current_user_permissions
Returns a list with current user permissions
get
/users/current_user_permissions
Returns a list with current user permissions
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Actions allowed for this role",
"properties": {
"servers": {
"type": "object",
"description": "Servers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list servers"
},
"create": {
"type": "boolean",
"description": "Allows to create servers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete servers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change server name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change server description"
},
"start": {
"type": "boolean",
"description": "Allows to start servers"
},
"restart": {
"type": "boolean",
"description": "Allows to restart servers"
},
"shutdown": {
"type": "boolean",
"description": "Allows to shutdown servers"
},
"resize": {
"type": "boolean",
"description": "Allows to resize servers"
},
"reinstall": {
"type": "boolean",
"description": "Allows to reinstall servers"
},
"clone": {
"type": "boolean",
"description": "Allows to clone servers"
},
"manage_snapshot": {
"type": "boolean",
"description": "Allows to manage snapshots"
},
"assign_ip": {
"type": "boolean",
"description": "Allows to assign new IPs"
},
"manage_dvd": {
"type": "boolean",
"description": "Allows to manage DVD images"
},
"access_kvm_console": {
"type": "boolean",
"description": "Allows to access servers using KVM console"
}
}
},
"images": {
"type": "object",
"description": "Images permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list images"
},
"create": {
"type": "boolean",
"description": "Allows to create images"
},
"delete": {
"type": "boolean",
"description": "Allows to delete images"
},
"set_name": {
"type": "boolean",
"description": "Allows to change image name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change image description"
},
"disable_automatic_creation": {
"type": "boolean",
"description": "Allows to change image creation policy"
}
}
},
"shared_storages": {
"type": "object",
"description": "Shared storages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list shared storages"
},
"create": {
"type": "boolean",
"description": "Allows to create shared storages"
},
"delete": {
"type": "boolean",
"description": "Allows to delete shared storages"
},
"set_name": {
"type": "boolean",
"description": "Allows to change shared storage name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change shared storage description"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
},
"access": {
"type": "boolean",
"description": "Allows to manage shared storage permissions"
},
"resize": {
"type": "boolean",
"description": "Allows to resize shared storages"
}
}
},
"firewall_policies": {
"type": "object",
"description": "Firewall policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list firewall policies"
},
"create": {
"type": "boolean",
"description": "Allows to create firewall policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete firewall policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change firewall policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change firewall policy description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage firewall policy rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from firewall policies"
},
"clone": {
"type": "boolean",
"description": "Allows to clone firewall policies"
}
}
},
"load_balancers": {
"type": "object",
"description": "Load balancers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list load balancers"
},
"create": {
"type": "boolean",
"description": "Allows to create load balancers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete load balancers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change load balancer name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change load balancer description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage load balancer rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from load balancers"
},
"modify": {
"type": "boolean",
"description": "Allows to edit load balancers"
}
}
},
"public_ips": {
"type": "object",
"description": "Public IPs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list public IPs"
},
"create": {
"type": "boolean",
"description": "Allows to create new IPs"
},
"delete": {
"type": "boolean",
"description": "Allows to delete IPs"
},
"release": {
"type": "boolean",
"description": "Allows to release IPs"
},
"set_reverse_dns": {
"type": "boolean",
"description": "Allows to change reverse DNS name"
}
}
},
"private_network": {
"type": "object",
"description": "Private networks permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list private networks"
},
"create": {
"type": "boolean",
"description": "Allows to create private networks"
},
"delete": {
"type": "boolean",
"description": "Allows to delete private networks"
},
"set_name": {
"type": "boolean",
"description": "Allows to change private network name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change private network description"
},
"set_network_info": {
"type": "boolean",
"description": "Allows to edit private network configuration"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
}
}
},
"vpn": {
"type": "object",
"description": "VPNs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list VPNs"
},
"create": {
"type": "boolean",
"description": "Allows to create VPNs"
},
"delete": {
"type": "boolean",
"description": "Allows to remote VPNs"
},
"set_name": {
"type": "boolean",
"description": "Allows to change VPN name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change VPN description"
},
"download_file": {
"type": "boolean",
"description": "Allows to download VPN configuration file"
}
}
},
"monitoring_center": {
"type": "object",
"description": "Monitoring center permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitored resources"
}
}
},
"monitoring_policies": {
"type": "object",
"description": "Monitoring policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitoring policies"
},
"create": {
"type": "boolean",
"description": "Allows to create monitoring policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete monitoring policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change monitoring policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change monitoring policy description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change monitoring policy email"
},
"modify_resources": {
"type": "boolean",
"description": "Allows to changes thresholds"
},
"manage_ports": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_processes": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached to monitoring policy"
},
"clone": {
"type": "boolean",
"description": "Allows to clone monitoring policies"
}
}
},
"backups": {
"type": "object",
"description": "Backups permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list backup accounts"
},
"create": {
"type": "boolean",
"description": "Allows to create backup accounts"
},
"delete": {
"type": "boolean",
"description": "Allows to delete backup accounts"
}
}
},
"logs": {
"type": "object",
"description": "Logs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list logs"
}
}
},
"users": {
"type": "object",
"description": "Users permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list users"
},
"create": {
"type": "boolean",
"description": "Allows to create users"
},
"delete": {
"type": "boolean",
"description": "Allows to delete users"
},
"set_description": {
"type": "boolean",
"description": "Allows to change user description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change user e-mail"
},
"set_password": {
"type": "boolean",
"description": "Allows to change user password"
},
"manage_api": {
"type": "boolean",
"description": "Allows to manage the Cloud Panel from the API"
},
"enable": {
"type": "boolean",
"description": "Allows to enable users"
},
"disable": {
"type": "boolean",
"description": "Allows to disable users"
},
"change_role": {
"type": "boolean",
"description": "Allows to change user role"
}
}
},
"roles": {
"type": "object",
"description": "Roles permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list roles"
},
"create": {
"type": "boolean",
"description": "Allows to create roles"
},
"delete": {
"type": "boolean",
"description": "Allows to delete roles"
},
"set_name": {
"type": "boolean",
"description": "Allows to change role name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change role description"
},
"manage_users": {
"type": "boolean",
"description": "Allows to manage users' role"
},
"modify": {
"type": "boolean",
"description": "Allows to change role permissions"
},
"clone": {
"type": "boolean",
"description": "Allows to clone roles"
}
}
},
"usages": {
"type": "object",
"description": "Usages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list usages"
}
}
},
"interactive_invoices": {
"type": "object",
"description": "Interactive invoices permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list interactive invoices"
}
}
}
}
}
Example:
{
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Roles
Collection of available methods for roles
Returns a list of your roles.
Adds a new role.
get
/roles
Returns a list of your roles.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of roles that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Role ID"
},
"name": {
"type": "string",
"description": "Role name"
},
"description": {
"type": "string",
"description": "Role description"
},
"state": {
"type": "string",
"description": "Role status"
},
"default": {
"type": "integer",
"description": "Define default panel roles (1)"
},
"creation_date": {
"type": "string",
"description": "Date when role was created"
},
"users": {
"type": "array",
"description": "Users assigned to this role",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
},
"permissions": {
"type": "object",
"description": "Actions allowed for this role",
"properties": {
"servers": {
"type": "object",
"description": "Servers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list servers"
},
"create": {
"type": "boolean",
"description": "Allows to create servers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete servers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change server name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change server description"
},
"start": {
"type": "boolean",
"description": "Allows to start servers"
},
"restart": {
"type": "boolean",
"description": "Allows to restart servers"
},
"shutdown": {
"type": "boolean",
"description": "Allows to shutdown servers"
},
"resize": {
"type": "boolean",
"description": "Allows to resize servers"
},
"reinstall": {
"type": "boolean",
"description": "Allows to reinstall servers"
},
"clone": {
"type": "boolean",
"description": "Allows to clone servers"
},
"manage_snapshot": {
"type": "boolean",
"description": "Allows to manage snapshots"
},
"assign_ip": {
"type": "boolean",
"description": "Allows to assign new IPs"
},
"manage_dvd": {
"type": "boolean",
"description": "Allows to manage DVD images"
},
"access_kvm_console": {
"type": "boolean",
"description": "Allows to access servers using KVM console"
}
}
},
"images": {
"type": "object",
"description": "Images permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list images"
},
"create": {
"type": "boolean",
"description": "Allows to create images"
},
"delete": {
"type": "boolean",
"description": "Allows to delete images"
},
"set_name": {
"type": "boolean",
"description": "Allows to change image name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change image description"
},
"disable_automatic_creation": {
"type": "boolean",
"description": "Allows to change image creation policy"
}
}
},
"shared_storages": {
"type": "object",
"description": "Shared storages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list shared storages"
},
"create": {
"type": "boolean",
"description": "Allows to create shared storages"
},
"delete": {
"type": "boolean",
"description": "Allows to delete shared storages"
},
"set_name": {
"type": "boolean",
"description": "Allows to change shared storage name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change shared storage description"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
},
"access": {
"type": "boolean",
"description": "Allows to manage shared storage permissions"
},
"resize": {
"type": "boolean",
"description": "Allows to resize shared storages"
}
}
},
"firewall_policies": {
"type": "object",
"description": "Firewall policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list firewall policies"
},
"create": {
"type": "boolean",
"description": "Allows to create firewall policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete firewall policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change firewall policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change firewall policy description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage firewall policy rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from firewall policies"
},
"clone": {
"type": "boolean",
"description": "Allows to clone firewall policies"
}
}
},
"load_balancers": {
"type": "object",
"description": "Load balancers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list load balancers"
},
"create": {
"type": "boolean",
"description": "Allows to create load balancers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete load balancers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change load balancer name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change load balancer description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage load balancer rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from load balancers"
},
"modify": {
"type": "boolean",
"description": "Allows to edit load balancers"
}
}
},
"public_ips": {
"type": "object",
"description": "Public IPs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list public IPs"
},
"create": {
"type": "boolean",
"description": "Allows to create new IPs"
},
"delete": {
"type": "boolean",
"description": "Allows to delete IPs"
},
"release": {
"type": "boolean",
"description": "Allows to release IPs"
},
"set_reverse_dns": {
"type": "boolean",
"description": "Allows to change reverse DNS name"
}
}
},
"private_network": {
"type": "object",
"description": "Private networks permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list private networks"
},
"create": {
"type": "boolean",
"description": "Allows to create private networks"
},
"delete": {
"type": "boolean",
"description": "Allows to delete private networks"
},
"set_name": {
"type": "boolean",
"description": "Allows to change private network name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change private network description"
},
"set_network_info": {
"type": "boolean",
"description": "Allows to edit private network configuration"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
}
}
},
"vpn": {
"type": "object",
"description": "VPNs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list VPNs"
},
"create": {
"type": "boolean",
"description": "Allows to create VPNs"
},
"delete": {
"type": "boolean",
"description": "Allows to remote VPNs"
},
"set_name": {
"type": "boolean",
"description": "Allows to change VPN name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change VPN description"
},
"download_file": {
"type": "boolean",
"description": "Allows to download VPN configuration file"
}
}
},
"monitoring_center": {
"type": "object",
"description": "Monitoring center permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitored resources"
}
}
},
"monitoring_policies": {
"type": "object",
"description": "Monitoring policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitoring policies"
},
"create": {
"type": "boolean",
"description": "Allows to create monitoring policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete monitoring policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change monitoring policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change monitoring policy description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change monitoring policy email"
},
"modify_resources": {
"type": "boolean",
"description": "Allows to changes thresholds"
},
"manage_ports": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_processes": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached to monitoring policy"
},
"clone": {
"type": "boolean",
"description": "Allows to clone monitoring policies"
}
}
},
"backups": {
"type": "object",
"description": "Backups permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list backup accounts"
},
"create": {
"type": "boolean",
"description": "Allows to create backup accounts"
},
"delete": {
"type": "boolean",
"description": "Allows to delete backup accounts"
}
}
},
"logs": {
"type": "object",
"description": "Logs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list logs"
}
}
},
"users": {
"type": "object",
"description": "Users permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list users"
},
"create": {
"type": "boolean",
"description": "Allows to create users"
},
"delete": {
"type": "boolean",
"description": "Allows to delete users"
},
"set_description": {
"type": "boolean",
"description": "Allows to change user description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change user e-mail"
},
"set_password": {
"type": "boolean",
"description": "Allows to change user password"
},
"manage_api": {
"type": "boolean",
"description": "Allows to manage the Cloud Panel from the API"
},
"enable": {
"type": "boolean",
"description": "Allows to enable users"
},
"disable": {
"type": "boolean",
"description": "Allows to disable users"
},
"change_role": {
"type": "boolean",
"description": "Allows to change user role"
}
}
},
"roles": {
"type": "object",
"description": "Roles permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list roles"
},
"create": {
"type": "boolean",
"description": "Allows to create roles"
},
"delete": {
"type": "boolean",
"description": "Allows to delete roles"
},
"set_name": {
"type": "boolean",
"description": "Allows to change role name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change role description"
},
"manage_users": {
"type": "boolean",
"description": "Allows to manage users' role"
},
"modify": {
"type": "boolean",
"description": "Allows to change role permissions"
},
"clone": {
"type": "boolean",
"description": "Allows to clone roles"
}
}
},
"usages": {
"type": "object",
"description": "Usages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list usages"
}
}
},
"interactive_invoices": {
"type": "object",
"description": "Interactive invoices permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list interactive invoices"
}
}
}
}
}
}
}
}
Example:
[
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977E",
"name": "Administrator",
"description": "Administrator role",
"state": "ACTIVE",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
}
],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/roles
Adds a new role.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Role name",
"maxLength": 128
}
}
}
Example:
{
"name": "My custom role"
}
HTTP status code 201
A new role creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "321AA4587A7C9875AA1EA877C8449E",
"name": "My custom role",
"description": null,
"state": "ACTIVE",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) name missing or empty. ",
"Errors": {
"required": "name"
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a role
Returns role's information.
Modifies a role.
Removes a role.
get
/roles/{role_id}
Returns role's information.
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Role ID"
},
"name": {
"type": "string",
"description": "Role name"
},
"description": {
"type": "string",
"description": "Role description"
},
"state": {
"type": "string",
"description": "Role status"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default role"
},
"creation_date": {
"type": "string",
"description": "Date when role was created"
},
"users": {
"type": "array",
"description": "Users assigned to this role",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
},
"permissions": {
"type": "object",
"description": "Actions allowed for this role",
"properties": {
"servers": {
"type": "object",
"description": "Servers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list servers"
},
"create": {
"type": "boolean",
"description": "Allows to create servers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete servers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change server name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change server description"
},
"start": {
"type": "boolean",
"description": "Allows to start servers"
},
"restart": {
"type": "boolean",
"description": "Allows to restart servers"
},
"shutdown": {
"type": "boolean",
"description": "Allows to shutdown servers"
},
"resize": {
"type": "boolean",
"description": "Allows to resize servers"
},
"reinstall": {
"type": "boolean",
"description": "Allows to reinstall servers"
},
"clone": {
"type": "boolean",
"description": "Allows to clone servers"
},
"manage_snapshot": {
"type": "boolean",
"description": "Allows to manage snapshots"
},
"assign_ip": {
"type": "boolean",
"description": "Allows to assign new IPs"
},
"manage_dvd": {
"type": "boolean",
"description": "Allows to manage DVD images"
},
"access_kvm_console": {
"type": "boolean",
"description": "Allows to access servers using KVM console"
}
}
},
"images": {
"type": "object",
"description": "Images permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list images"
},
"create": {
"type": "boolean",
"description": "Allows to create images"
},
"delete": {
"type": "boolean",
"description": "Allows to delete images"
},
"set_name": {
"type": "boolean",
"description": "Allows to change image name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change image description"
},
"disable_automatic_creation": {
"type": "boolean",
"description": "Allows to change image creation policy"
}
}
},
"shared_storages": {
"type": "object",
"description": "Shared storages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list shared storages"
},
"create": {
"type": "boolean",
"description": "Allows to create shared storages"
},
"delete": {
"type": "boolean",
"description": "Allows to delete shared storages"
},
"set_name": {
"type": "boolean",
"description": "Allows to change shared storage name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change shared storage description"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
},
"access": {
"type": "boolean",
"description": "Allows to manage shared storage permissions"
},
"resize": {
"type": "boolean",
"description": "Allows to resize shared storages"
}
}
},
"firewall_policies": {
"type": "object",
"description": "Firewall policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list firewall policies"
},
"create": {
"type": "boolean",
"description": "Allows to create firewall policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete firewall policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change firewall policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change firewall policy description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage firewall policy rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from firewall policies"
},
"clone": {
"type": "boolean",
"description": "Allows to clone firewall policies"
}
}
},
"load_balancers": {
"type": "object",
"description": "Load balancers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list load balancers"
},
"create": {
"type": "boolean",
"description": "Allows to create load balancers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete load balancers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change load balancer name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change load balancer description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage load balancer rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from load balancers"
},
"modify": {
"type": "boolean",
"description": "Allows to edit load balancers"
}
}
},
"public_ips": {
"type": "object",
"description": "Public IPs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list public IPs"
},
"create": {
"type": "boolean",
"description": "Allows to create new IPs"
},
"delete": {
"type": "boolean",
"description": "Allows to delete IPs"
},
"release": {
"type": "boolean",
"description": "Allows to release IPs"
},
"set_reverse_dns": {
"type": "boolean",
"description": "Allows to change reverse DNS name"
}
}
},
"private_network": {
"type": "object",
"description": "Private networks permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list private networks"
},
"create": {
"type": "boolean",
"description": "Allows to create private networks"
},
"delete": {
"type": "boolean",
"description": "Allows to delete private networks"
},
"set_name": {
"type": "boolean",
"description": "Allows to change private network name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change private network description"
},
"set_network_info": {
"type": "boolean",
"description": "Allows to edit private network configuration"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
}
}
},
"vpn": {
"type": "object",
"description": "VPNs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list VPNs"
},
"create": {
"type": "boolean",
"description": "Allows to create VPNs"
},
"delete": {
"type": "boolean",
"description": "Allows to remote VPNs"
},
"set_name": {
"type": "boolean",
"description": "Allows to change VPN name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change VPN description"
},
"download_file": {
"type": "boolean",
"description": "Allows to download VPN configuration file"
}
}
},
"monitoring_center": {
"type": "object",
"description": "Monitoring center permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitored resources"
}
}
},
"monitoring_policies": {
"type": "object",
"description": "Monitoring policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitoring policies"
},
"create": {
"type": "boolean",
"description": "Allows to create monitoring policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete monitoring policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change monitoring policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change monitoring policy description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change monitoring policy email"
},
"modify_resources": {
"type": "boolean",
"description": "Allows to changes thresholds"
},
"manage_ports": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_processes": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached to monitoring policy"
},
"clone": {
"type": "boolean",
"description": "Allows to clone monitoring policies"
}
}
},
"backups": {
"type": "object",
"description": "Backups permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list backup accounts"
},
"create": {
"type": "boolean",
"description": "Allows to create backup accounts"
},
"delete": {
"type": "boolean",
"description": "Allows to delete backup accounts"
}
}
},
"logs": {
"type": "object",
"description": "Logs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list logs"
}
}
},
"users": {
"type": "object",
"description": "Users permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list users"
},
"create": {
"type": "boolean",
"description": "Allows to create users"
},
"delete": {
"type": "boolean",
"description": "Allows to delete users"
},
"set_description": {
"type": "boolean",
"description": "Allows to change user description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change user e-mail"
},
"set_password": {
"type": "boolean",
"description": "Allows to change user password"
},
"manage_api": {
"type": "boolean",
"description": "Allows to manage the Cloud Panel from the API"
},
"enable": {
"type": "boolean",
"description": "Allows to enable users"
},
"disable": {
"type": "boolean",
"description": "Allows to disable users"
},
"change_role": {
"type": "boolean",
"description": "Allows to change user role"
}
}
},
"roles": {
"type": "object",
"description": "Roles permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list roles"
},
"create": {
"type": "boolean",
"description": "Allows to create roles"
},
"delete": {
"type": "boolean",
"description": "Allows to delete roles"
},
"set_name": {
"type": "boolean",
"description": "Allows to change role name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change role description"
},
"manage_users": {
"type": "boolean",
"description": "Allows to manage users' role"
},
"modify": {
"type": "boolean",
"description": "Allows to change role permissions"
},
"clone": {
"type": "boolean",
"description": "Allows to clone roles"
}
}
},
"usages": {
"type": "object",
"description": "Usages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list usages"
}
}
},
"interactive_invoices": {
"type": "object",
"description": "Interactive invoices permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list interactive invoices"
}
}
}
}
}
}
}
Example:
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977E",
"name": "Administrator",
"description": "Administrator role",
"state": "ACTIVE",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
}
],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/roles/{role_id}
Modifies a role.
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"name": {
"type": "string",
"description": "Role name",
"maxLength": 128
},
"description": {
"type": "string",
"description": "Role description"
},
"state": {
"type": "string",
"description": "Allows to enable or disable the role",
"enum": ["ACTIVE", "DISABLE"]
}
}
}
Example:
{
"name": "Manager role",
"description": "Manager role description",
"state": "ACTIVE"
}
HTTP status code 202
Ok
Body
Media type: application/json
Type: object
Example:
{
"id": "321AA4587A7C9875AA1EA877C8449E",
"name": "Manager role",
"description": "Manager role description",
"state": "ACTIVE",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "VALIDATION_ERROR",
"Message": "Invalid status. Valid states are ACTIVE and DISABLED.",
"Errors": null
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/roles/{role_id}
Removes a role.
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the role it's just being deleted.
Body
Media type: application/json
Type: object
Example:
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977E",
"name": "Administrator",
"description": "Administrator role",
"state": "REMOVING",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
}
],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Lists role's permissions
Adds permissions to the role
get
/roles/{role_id}/permissions
Lists role's permissions
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Actions allowed for this role",
"properties": {
"servers": {
"type": "object",
"description": "Servers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list servers"
},
"create": {
"type": "boolean",
"description": "Allows to create servers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete servers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change server name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change server description"
},
"start": {
"type": "boolean",
"description": "Allows to start servers"
},
"restart": {
"type": "boolean",
"description": "Allows to restart servers"
},
"shutdown": {
"type": "boolean",
"description": "Allows to shutdown servers"
},
"resize": {
"type": "boolean",
"description": "Allows to resize servers"
},
"reinstall": {
"type": "boolean",
"description": "Allows to reinstall servers"
},
"clone": {
"type": "boolean",
"description": "Allows to clone servers"
},
"manage_snapshot": {
"type": "boolean",
"description": "Allows to manage snapshots"
},
"assign_ip": {
"type": "boolean",
"description": "Allows to assign new IPs"
},
"manage_dvd": {
"type": "boolean",
"description": "Allows to manage DVD images"
},
"access_kvm_console": {
"type": "boolean",
"description": "Allows to access servers using KVM console"
}
}
},
"images": {
"type": "object",
"description": "Images permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list images"
},
"create": {
"type": "boolean",
"description": "Allows to create images"
},
"delete": {
"type": "boolean",
"description": "Allows to delete images"
},
"set_name": {
"type": "boolean",
"description": "Allows to change image name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change image description"
},
"disable_automatic_creation": {
"type": "boolean",
"description": "Allows to change image creation policy"
}
}
},
"shared_storages": {
"type": "object",
"description": "Shared storages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list shared storages"
},
"create": {
"type": "boolean",
"description": "Allows to create shared storages"
},
"delete": {
"type": "boolean",
"description": "Allows to delete shared storages"
},
"set_name": {
"type": "boolean",
"description": "Allows to change shared storage name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change shared storage description"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
},
"access": {
"type": "boolean",
"description": "Allows to manage shared storage permissions"
},
"resize": {
"type": "boolean",
"description": "Allows to resize shared storages"
}
}
},
"firewall_policies": {
"type": "object",
"description": "Firewall policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list firewall policies"
},
"create": {
"type": "boolean",
"description": "Allows to create firewall policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete firewall policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change firewall policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change firewall policy description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage firewall policy rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from firewall policies"
},
"clone": {
"type": "boolean",
"description": "Allows to clone firewall policies"
}
}
},
"load_balancers": {
"type": "object",
"description": "Load balancers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list load balancers"
},
"create": {
"type": "boolean",
"description": "Allows to create load balancers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete load balancers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change load balancer name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change load balancer description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage load balancer rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from load balancers"
},
"modify": {
"type": "boolean",
"description": "Allows to edit load balancers"
}
}
},
"public_ips": {
"type": "object",
"description": "Public IPs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list public IPs"
},
"create": {
"type": "boolean",
"description": "Allows to create new IPs"
},
"delete": {
"type": "boolean",
"description": "Allows to delete IPs"
},
"release": {
"type": "boolean",
"description": "Allows to release IPs"
},
"set_reverse_dns": {
"type": "boolean",
"description": "Allows to change reverse DNS name"
}
}
},
"private_network": {
"type": "object",
"description": "Private networks permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list private networks"
},
"create": {
"type": "boolean",
"description": "Allows to create private networks"
},
"delete": {
"type": "boolean",
"description": "Allows to delete private networks"
},
"set_name": {
"type": "boolean",
"description": "Allows to change private network name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change private network description"
},
"set_network_info": {
"type": "boolean",
"description": "Allows to edit private network configuration"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
}
}
},
"vpn": {
"type": "object",
"description": "VPNs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list VPNs"
},
"create": {
"type": "boolean",
"description": "Allows to create VPNs"
},
"delete": {
"type": "boolean",
"description": "Allows to remote VPNs"
},
"set_name": {
"type": "boolean",
"description": "Allows to change VPN name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change VPN description"
},
"download_file": {
"type": "boolean",
"description": "Allows to download VPN configuration file"
}
}
},
"monitoring_center": {
"type": "object",
"description": "Monitoring center permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitored resources"
}
}
},
"monitoring_policies": {
"type": "object",
"description": "Monitoring policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitoring policies"
},
"create": {
"type": "boolean",
"description": "Allows to create monitoring policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete monitoring policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change monitoring policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change monitoring policy description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change monitoring policy email"
},
"modify_resources": {
"type": "boolean",
"description": "Allows to changes thresholds"
},
"manage_ports": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_processes": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached to monitoring policy"
},
"clone": {
"type": "boolean",
"description": "Allows to clone monitoring policies"
}
}
},
"backups": {
"type": "object",
"description": "Backups permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list backup accounts"
},
"create": {
"type": "boolean",
"description": "Allows to create backup accounts"
},
"delete": {
"type": "boolean",
"description": "Allows to delete backup accounts"
}
}
},
"logs": {
"type": "object",
"description": "Logs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list logs"
}
}
},
"users": {
"type": "object",
"description": "Users permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list users"
},
"create": {
"type": "boolean",
"description": "Allows to create users"
},
"delete": {
"type": "boolean",
"description": "Allows to delete users"
},
"set_description": {
"type": "boolean",
"description": "Allows to change user description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change user e-mail"
},
"set_password": {
"type": "boolean",
"description": "Allows to change user password"
},
"manage_api": {
"type": "boolean",
"description": "Allows to manage the Cloud Panel from the API"
},
"enable": {
"type": "boolean",
"description": "Allows to enable users"
},
"disable": {
"type": "boolean",
"description": "Allows to disable users"
},
"change_role": {
"type": "boolean",
"description": "Allows to change user role"
}
}
},
"roles": {
"type": "object",
"description": "Roles permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list roles"
},
"create": {
"type": "boolean",
"description": "Allows to create roles"
},
"delete": {
"type": "boolean",
"description": "Allows to delete roles"
},
"set_name": {
"type": "boolean",
"description": "Allows to change role name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change role description"
},
"manage_users": {
"type": "boolean",
"description": "Allows to manage users' role"
},
"modify": {
"type": "boolean",
"description": "Allows to change role permissions"
},
"clone": {
"type": "boolean",
"description": "Allows to clone roles"
}
}
},
"usages": {
"type": "object",
"description": "Usages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list usages"
}
}
},
"interactive_invoices": {
"type": "object",
"description": "Interactive invoices permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list interactive invoices"
}
}
}
}
}
Example:
{
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
put
/roles/{role_id}/permissions
Adds permissions to the role
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type: object
Example:
{
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a user
Returns users assigned to role
Add users to role
get
/roles/{role_id}/users
Returns users assigned to role
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "array",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Users assigned to this role",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
}
Example:
[
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
},
{
"id": "123987987865433BAA1EA877C898745F",
"name": "user"
}
]
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
post
/roles/{role_id}/users
Add users to role
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"users": {
"type": "array",
"items": [
{
"type": "string",
"description": "User ID"
}
]
}
}
}
Example:
{
"users": [
"4657B69F5F7D82190B23D8BE6CB05987",
"4657B69F5F7D82190B23D8BE6CB05988"
]
}
HTTP status code 202
A new user creation has been accepted and it's just being created.
Body
Media type: application/json
Type: object
Example:
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977E",
"name": "Administrator",
"description": "Administrator role",
"state": "ACTIVE",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
}
],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"type": "INVALID_PARAMETERS",
"message": "Required field(s) users missing or empty. ",
"errors": {
"required": "users"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a user
Returns information about a user
Removes user from role
get
/roles/{role_id}/users/{user_id}
Returns information about a user
URI Parameters
- role_id: required (string)
Unique role's identifier.
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 200
Ok
Body
Media type: application/json
Type:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"description": "Information about a user",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
Example:
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
delete
/roles/{role_id}/users/{user_id}
Removes user from role
URI Parameters
- role_id: required (string)
Unique role's identifier.
- user_id: required (string)
Unique user's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
HTTP status code 202
Action has been accepted and the user it's just being deleted.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Role ID"
},
"name": {
"type": "string",
"description": "Role name"
},
"description": {
"type": "string",
"description": "Role description"
},
"state": {
"type": "string",
"description": "Role status"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default role"
},
"creation_date": {
"type": "string",
"description": "Date when role was created"
},
"users": {
"type": "array",
"description": "Users assigned to this role",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
},
"permissions": {
"type": "object",
"description": "Actions allowed for this role",
"properties": {
"servers": {
"type": "object",
"description": "Servers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list servers"
},
"create": {
"type": "boolean",
"description": "Allows to create servers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete servers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change server name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change server description"
},
"start": {
"type": "boolean",
"description": "Allows to start servers"
},
"restart": {
"type": "boolean",
"description": "Allows to restart servers"
},
"shutdown": {
"type": "boolean",
"description": "Allows to shutdown servers"
},
"resize": {
"type": "boolean",
"description": "Allows to resize servers"
},
"reinstall": {
"type": "boolean",
"description": "Allows to reinstall servers"
},
"clone": {
"type": "boolean",
"description": "Allows to clone servers"
},
"manage_snapshot": {
"type": "boolean",
"description": "Allows to manage snapshots"
},
"assign_ip": {
"type": "boolean",
"description": "Allows to assign new IPs"
},
"manage_dvd": {
"type": "boolean",
"description": "Allows to manage DVD images"
},
"access_kvm_console": {
"type": "boolean",
"description": "Allows to access servers using KVM console"
}
}
},
"images": {
"type": "object",
"description": "Images permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list images"
},
"create": {
"type": "boolean",
"description": "Allows to create images"
},
"delete": {
"type": "boolean",
"description": "Allows to delete images"
},
"set_name": {
"type": "boolean",
"description": "Allows to change image name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change image description"
},
"disable_automatic_creation": {
"type": "boolean",
"description": "Allows to change image creation policy"
}
}
},
"shared_storages": {
"type": "object",
"description": "Shared storages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list shared storages"
},
"create": {
"type": "boolean",
"description": "Allows to create shared storages"
},
"delete": {
"type": "boolean",
"description": "Allows to delete shared storages"
},
"set_name": {
"type": "boolean",
"description": "Allows to change shared storage name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change shared storage description"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
},
"access": {
"type": "boolean",
"description": "Allows to manage shared storage permissions"
},
"resize": {
"type": "boolean",
"description": "Allows to resize shared storages"
}
}
},
"firewall_policies": {
"type": "object",
"description": "Firewall policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list firewall policies"
},
"create": {
"type": "boolean",
"description": "Allows to create firewall policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete firewall policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change firewall policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change firewall policy description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage firewall policy rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from firewall policies"
},
"clone": {
"type": "boolean",
"description": "Allows to clone firewall policies"
}
}
},
"load_balancers": {
"type": "object",
"description": "Load balancers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list load balancers"
},
"create": {
"type": "boolean",
"description": "Allows to create load balancers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete load balancers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change load balancer name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change load balancer description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage load balancer rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from load balancers"
},
"modify": {
"type": "boolean",
"description": "Allows to edit load balancers"
}
}
},
"public_ips": {
"type": "object",
"description": "Public IPs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list public IPs"
},
"create": {
"type": "boolean",
"description": "Allows to create new IPs"
},
"delete": {
"type": "boolean",
"description": "Allows to delete IPs"
},
"release": {
"type": "boolean",
"description": "Allows to release IPs"
},
"set_reverse_dns": {
"type": "boolean",
"description": "Allows to change reverse DNS name"
}
}
},
"private_network": {
"type": "object",
"description": "Private networks permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list private networks"
},
"create": {
"type": "boolean",
"description": "Allows to create private networks"
},
"delete": {
"type": "boolean",
"description": "Allows to delete private networks"
},
"set_name": {
"type": "boolean",
"description": "Allows to change private network name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change private network description"
},
"set_network_info": {
"type": "boolean",
"description": "Allows to edit private network configuration"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
}
}
},
"vpn": {
"type": "object",
"description": "VPNs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list VPNs"
},
"create": {
"type": "boolean",
"description": "Allows to create VPNs"
},
"delete": {
"type": "boolean",
"description": "Allows to remote VPNs"
},
"set_name": {
"type": "boolean",
"description": "Allows to change VPN name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change VPN description"
},
"download_file": {
"type": "boolean",
"description": "Allows to download VPN configuration file"
}
}
},
"monitoring_center": {
"type": "object",
"description": "Monitoring center permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitored resources"
}
}
},
"monitoring_policies": {
"type": "object",
"description": "Monitoring policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitoring policies"
},
"create": {
"type": "boolean",
"description": "Allows to create monitoring policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete monitoring policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change monitoring policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change monitoring policy description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change monitoring policy email"
},
"modify_resources": {
"type": "boolean",
"description": "Allows to changes thresholds"
},
"manage_ports": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_processes": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached to monitoring policy"
},
"clone": {
"type": "boolean",
"description": "Allows to clone monitoring policies"
}
}
},
"backups": {
"type": "object",
"description": "Backups permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list backup accounts"
},
"create": {
"type": "boolean",
"description": "Allows to create backup accounts"
},
"delete": {
"type": "boolean",
"description": "Allows to delete backup accounts"
}
}
},
"logs": {
"type": "object",
"description": "Logs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list logs"
}
}
},
"users": {
"type": "object",
"description": "Users permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list users"
},
"create": {
"type": "boolean",
"description": "Allows to create users"
},
"delete": {
"type": "boolean",
"description": "Allows to delete users"
},
"set_description": {
"type": "boolean",
"description": "Allows to change user description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change user e-mail"
},
"set_password": {
"type": "boolean",
"description": "Allows to change user password"
},
"manage_api": {
"type": "boolean",
"description": "Allows to manage the Cloud Panel from the API"
},
"enable": {
"type": "boolean",
"description": "Allows to enable users"
},
"disable": {
"type": "boolean",
"description": "Allows to disable users"
},
"change_role": {
"type": "boolean",
"description": "Allows to change user role"
}
}
},
"roles": {
"type": "object",
"description": "Roles permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list roles"
},
"create": {
"type": "boolean",
"description": "Allows to create roles"
},
"delete": {
"type": "boolean",
"description": "Allows to delete roles"
},
"set_name": {
"type": "boolean",
"description": "Allows to change role name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change role description"
},
"manage_users": {
"type": "boolean",
"description": "Allows to manage users' role"
},
"modify": {
"type": "boolean",
"description": "Allows to change role permissions"
},
"clone": {
"type": "boolean",
"description": "Allows to clone roles"
}
}
},
"usages": {
"type": "object",
"description": "Usages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list usages"
}
}
},
"interactive_invoices": {
"type": "object",
"description": "Interactive invoices permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list interactive invoices"
}
}
}
}
}
}
}
Example:
{
"id": "A0FAA4587A7CB6BBAA1EA877C844977E",
"name": "Administrator",
"description": "Administrator role",
"state": "CONFIGURING",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [
{
"id": "FAAA24587A7CB6BBAA1EA877C898745F",
"name": "user12"
}
],
"permissions": {
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Clones a role
post
/roles/{role_id}/clone
Clones a role
URI Parameters
- role_id: required (string)
Unique role's identifier.
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Role name",
"maxLength": 128
}
}
}
Example:
{
"name": "Custom role clone"
}
HTTP status code 201
A new element has been created successfully.
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"id": {
"type": "string",
"description": "Role ID"
},
"name": {
"type": "string",
"description": "Role name"
},
"description": {
"type": "string",
"description": "Role description"
},
"state": {
"type": "string",
"description": "Role status"
},
"default": {
"type": "integer",
"description": "If its value is 1, it means that it is a default role"
},
"creation_date": {
"type": "string",
"description": "Date when role was created"
},
"users": {
"type": "array",
"description": "Users assigned to this role",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
},
"permissions": {
"type": "object",
"description": "Actions allowed for this role",
"properties": {
"servers": {
"type": "object",
"description": "Servers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list servers"
},
"create": {
"type": "boolean",
"description": "Allows to create servers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete servers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change server name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change server description"
},
"start": {
"type": "boolean",
"description": "Allows to start servers"
},
"restart": {
"type": "boolean",
"description": "Allows to restart servers"
},
"shutdown": {
"type": "boolean",
"description": "Allows to shutdown servers"
},
"resize": {
"type": "boolean",
"description": "Allows to resize servers"
},
"reinstall": {
"type": "boolean",
"description": "Allows to reinstall servers"
},
"clone": {
"type": "boolean",
"description": "Allows to clone servers"
},
"manage_snapshot": {
"type": "boolean",
"description": "Allows to manage snapshots"
},
"assign_ip": {
"type": "boolean",
"description": "Allows to assign new IPs"
},
"manage_dvd": {
"type": "boolean",
"description": "Allows to manage DVD images"
},
"access_kvm_console": {
"type": "boolean",
"description": "Allows to access servers using KVM console"
}
}
},
"images": {
"type": "object",
"description": "Images permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list images"
},
"create": {
"type": "boolean",
"description": "Allows to create images"
},
"delete": {
"type": "boolean",
"description": "Allows to delete images"
},
"set_name": {
"type": "boolean",
"description": "Allows to change image name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change image description"
},
"disable_automatic_creation": {
"type": "boolean",
"description": "Allows to change image creation policy"
}
}
},
"shared_storages": {
"type": "object",
"description": "Shared storages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list shared storages"
},
"create": {
"type": "boolean",
"description": "Allows to create shared storages"
},
"delete": {
"type": "boolean",
"description": "Allows to delete shared storages"
},
"set_name": {
"type": "boolean",
"description": "Allows to change shared storage name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change shared storage description"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
},
"access": {
"type": "boolean",
"description": "Allows to manage shared storage permissions"
},
"resize": {
"type": "boolean",
"description": "Allows to resize shared storages"
}
}
},
"firewall_policies": {
"type": "object",
"description": "Firewall policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list firewall policies"
},
"create": {
"type": "boolean",
"description": "Allows to create firewall policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete firewall policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change firewall policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change firewall policy description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage firewall policy rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from firewall policies"
},
"clone": {
"type": "boolean",
"description": "Allows to clone firewall policies"
}
}
},
"load_balancers": {
"type": "object",
"description": "Load balancers permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list load balancers"
},
"create": {
"type": "boolean",
"description": "Allows to create load balancers"
},
"delete": {
"type": "boolean",
"description": "Allows to delete load balancers"
},
"set_name": {
"type": "boolean",
"description": "Allows to change load balancer name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change load balancer description"
},
"manage_rules": {
"type": "boolean",
"description": "Allows to manage load balancer rules"
},
"manage_attached_server_ips": {
"type": "boolean",
"description": "Allows to add or remove servers from load balancers"
},
"modify": {
"type": "boolean",
"description": "Allows to edit load balancers"
}
}
},
"public_ips": {
"type": "object",
"description": "Public IPs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list public IPs"
},
"create": {
"type": "boolean",
"description": "Allows to create new IPs"
},
"delete": {
"type": "boolean",
"description": "Allows to delete IPs"
},
"release": {
"type": "boolean",
"description": "Allows to release IPs"
},
"set_reverse_dns": {
"type": "boolean",
"description": "Allows to change reverse DNS name"
}
}
},
"private_network": {
"type": "object",
"description": "Private networks permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list private networks"
},
"create": {
"type": "boolean",
"description": "Allows to create private networks"
},
"delete": {
"type": "boolean",
"description": "Allows to delete private networks"
},
"set_name": {
"type": "boolean",
"description": "Allows to change private network name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change private network description"
},
"set_network_info": {
"type": "boolean",
"description": "Allows to edit private network configuration"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached"
}
}
},
"vpn": {
"type": "object",
"description": "VPNs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list VPNs"
},
"create": {
"type": "boolean",
"description": "Allows to create VPNs"
},
"delete": {
"type": "boolean",
"description": "Allows to remote VPNs"
},
"set_name": {
"type": "boolean",
"description": "Allows to change VPN name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change VPN description"
},
"download_file": {
"type": "boolean",
"description": "Allows to download VPN configuration file"
}
}
},
"monitoring_center": {
"type": "object",
"description": "Monitoring center permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitored resources"
}
}
},
"monitoring_policies": {
"type": "object",
"description": "Monitoring policies permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list monitoring policies"
},
"create": {
"type": "boolean",
"description": "Allows to create monitoring policies"
},
"delete": {
"type": "boolean",
"description": "Allows to delete monitoring policies"
},
"set_name": {
"type": "boolean",
"description": "Allows to change monitoring policy name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change monitoring policy description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change monitoring policy email"
},
"modify_resources": {
"type": "boolean",
"description": "Allows to changes thresholds"
},
"manage_ports": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_processes": {
"type": "boolean",
"description": "Allows to add or remove port alerts to monitoring policy"
},
"manage_attached_servers": {
"type": "boolean",
"description": "Allows to manage servers attached to monitoring policy"
},
"clone": {
"type": "boolean",
"description": "Allows to clone monitoring policies"
}
}
},
"backups": {
"type": "object",
"description": "Backups permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list backup accounts"
},
"create": {
"type": "boolean",
"description": "Allows to create backup accounts"
},
"delete": {
"type": "boolean",
"description": "Allows to delete backup accounts"
}
}
},
"logs": {
"type": "object",
"description": "Logs permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list logs"
}
}
},
"users": {
"type": "object",
"description": "Users permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list users"
},
"create": {
"type": "boolean",
"description": "Allows to create users"
},
"delete": {
"type": "boolean",
"description": "Allows to delete users"
},
"set_description": {
"type": "boolean",
"description": "Allows to change user description"
},
"set_email": {
"type": "boolean",
"description": "Allows to change user e-mail"
},
"set_password": {
"type": "boolean",
"description": "Allows to change user password"
},
"manage_api": {
"type": "boolean",
"description": "Allows to manage the Cloud Panel from the API"
},
"enable": {
"type": "boolean",
"description": "Allows to enable users"
},
"disable": {
"type": "boolean",
"description": "Allows to disable users"
},
"change_role": {
"type": "boolean",
"description": "Allows to change user role"
}
}
},
"roles": {
"type": "object",
"description": "Roles permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list roles"
},
"create": {
"type": "boolean",
"description": "Allows to create roles"
},
"delete": {
"type": "boolean",
"description": "Allows to delete roles"
},
"set_name": {
"type": "boolean",
"description": "Allows to change role name"
},
"set_description": {
"type": "boolean",
"description": "Allows to change role description"
},
"manage_users": {
"type": "boolean",
"description": "Allows to manage users' role"
},
"modify": {
"type": "boolean",
"description": "Allows to change role permissions"
},
"clone": {
"type": "boolean",
"description": "Allows to clone roles"
}
}
},
"usages": {
"type": "object",
"description": "Usages permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list usages"
}
}
},
"interactive_invoices": {
"type": "object",
"description": "Interactive invoices permissions",
"properties": {
"show": {
"type": "boolean",
"description": "Allows to list interactive invoices"
}
}
}
}
}
}
}
Example:
{
"id": "321AA4587A7C9875AA1EA877C8449E",
"name": "My custom role clone",
"description": "",
"state": "ACTIVE",
"creation_date": "2015-04-29T07:46:40+00:00",
"users": [],
"permissions":{
"servers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"start": true,
"restart": true,
"shutdown": true,
"resize": true,
"reinstall": true,
"clone": false,
"manage_snapshot": true,
"assign_ip": true,
"manage_dvd": true,
"access_kvm_console": true
},
"images": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"disable_automatic_creation": true
},
"shared_storages": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_attached_servers": true,
"access": false,
"resize": true
},
"firewall_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"clone": false
},
"load_balancers": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_rules": true,
"manage_attached_server_ips": true,
"modify": true
},
"public_ips": {
"show": true,
"create": true,
"delete": false,
"release": true,
"set_reverse_dns": true
},
"private_network": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_network_info": true,
"manage_attached_servers": true
},
"vpn": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"download_file": true
},
"monitoring_center": {
"show": true
},
"monitoring_policies": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"set_email": true,
"modify_resources": true,
"manage_ports": true,
"manage_processes": true,
"manage_attached_servers": true,
"clone": true
},
"backups": {
"show": true,
"create": false,
"delete": false
},
"logs": {
"show": true
},
"users": {
"show": true,
"create": true,
"delete": false,
"set_description": true,
"set_email": true,
"set_password": true,
"manage_api": false,
"enable": true,
"disable": false,
"change_role": true
},
"roles": {
"show": true,
"create": true,
"delete": false,
"set_name": true,
"set_description": true,
"manage_users": true,
"modify": true,
"clone": true
},
"usages": {
"show": true
},
"interactive_invoices": {
"show": true
}
}
}
HTTP status code 400
Bad Request. The call contains incorrect parameters or values.
Body
Media type: application/json
Type: object
Example:
{
"Type": "INVALID_PARAMETERS",
"Message": "Required field(s) name missing or empty. ",
"Errors": {
"required": "name"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ROLE_NOT_FOUND",
"Message": "Role not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Logs
Collection of available methods for logs
Returns a list with logs.
get
/logs
Returns a list with logs.
Query Parameters
- period: required (one of LAST_HOUR, LAST_24H, LAST_7D, LAST_30D, LAST_365D, CUSTOM)
Time range whose logs will be shown.
- start_date: required (datetime)
The first date in a custom range. Required only if selected period is "CUSTOM".
- end_date: required (datetime)
The second date in a custom range. Required only if selected period is "CUSTOM".
- page: (integer)
Allows to use pagination. Sets the number of logs that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Log ID"
},
"start_date": {
"type": "string",
"description": "Date when action started"
},
"end_date": {
"type": "string",
"description": "Date when action finished"
},
"duration": {
"type": "integer",
"description": "Action duration"
},
"status": {
"type": "object",
"description": "Action state",
"properties": {
"state": {
"type": "string",
"description": "Action state"
},
"percent": {
"type": "integer",
"description": "Percentage completed"
}
}
},
"action": {
"type": "string",
"description": "Action"
},
"type": {
"type": "string",
"description": "Resource type"
},
"resource": {
"type": "object",
"description": "Resources properties",
"properties": {
"id": {
"type": "string",
"description": "Resource ID"
},
"name": {
"type": "string",
"description": "Resource name"
}
}
},
"details": {
"type": "object",
"description": "Action details",
"properties": {
}
},
"user": {
"type": "object",
"description": "User who executed the action",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
}
}
}
Example:
[
{
"id": "E485755233541090E369E957EA2499D7",
"start_date": "2015-04-06T23:46:38Z",
"end_date": "2015-04-06T23:48:52Z",
"duration": 72,
"status": {
"state": "COMPLETED",
"percent": 100
},
"action": "DELETE",
"type": "MONITORINGPOLICY",
"resource": {
"id": "E485755233541090E6546957EA2499D7",
"name": "My Monitoring Policy 1"
},
"details": {
},
"user": {
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user"
},
"cloudpanel_id": "ap99AA4_1"
},
{
"id": "E485755233541090E369E957EA2499D8",
"start_date": "2015-04-06T23:51:00Z",
"end_date": "2015-04-06T23:51:29Z",
"duration": 29,
"status": {
"state": "COMPLETED",
"percent": 100
},
"action": "CREATE",
"type": "MONITORINGPOLICY",
"resource": {
"id": "E485755233541090E6546957EA2499D7",
"name": "My Monitoring Policy test"
},
"details": {
},
"user": {
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user"
}
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Returns information about a log
get
/logs/{log_id}
Returns information about a log
URI Parameters
- log_id: required (string)
Desired log ID.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Log ID"
},
"start_date": {
"type": "string",
"description": "Date when action started"
},
"end_date": {
"type": "string",
"description": "Date when action finished"
},
"duration": {
"type": "integer",
"description": "Action duration"
},
"status": {
"type": "object",
"description": "Action state",
"properties": {
"state": {
"type": "string",
"description": "Action state"
},
"percent": {
"type": "integer",
"description": "Percentage completed"
}
}
},
"action": {
"type": "string",
"description": "Action"
},
"type": {
"type": "string",
"description": "Resource type"
},
"resource": {
"type": "object",
"description": "Resources properties",
"properties": {
"id": {
"type": "string",
"description": "Resource ID"
},
"name": {
"type": "string",
"description": "Resource name"
}
}
},
"details": {
"type": "object",
"description": "Action details",
"properties": {
}
},
"user": {
"type": "object",
"description": "User who executed the action",
"properties": {
"id": {
"type": "string",
"description": "User ID"
},
"name": {
"type": "string",
"description": "User name"
}
}
}
}
}
Example:
{
"id": "E485755233541090E369E957EA2499D7",
"start_date": "2015-04-06T23:46:38Z",
"end_date": "2015-04-06T23:48:52Z",
"duration": 72,
"status": {
"state": "COMPLETED",
"percent": 100
},
"action": "DELETE",
"type": "MONITORINGPOLICY",
"resource": {
"id": "E485755233541090E6546957EA2499D7",
"name": "My Monitoring Policy 1"
},
"details": {
},
"user": {
"id": "7C88E50FBC500A3D9D7F94E414255D6B",
"name": "034b011e.user"
}
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "LOG_NOT_FOUND",
"Message": "Log not found",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Usages
Collection of available methods for usages
Returns a list of your usages.
get
/usages
Returns a list of your usages.
Query Parameters
- period: required (one of LAST_HOUR, LAST_24H, LAST_7D, LAST_30D, LAST_365D, CUSTOM)
Time range whose logs will be shown.
- start_date: required (datetime)
The first date in a custom range. Required only if selected period is "CUSTOM".
- end_date: required (datetime)
The second date in a custom range. Required only if selected period is "CUSTOM".
- page: (integer)
Allows to use pagination. Sets the number of usages that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"properties": {
"SERVERS": {
"type": "array",
"description": "Servers resource usages",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Resource ID"
},
"name": {
"type": "string",
"description": "Resource name"
},
"services": {
"type": "array",
"description": "Resource usage",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of resource: IP, size, cpu..."
},
"avg_amount": {
"type": "string",
"description": "Average amount of use by resource"
},
"unit": {
"type": "string",
"description": "Specific unit according with type"
},
"usage": {
"type": "number",
"description": "Total usage of the resource"
},
"detail": {
"type": "array",
"items": {
"type": "object",
"description": "Average amount used by date",
"properties": {
"avg_amount": {
"type": "string",
"description": "Average amount"
},
"unit": {
"type": "string",
"description": "Units"
},
"start_date": {
"type": "string",
"description": "First date in time range"
},
"end_date": {
"type": "string",
"description": "Second date in time range"
},
"usage": {
"type": "number",
"description": "Usage of the resource"
}
}
}
}
}
}
}
}
}
},
"IMAGES": {
"type": "array",
"description": "Images usage",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Resource ID"
},
"name": {
"type": "string",
"description": "Resource name"
},
"services": {
"type": "array",
"description": "Resource usage",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type of resource"
},
"avg_amount": {
"type": "string",
"description": "Average amount of use by resource"
},
"unit": {
"type": "string",
"description": "Specific unit according with type"
},
"usage": {
"type": "number",
"description": "Total usage of the resource"
},
"detail": {
"type": "array",
"items": {
"type": "object",
"description": "Average amount used by date",
"properties": {
"avg_amount": {
"type": "string",
"description": "Average amount"
},
"unit": {
"type": "string",
"description": "Units"
},
"start_date": {
"type": "string",
"description": "First date in time range"
},
"end_date": {
"type": "string",
"description": "Second date in time range"
},
"usage": {
"type": "number",
"description": "Usage of the resource"
}
}
}
}
}
}
}
}
}
}
}
}
Example:
{
"SERVERS": [
{
"id": "ABA6F4C16FE9893B09B354A4CF6321DF",
"name": "My Server remame",
"services": [
{
"type": "CPU",
"avg_amount": "1.00",
"unit": "vCore",
"usage": 49619,
"detail": [
{
"avg_amount": "1.00",
"unit": "vCore",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 49619
}
]
},
{
"type": "HDD",
"avg_amount": "40.00",
"unit": "GB",
"usage": 49619,
"detail": [
{
"avg_amount": "40.00",
"unit": "GB",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 49619
}
]
},
{
"type": "RAM",
"avg_amount": "2.00",
"unit": "GB",
"usage": 49619,
"detail": [
{
"avg_amount": "2.00",
"unit": "GB",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 49619
}
]
},
{
"name": "82.223.25.60",
"type": "IP",
"avg_amount": "1.00",
"unit": "IP",
"usage": 49619,
"detail": [
{
"avg_amount": "1.00",
"unit": "IP",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 49619
}
]
}
]
}
],
"SHARED_STORAGES": [
{
"name": "My Shared Storage 2",
"services": [
{
"type": "size",
"avg_amount": "74.21",
"unit": "GB",
"usage": 8862,
"detail": [
{
"avg_amount": "50.00",
"unit": "GB",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 4571
},
{
"avg_amount": "100.00",
"unit": "GB",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 4291
}
]
}
]
}
],
"IMAGES": [
{
"id": "091057531F9E8662A4B920E3EEF162F8",
"name": "My image",
"services": [
{
"type": "size",
"avg_amount": "40.00",
"unit": "GB",
"usage": 49619,
"detail": [
{
"avg_amount": "40.00",
"unit": "GB",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 49619
}
]
}
]
}
],
"PUBLIC_IPS": [
{
"name": "82.223.25.60",
"services": [
{
"type": "UNUSED_IP",
"avg_amount": "1.00",
"unit": "IP",
"usage": 45899,
"detail": [
{
"avg_amount": "1.00",
"unit": "IP",
"start_date": "2015-03-16T08:36:39+00:00",
"end_date": "2015-03-21T19:59:01+00:00",
"usage": 45899
}
]
}
]
}
]
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Server Appliances
Collection of available methods for server_appliances
Returns a list of all the appliances that you can use for creating a server.
get
/server_appliances
Returns a list of all the appliances that you can use for creating a server.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of server_appliances that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Appliance ID"
},
"name": {
"type": "string",
"description": "Appliance name"
},
"os_family": {
"type": "string",
"description": "Appliance family",
"enum": ["Windows", "Linux", "Other"]
},
"os": {
"type": "string",
"description": "OS distribution"
},
"os_version": {
"type": "string",
"description": "OS version"
},
"os_architecture": {
"type": "integer",
"description": "OS architecture"
},
"os_image_type": {
"type": "string",
"description": "Image installation type",
"enum": ["STANDARD", "MINIMAL", "ISO_OS", "ISO_TOOL", null]
},
"type": {
"type": "string",
"description": "Image type",
"enum": ["IMAGE", "MY_IMAGE", "APPLICATION", "ISO"]
},
"min_hdd_size": {
"type": "integer",
"description": "Minimum required hdd size for this image"
},
"licenses": {
"type": "array",
"description": "Image licenses acquired"
},
"version": {
"type": "string",
"description": "Version of the application"
},
"categories": {
"type": "array",
"description": "Categories to which the application belongs",
"items": {
"type": "string",
"description": "Categories to which the application belongs"
}
}
}
}
}
Example:
[
{
"id": "55726DEDA20C99CF6F2AF8F18CAC9963",
"name": "w2012r2datacenter64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2012R2",
"architecture": 64,
"os_image_type": "ISO_OS",
"type": "ISO",
"min_hdd_size": 40,
"licenses": [],
"automatic_installation": false
},
{
"id": "3CE474D95AF5B0777A3DCE3FE0999F50",
"name": "w2012r2datacenter64min",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2012R2",
"architecture": 64,
"os_image_type": "MINIMAL",
"type": "IMAGE",
"min_hdd_size": 40,
"licenses": [
{
"name": "Windows 2012 Standard"
}
],
"automatic_installation": true
},
{
"id": "FBB637F5B6F24186166F70745E47E8AD",
"name": "w2012r2datacenter64std",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2012R2",
"architecture": 64,
"os_image_type": "STANDARD",
"type": "IMAGE",
"min_hdd_size": 40,
"licenses": [
{
"name": "Windows 2012 Standard"
}
],
"automatic_installation": true
},
{
"id": "A8CB64D8A8AD781D0F60FAA7EE9EC125",
"name": "w2012r2datacenter64std+SQL2012express",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2012R2",
"architecture": 64,
"os_image_type": "STANDARD",
"type": "IMAGE",
"min_hdd_size": 40,
"licenses": [
{
"name": "Windows 2012 Standard"
}
],
"automatic_installation": true
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Information about specific appliance
get
/server_appliances/{id}
Information about specific appliance
URI Parameters
- id: required (string)
Appliance's ID
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Appliance ID"
},
"name": {
"type": "string",
"description": "Appliance name"
},
"os_family": {
"type": "string",
"description": "Appliance family",
"enum": ["Windows", "Linux", "Other"]
},
"os": {
"type": "string",
"description": "OS distribution"
},
"os_version": {
"type": "string",
"description": "OS version"
},
"os_architecture": {
"type": "integer",
"description": "OS architecture"
},
"os_image_type": {
"type": "string",
"description": "Image installation type",
"enum": ["STANDARD", "MINIMAL", "ISO_OS", "ISO_TOOL", null]
},
"type": {
"type": "string",
"description": "Image type",
"enum": ["IMAGE", "MY_IMAGE", "APPLICATION", "ISO"]
},
"min_hdd_size": {
"type": "integer",
"description": "Minimum required hdd size for this image"
},
"licenses": {
"type": "array",
"description": "Image licenses acquired"
},
"version": {
"type": "string",
"description": "Version of the application"
},
"categories": {
"type": "array",
"description": "Categories to which the application belongs",
"items": {
"type": "string",
"description": "Categories to which the application belongs"
}
}
}
}
Example:
{
"id": "81504C620D98BCEBAA5202D145203B4C",
"name": "Windows 2008R2 - 64 bits (Standard) + SQL Server 2012 (Standard)",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_image_type": "STANDARD",
"os_family": "Windows",
"os": "Windows",
"os_version": "Windows 2008R2",
"min_hdd_size": 40,
"architecture": 64,
"licenses":[
"Windows",
"SQL Server"
],
"automatic_installation": true,
"type": "IMAGE"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "APPLIANCES_NOT_FOUND",
"Message": "Required appliance does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
DVD ISO
Collection of available methods for dvd_isos
Returns a list of all the operative systems and tools that you can load into your virtual DVD unit.
get
/dvd_isos
Returns a list of all the operative systems and tools that you can load into your virtual DVD unit.
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of dvd_isos that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"properties": {
"id": {
"type": "string",
"description": "ISO ID"
},
"name": {
"type": "string",
"description": "ISO name"
},
"os_family": {
"type": "string",
"description": "ISO image OS family",
"enum": ["Windows", "Linux", "Other"]
},
"os": {
"type": "string",
"description": "OS distribution"
},
"os_version": {
"type": "string",
"description": "OS version"
},
"os_architecture": {
"type": "integer",
"description": "OS architecture",
"enum": [32, 64]
},
"os_image_type": {
"type": "string",
"description": "Image installation type",
"enum": ["STANDARD", "MINIMAL", "ISO_OS", "ISO_TOOL", null]
},
"type": {
"type": "string",
"description": "Image type",
"enum": ["IMAGE", "MY_IMAGE", "APPLICATION", "ISO"]
}
}
}
}
Example:
[
{
"id": "55726DEDA20C99CF6F2AF8F18CAC9963",
"name": "w2012r2datacenter64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2012R2",
"architecture": 64,
"type": "ISO"
},
{
"id": "B675B070A3BB5C8D71B2129952F04BC8",
"name": "ubuntu1404-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Ubuntu",
"os_version": "Ubuntu14.04",
"architecture": 64,
"type": "ISO"
},
{
"id": "F9DCFAF16B4929D9F9AE6B24B125EC17",
"name": "centos6-32iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos6",
"architecture": 32,
"type": "ISO"
},
{
"id": "3E04654E0DA19EE6A3699272D4114AFA",
"name": "centos6-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos6",
"architecture": 64,
"type": "ISO"
},
{
"id": "8F8CBE2DAB9FF6F0F9A4D846E82DD651",
"name": "rhel6-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "RedHat",
"os_version": "RedHat6",
"architecture": 64,
"type": "ISO"
},
{
"id": "B62716F09C314B46D6782EA385E27206",
"name": "centos7-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Centos",
"os_version": "Centos7",
"architecture": 64,
"type": "ISO"
},
{
"id": "AE54D0EE48B1F6E59021FAA63988274B",
"name": "debian6-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Debian",
"os_version": "Debian6",
"architecture": 64,
"type": "ISO"
},
{
"id": "AA70C76B77BC6132117DCA202D34A5A4",
"name": "debian6-32iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Debian",
"os_version": "Debian6",
"architecture": 32,
"type": "ISO"
},
{
"id": "4001EE28F2E195BD4D2D44844FAC9591",
"name": "debian7-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Debian",
"os_version": "Debian7",
"architecture": 64,
"type": "ISO"
},
{
"id": "B1A2D93BE081873BF127C9B9200849D8",
"name": "debian7-32iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "Debian",
"os_version": "Debian7",
"architecture": 32,
"type": "ISO"
},
{
"id": "DC0886301FA0BFDD8BA21F3E9FDFC012",
"name": "freebsd10-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "FreeBSD",
"os_version": "FreeBSD10",
"architecture": 64,
"type": "ISO"
},
{
"id": "369A148192AAD04C83FEC050F9072C76",
"name": "freebsd10-32iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "FreeBSD",
"os_version": "FreeBSD10",
"architecture": 32,
"type": "ISO"
},
{
"id": "9F3A97E35D7C182EE7B871B7FBFEBBDC",
"name": "rhel7-64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "RedHat",
"os_version": "RedHat7",
"architecture": 64,
"type": "ISO"
},
{
"id": "FEF6DB2420612426911F2F9CA9E25755",
"name": "w2008r2datacenter64iso",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Windows",
"os": "WindowsDatacenter",
"os_version": "Windows2008R2",
"architecture": 64,
"type": "ISO"
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Information about specific ISO image
get
/dvd_isos/{id}
Information about specific ISO image
URI Parameters
- id: required (string)
ISO's ID.
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ISO ID"
},
"name": {
"type": "string",
"description": "ISO name"
},
"os_family": {
"type": "string",
"description": "ISO image OS family",
"enum": ["Windows", "Linux", "Other"]
},
"os": {
"type": "string",
"description": "OS distribution"
},
"os_version": {
"type": "string",
"description": "OS version"
},
"os_architecture": {
"type": "integer",
"description": "OS architecture",
"enum": [32, 64]
},
"os_image_type": {
"type": "string",
"description": "Image installation type",
"enum": ["STANDARD", "MINIMAL", "ISO_OS", "ISO_TOOL", null]
},
"type": {
"type": "string",
"description": "Image type",
"enum": ["IMAGE", "MY_IMAGE", "APPLICATION", "ISO"]
}
}
}
Example:
{
"id": "81504C620D98BCEBAA5202D145203B4B",
"name": "CentOS 7 - 64 bits ",
"available_datacenters": [
"DA41201B4A006EDE6DA62A5A62A658E7",
"47FA5A2D251AE57935E30F9D5AB4F817",
"7C5FA1D21B98DE39D7516333AAB7DA54"
],
"os_family": "Linux",
"os": "CentOS",
"os_version": "CentOS 7",
"architecture": 64,
"type": "ISO"
}
HTTP status code 404
Not Found. This happens when you try to perform some operation to a non-existent element.
Body
Media type: application/json
Type: object
Example:
{
"Type": "ISO_NOT_FOUND",
"Message": "Required dvd ISO image does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Ping
Returns "PONG" if API is running
get
/ping
Returns "PONG" if API is running
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type: object
Example:
[
"PONG"
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Ping Authentification
Returns "PONG" if the API is running and the token is valid
get
/ping_auth
Returns "PONG" if the API is running and the token is valid
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type: object
Example:
[
"PONG"
]
HTTP status code 401
The Token you are using is not valid
Body
Media type: application/json
Type: object
Example:
{
"type": "UNAUTHORIZED",
"message": "The Token you are using is not valid",
"errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Pricing
Returns prices for all available resources in Cloud Panel
get
/pricing
Returns prices for all available resources in Cloud Panel
HTTP status code 200
Ok. Action performed correctly.
Body
Media type: application/json
Type: object
Example:
{
"currency": "EUR",
"vat": 20,
"pricing_plans": {
"server": {
"fixed_servers": [
{
"name": "M",
"price_net": 9.99,
"price_gross": 12.09,
"unit": "server/month",
"hardware": {
"vcore": 1,
"ram": 1,
"hdds": [
{
"size": 40
}
]
}
},
{
"name": "L",
"price_net": 19.99,
"price_gross": 24.19,
"unit": "server/month",
"hardware": {
"vcore": 2,
"ram": 2,
"hdds": [
{
"size": 80
}
]
}
},
{
"name": "XL",
"price_net": 29.99,
"price_gross": 36.29,
"unit": "server/month",
"hardware": {
"vcore": 2,
"ram": 4,
"hdds": [
{
"size": 120
}
]
}
},
{
"name": "XXL",
"price_net": 49.99,
"price_gross": 60.50,
"unit": "server/month",
"hardware": {
"vcore": 4,
"ram": 8,
"hdds": [
{
"size": 160
}
]
}
}
],
"flexible_sever": [
{
"name": "CPU",
"price_net": 7.20,
"price_gross": 8.72,
"unit": "vCore/month"
},
{
"name": "RAM",
"price_net": 7.20,
"price_gross": 8.72,
"unit": "GB/month"
},
{
"name": "SSD",
"price_net": 0.072,
"price_gross": 0.083,
"unit": "GB/month"
}
]
},
"public_ip": [
{
"name": "unused_ip",
"price_net": 5,
"price_gross": 6.05,
"unit": "IP/month"
},
{
"name": "additional_ip",
"price_net": 5,
"price_gross": 6.05,
"unit": "IP/month"
}
],
"image": {
"name": "storage",
"price_net": 0.072,
"price_gross": 0.087,
"unit": "GB/month"
},
"shared_storage": {
"name": "storage",
"price_net": 0.072,
"price_gross": 0.087,
"unit": "GB/month"
},
"software_licenses": [
{
"name": "windows",
"price_net": 10.00,
"price_gross": 12.10,
"unit": "license/month"
},
{
"name": "red_hat_enterprise_linux",
"price_net": 30.00,
"pice_gross": 36.30,
"unit": "license/month"
},
{
"name": "sql_server_web",
"price_net": 40.00,
"price_net": 48.21,
"unit": "license/month"
},
{
"name": "sql_server_standard",
"price_net": 300.00,
"price_gross": 363.00,
"unit": "license/month"
},
{
"name": "cpanel",
"price_net": 15.00,
"price_gross": 18.15,
"unit": "license/month"
},
{
"name": "plesk",
"price_net": 15.00,
"price_gross": 18.15,
"unit": "license/month"
}
],
"backups": {
"name": "storage",
"price_net": 0.20,
"price_gross": 0.24,
"unit": "GB/month"
}
}
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Datacenters
Collection of available methods for datacenters
Returns information about available datacenters to create your resources
get
/datacenters
Returns information about available datacenters to create your resources
Query Parameters
- page: (integer)
Allows to use pagination. Sets the number of datacenters that will be shown in each page.
- per_page: (integer)
Current page to show.
- sort: (string)
Allows to sort the result by priority:
- sort=name retrieves a list of elements ordered by their names.
- sort=-creation_date retrieves a list of elements ordered according to their creation date in descending order of priority.
- q: (string)
Allows to search one string in the response and return the elements that contain it. In order to specify the string use parameter q:
- q=My server
- fields: (string)
Returns only the parameters requested:
- fields=id,name,description,hardware.ram
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Datacenter ID"
},
"location": {
"type": "string",
"description": "Location where the datacenter is placed"
},
"country_code": {
"type": "string",
"description": "Country code from the country where the datacenter is placed"
},
"default": {
"type": "integer",
"description": "Default"
}
}
}
}
Example:
[
{
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US",
"default": 0
},
{
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD37",
"location": "Spain",
"country_code": "SP",
"default": 1
}
]
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string
Entity representing a datacenter
Returns datacenter's information.
get
/datacenters/{datacenter_id}
Returns datacenter's information.
URI Parameters
- datacenter_id: required (string)
Datacenter ID.
HTTP status code 200
Ok
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"items": {
"properties": {
"id": {
"type": "string",
"description": "Datacenter ID"
},
"location": {
"type": "string",
"description": "Location where the datacenter is placed"
},
"country_code": {
"type": "string",
"description": "Country code from the country where the datacenter is placed"
},
"default": {
"type": "integer",
"description": "Default"
}
}
}
}
Example:
{
"id": "D0F6D8C8ED29D3036F94C27BBB7BAD36",
"location": "USA",
"country_code": "US",
"default": 0
}
HTTP status code 404
Body
Media type: application/json
Type: object
Example:
{
"Type": "DATACENTER_NOT_FOUND",
"Message": "Datacenter does not exists",
"Errors": null
}
Secured by x-token
Headers
- X-TOKEN: required (string)
Used for authorization of the request towards the API. This token can be obtained from the CloudPanel in the Management-section below Users. type: string