Skip to main content

Introduction

What is WAP API?

The WAP API is a REST-based interface used to manage Eenos accounts, resellers, and system operations. It allows seamless integration of the Eenos hosting control panel with billing systems, automation tools, or any remote management service.

You can interact with the API using any programming language or standard tools such as curl.

API Architecture Overview

A WAP API request is composed of three main parts:

  • Authentication Headers
  • Request Payload (Data)
  • API Endpoint URL

1. Authentication Headers

Every request must include the following headers:

  • X-API-USER  : The API username used for authentication.
  • X-API-PASSWORD : The API password associated with the API user.

These credentials are required for all API operations.

Every API Request needs X-API-USER and X-API-PASSWORD

2. Request Data

This data is used by the API to process the request and execute the desired action.

3. API URL Structure

Each API operation is exposed through a dedicated endpoint.

Base Formats

There are two supported API URL formats:

  • Default API URL:  https://your-host-name:5555/api/
  • Versioned API URL (recommended): https://your-host-name:5555/api/v1/

The versioned format ensures backward compatibility and stability across releases.

Default vs Versioned API

Default API URL
  • Uses the server’s default API version (currently v1).
  • May change in future releases without notice.
Versioned API URL
  • Explicitly targets a specific API version (e.g., v1).
  • Recommended for production integrations to ensure stability.

 

Response &  Output

All API responses are returned in JSON format with the following structure:

data

Contains the result of the API operation.

info

Provides a human-readable description of the response.

status

HTTP-like status code indicating the result of the operation.

  • 200 indicates success
  • Other codes indicate errors or specific conditions (documented per API)

Example

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

We are using the following data,

Credentials Used

  • X-API-USER: eenos_api
  • X-API-PASSWORD: eenos123

Endpoint Example

  • URL: https://your-host-name::5555/api/load-average/
Sample CURL Command on Default API Url
curl -X POST \
  -H "X-API-USER: eenos_api" \
  -H "X-API-PASSWORD: eenos123" \
  https://your-host-name:5555/api/load-average/
Sample CURL Command on Version API URl, v1
curl -X POST \
  -H "X-API-USER: eenos_api" \
  -H "X-API-PASSWORD: eenos123" \
  https://your-host-name:5555/api/v1/load-average/
Output
{
  "data": {
    "load_average": "0.55 0.51 0.46"
  },
  "info": "Current server load",
  "status": 200
}

This request retrieves the server’s current load average.

Authentication Errors

The API may return the following authentication-related errors:

1. Authentication credentials were not provided

This error occurs when the required authentication headers are missing.

Solution:

Ensure that both X-API-USER and X-API-PASSWORD headers are included in the request.

2. You do not have permission to perform this action

This error may occur due to:

  • Incorrect API username or password
  • IP address restrictions on the API account
  • Disabled or unauthorized API user

Solution:

Verify credentials and confirm that the requesting IP is allowed for API access.

Demo servers don't have API access.