API Documentation

The Zare API exposes all functionality of the manager via a RESTful API, allowing you to easily and programatically interact with our system to automate actions.

Authentication


To make use of the Zare API you will first need to generate yourself an secret key in your Zare manager, this key needs to be provided in all API calls.

All API requests are accessed through https://manager.zare.com and must be sent over HTTPs for added security. All requests made to the API must have the Authorization header present and and a valid secret key set as the value.

Example Request

POST https://manager.zare.com/api/v1/dedicated
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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.

Get All Servers


POST https://manager.zare.com/api/v1/dedicated
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.

Get Server Data


POST https://manager.zare.com/api/v1/dedicated
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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 Cycle Server


POST https://manager.zare.com/api/v1/dedicated/powercycle
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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.

Get Server Graphs


POST https://manager.zare.com/api/v1/dedicated/graphs
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
(Body)
Type of data to display. Valid values are port_bits, port_percent, port_errors, port_upkts.
scale
(Body)
The amount of data to display. Valid values are day, week, month.

Get KVM/IPMI Console


POST https://manager.zare.com/api/v1/dedicated/console
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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.

Get Available Operating Systems


POST https://manager.zare.com/api/v1/dedicated/provision/os_ids
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
The parameter "id" in the response relates to the "osid" for the provisioning endpoint.

Provision Operating System


POST https://manager.zare.com/api/v1/dedicated/provision
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
(Body)
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)
(Body)
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.

rDNS


POST https://manager.zare.com/api/v1/dedicated/dns
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
(Body)
An IP that is assigned to the above server ID.
type
(Body)
ptr = this is for rDNS.
content
(Body)
A fully validated hostname, for example: reverse-dns.yourdomain.com

Bare Metal - Get Firewall History


POST https://manager.zare.com/api/v1/dedicated/firewall
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
(Body)
Optional - if you want results from a specific IP assigned to your server, otherwise it will display data from all IPs.
scale
(Body)
The amount of data to display. Valid values are hour, day, week.

Bare Metal - Set Firewall Sensitivity


POST https://manager.zare.com/api/v1/dedicated/firewall/sensitivity
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
(Body)
An IP that is assigned to the above server ID.
sensitivity
(Body)
The firewall sensitivity you wish to set. Valid values are low, medium, normal and high. (What does the DDoS protection sensitivity do?)

Bare Metal - Set Firewall State


POST https://manager.zare.com/api/v1/dedicated/firewall/state
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
server_id
(Body)
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
(Body)
An IP that is assigned to the above server ID.
state
(Body)
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

Colocation - Firewall History


POST https://manager.zare.com/api/v1/colocation/firewall
Parameter Description
Authorization
(Header)
Your secret key from the API section of the manager. This must be sent as a header which is called Authorization.
colocation_id
(Body)
This is your colocations unique ID, you can find this by listing all colocation services over the API or via the URL bar in the Zare manager.
ip
(Body)
Optional - if you want results from a specific IP assigned to your colocation, otherwise it will display data from all IPs.
scale
(Body)
The amount of data to display. Valid values are hour, day, week.

Transit - Firewall History


POST https://manager.zare.com/api/v1/transit/firewall
Parameter Description
HTTP_AUTHORIZATION (header) Your secret key from the API section of the manager. This must be sent as a header.
transit_id
(Body)
This is your transits unique ID, you can find this by listing all transit services over the API or via the URL bar in the Zare manager.
ip
(Body)
Optional - if you want results from a specific IP assigned to your colocation, otherwise it will display data from all IPs.
scale
(Body)
The amount of data to display. Valid values are hour, day, week.

Baremetal - Cancellation


POST https://manager.zare.com/api/v1/reseller/billing/cancellation
Parameter Description
HTTP_AUTHORIZATION (header) Your secret key from the API section of the manager. This must be sent as a header.
server_id
(Body)
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
(Body)
immediate (schedules the server for immediate cancellation),
end (schedules the server for end of billing cycle cancellation)
delete (removes the cancellation request if one has been requested)

Baremetal - Locations


POST https://manager.zare.com/api/v1/reseller/locations
Parameter Description
HTTP_AUTHORIZATION (header) Your secret key from the API section of the manager. This must be sent as a header.

Want more information, or to make sure we're the right fit for you?

Get in touch