Introduction
What is WAP API ?API?
This API is used to manage eenos accounts and reseller.resellers. You may use this documentation to integrate eenosthe 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 favouritefavorite programming language or curl command.
Main Components of API URL
The API URL havehas two parts ,parts,
- Data Part
- Post URL part
Data Part
DataThe data part contains the data sendsent to the API url .URL. Every data part needneeds to have some parameters that isare 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 needneeds apiuser and apiauth parameters to perform the operation.operate.
Post URL
This API URL performs the operation ofoperates the API request. Eenos havehas a unique API url for every operations.operation. There are two types of API URLs .URLs. The default url and version version-based url.
Exampe ,Example, Default URL :URL: https://your-host-name:5555/api/
Example ,Example, Version url :url: https://your-host-name:5555/api/v1/
Every API Request needs the API URL to perform the requested task.
Default URL
This API urlURL uses the default api version provided by the server. At this time, the default url is version 1.
Version URL
This is to perform operations on a specific API version of the eenos control panel .panel. At this time, we have version 1 url.
Response & Output
The result from the API requests will be in Json data format which will have three parts.
- data
- info
- status
data
The data json dictionary will contain the data preformedperformed 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 a success. There are someSome 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 ,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 sreverserver Load Average .Average.
Authentication Errors
The API requests will show two typetypes of authentication errors.
- Authentication credentials were not provided
- You do not have permission to perform this action.
Authentication credentials were not provided
As the message showing,shows, you need to send apiuser and apiauth to perform the operation.operate.
You do not have permission to perform this action.
You may be useduse the wrong apiuser name and apiauth, or your IP havehas restrictions for accessing the API using the given api login credentials.