API / Endpoints

The Zare API exposes all functionality of the manager via a RESTful API


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, "graph_binary" : ""}

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."}

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 following link 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"}

Got any questions? Contact us today.