Single Server
POST https://manager.zare.com/api/v1/dedicated
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
All Servers
POST https://manager.zare.com/api/v1/dedicated
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
Power Cycle Server
POST https://manager.zare.com/api/v1/dedicated/powercycle
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
Power On Server
POST https://manager.zare.com/api/v1/dedicated/poweron
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
Power Off Server
POST https://manager.zare.com/api/v1/dedicated/poweroff
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
Server Graphs
POST https://manager.zare.com/api/v1/dedicated/graphs
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
type |
Type of data to display. Valid values are port_bits, port_percent, port_errors, port_upkts. |
scale |
The amount of data to display. Valid values are day, week, month. |
Response
{"success" : true, "base64" : ""}
Firewall History
POST https://manager.zare.com/api/v1/dedicated/firewall
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
ip |
Optional - if you want results from a specific IP assigned to your server, otherwise it will display data from all IPs. |
scale |
The amount of data to display. Valid values are hour, day, week. |
Response
{"success" : true, "firewall" : ""}
Firewall Sensitivity
POST https://manager.zare.com/api/v1/dedicated/firewall/sensitivity
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
ip |
An IP that is assigned to the above server ID. |
sensitivity |
The firewall sensitivity you wish to set. Valid values are low, medium, normal and high. (What does the DDoS protection sensitivity do?) |
Response
{"success" : true, "message" : "Your IP was successfully updated."}
Firewall State
POST https://manager.zare.com/api/v1/dedicated/firewall/state
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
ip |
An IP that is assigned to the above server ID. |
state |
The firewall state you wish to set. Valid values are 1 and 0. (1 will change the state to Always On and 0 will change the state to Redirect On Attack.) Please see following guide for more information on firewall states - DDoS Redirect Options |
Limits
Firewall states can only be updated once every 2 minutes. This allows BGP injections ample time to clear in the event you add/withdraw firewall states in quick succession, you will get the below error if you change states too quickly or there is another unspecified error.
{"error":true,"message":"An unexpected error occured or you have already updated your IP firewall state in the last 2 minutes."}
Response
{"success" : true, "message" : "Your IP firewall state has been updated."}
Console
POST https://manager.zare.com/api/v1/dedicated/console
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
Response Information
The API call will respond with an XML body that you need to force download in an jnlp file. Below is an example PHP code that would do this
header("Content-Description: File Transfer");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename='console-(random-number).jnlp'");
print_r($xml_response);
exit;
Provision
POST https://manager.zare.com/api/v1/dedicated/provision
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
server_id |
This is your servers unique ID, you can find this by listing all dedicated servers over the API or via the URL bar in the Zare manager. |
osid |
This specifies the operating system that you would like to be installed during the provisioning process. Please see the Provisioning OS ID's endpoint for the list of supported operating systems and their correlating osid's. |
post_installation (optional) |
If you wish for the provisioning process to inject a BASH script to be executed post install, then you can send one via the post_installation parameter. Please note that is must be fully validated BASH without syntax errors or it will not execute correctly. |
Response Information
{"error":false,"root_password":"example_password"}
Provisioning OS ID's
POST https://manager.zare.com/api/v1/dedicated/provision/os_ids
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
The parameter "id" in the response relates to the "osid" for the provisioning endpoint.
Response (Partial)
[{
"id": "1",
"name": "CentOS 6.X (64 Bit)",
"arch": "amd64",
"type": "unix",
"price_per_core": "0"
}, {
"id": "2",
"name": "CentOS 7 (latest)",
"arch": "amd64",
"type": "unix",
"price_per_core": "0"
},
Firewall History (Colocation)
POST https://manager.zare.com/api/v1/colocation/firewall
Parameter |
Description |
HTTP_AUTHORIZATION (header) |
Your secret key from the API section of the manager. This must be sent as a header. |
colocation_id |
This is your servers unique ID, you can find this by listing all colocation services over the API or via the URL bar in the Zare manager. |
ip |
Optional - if you want results from a specific IP assigned to your colocation, otherwise it will display data from all IPs. |
scale |
The amount of data to display. Valid values are hour, day, week. |
Response
{"success" : true, "firewall" : ""}