Skip to main content

Introduction

What is WAP API ?

This API is used to manage eenos accounts and reseller. You may use this documentation to integrate eenos hosting control panel into your billing system or other remote management services. 

The eenos API is a Rest framework to manage requests. You can send  the requests using  your favourite programming language or curl command.

Main Components of API URL

The API URL have two parts ,

  1. Data Part
  2. Post URL part

Data Part

Data part contains the data send to the API url . Every data part need to have some parameters that is required to authenticate with the API servers. Those are 

apiuser  - The user name of the API

apiauth - The password of the API user

Every API Request need apiuser and apiauth parameters to perform the operation.

Post URL

This  API URL performs the operation of the API request. Eenos have unique  API url for every operations.  There are two types of API URLs . The default url and version based url.

Exampe , Default URL : https://your-host-name:5555/api/

Example , Version url : https://your-host-name:5555/api/v1/ 

Every API Request needs the API URL to perform the requested task.

Default URL

This API  url uses the default api version provided by the server. At this time, the default  url is version 1.

Version URL

IfThis you likeis to perform operations on  a specific  API version of the eenos control panel . At this time, we have version 1 url,url.

Response &  Output

The  result from the  API requests will be in Json data format  which will have three parts.

  1. data
  2. info
  3. status
data

The data json  dictionary will  contain the data preformed after api operation.

info

This field provides an information about the API.

status

This field provides the operation status code. If the status code is 200, then the operation is success. There are some other codes also that will be provided in the coming api document with every operation.

Example

The following example shows, how to send an API request to Eenos WAP Admin.

We are using the following data,

apiuser=eenos_api

apiauth=eenos123

URL = https://dev.eenos.com:5555/api/load-average/

Sample CURL Command on Default API Url

curl  -X POST -d "apiuser=eenos_api&apiauth=eenos123" https://dev.eenos.com:5555/api/load-average/

Sample  CURl Command on Version API URl , v1

curl  -X POST -d "apiuser=eenos_api&apiauth=eenos123" https://dev.eenos.com:5555/api/v1/load-average/

Output

{"data":{"load_average":"0.55 0.51 0.46"},"info":"Current server load","status":200}

The above API request will  retrieve the srever Load Average .

Authentication Errors

The API requests will show two type of authentication errors.

  1. Authentication credentials were not provided
  2. You do not have permission to perform this action.
Authentication credentials were not provided 

As the message showing, you need to send apiuser and apiauth to perform the operation. 

You do not have permission to perform this action.

You may be used the  wrong  apiuser name and apiauth, or your IP have restrictions for accessing the API using the given  api login credentials.