Service API

Our service API is available to all customers and resellers and allows you to integrate any dashboard function into your own application or site. All output is in json format.

Our guide to all functions can be found on this page however if you require more functionality or information contact us for assistance.

Service URL

The service can be found at https://cloud.easy-wifi.co.uk/API/ all communications must be over SSL and must contain the following custom headers.
  • X-API-Auth
  • X-API-Cust
PHP cURL Example:
// Set Headers
$headers = array(
'X-API-Auth: ' . {key},
'X-API-Cust: ' . {customer id},
);
// Create Request
$curl = 'https://cloud.easy-wifi.co.uk/API/';
$curlreq = curl_init($curl);
curl_setopt($curlreq, CURLOPT_URL, $curl);
curl_setopt($curlreq, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlreq, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curlreq, CURLOPT_SSL_VERIFYHOST, true);
curl_setopt($curlreq, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($curlreq, CURLOPT_HTTPHEADER, $headers);

$output = curl_exec($curlreq);

API Calls
  • insert_chartReports (Enterprise)
    Headline

    Headline usage information for enterprise users, includes single headline figures for unique users, session times and data transfer.

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'Headline',
    'time' => '', // 1|7|31 (int)
    'reseller' => '', // 1|0 (int)
    'pid' => '' // Hotspot Profile ID (int)
    );

    Active1X

    List all enterprise users/devices with open sessions.

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'Active1X'
    );

    Active1XGrp

    List all enterprise users/devices with open sessions for devices in a group.

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'Active1XGrp',
    'id' => '' // Group ID (int)
    );

    User1X

    Get 1x enterprise user information

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'User1X',
    'id' => '' // User ID (int)
    );

    SessionCountEnterprise

    Count enterprise active sessions (for graph)

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'SessionCountEnterprise',
    'time' => '', // 1|7|31 (int)
    'reseller' => '', // Reseller ID (int)
    'pid' => '' // Hotspot Profile ID (int)
    );

    SessionCountHotspot

    Count hotspot active sessions (for graph)

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'SessionCountHotspot'
    );

    User1XFull

    Full 1x enterprise user information including sessions

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'User1XFull',
    'id' => '' // User ID (int)
    );

    SessionAvgReport

    Session average time reports

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'SessionAvgReport'
    );

    TopDNS

    Top 10 dns requests

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'TopDNS',
    'type' => '', // 0|1 reseller/direct (int)
    'pid' => '' // Hotspot Profile ID (int)
    );

    DevHistory

    Device or user session history

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'DevHistory',
    'did' => '' // Device MAC (var(0-9,a-f))
    );

    Healthcheck

    Per device connectivity reports for a given host (RouterOS) identity i.e EASYNAS001

    $postfields = array(
    'method' => 'Report',
    'Sub' => 'Healthcheck',
    'hostid' => '' // (var(0-9_-A-Za-z))
    );

  • person User Management (Enterprise)
    Add

    Add enterprise user

    $postfields = array(
    'method' => 'User',
    'Sub' => 'Add',
    'user' => '', // Username (var)
    'limits' => '', // BW Limits (default:0) (int)
    'firstname' => '', // Firstname (var)
    'lastname' => '', // Lastname (var)
    'email' => '', // User Email (var)
    'send' => '', // Send Password Mail (Legacy) 1|0 (int)
    'mailon' => '', // Send Password Mail 1|0 (int)
    'uvid' => '', // Dynamic VLAN ID (int)
    'password' => '' // Password (optional) (var)
    );

    Remove

    Remove enterprise user

    $postfields = array(
    'method' => 'User',
    'Sub' => 'Remove',
    'userid' => '' // User ID (var)
    );

    Update

    Update enterprise user information

    $postfields = array(
    'method' => 'User',
    'Sub' => 'Update',
    'user' => '', // User ID (var)
    'limits' => '', // Limits (default:0) (int)
    'password' => '', // Password (var)
    'firstname' => '', // Firstname (var)
    'lastname' => '', // Lastname (var)
    'email' => '' // Email (var)
    );

    Info

    Get enterprise user information

    $postfields = array(
    'method' => 'User',
    'Sub' => 'Info',
    'id' => '' // User ID (var)
    );

    Listed

    List all enterprise users

    $postfields = array(
    'method' => 'User',
    'Sub' => 'Listed'
    );

    ClearSession

    Clear enterprise user session by ID (If stale or orphaned)

    $postfields = array(
    'method' => 'User',
    'Sub' => 'ClearSession',
    'sid' => '' // AAA Session ID (var)
    );

    PWLinkResend

    Resend password set/reset link for enterprise user

    $postfields = array(
    'method' => 'User',
    'Sub' => 'PWLinkResend',
    'user' => '' // User ID (var)
    );

  • personCustomer Management (Resellers)
    Add

    Add a new customer to your reseller account

    $postfields = array(
    'method' => 'Customer',
    'Sub' => 'Add',
    'description' => '', // (var)
    'email' => '', // (var)
    'phone' => '', // (int,+)
    'building' => '', // (var)
    'street' => '', // (var)
    'city' => '', // (var)
    'postcode' => '', // (var)
    'realm' => '', // (var)
    'password' => '', // (var)
    'product' => '', // (int)
    'mailon' => '' // Send Welcome Mail 0:off|1:on (int)
    );

    Info

    Get customer account information

    $postfields = array(
    'method' => 'Customer',
    'Sub' => 'Info'
    );

    AddUser

    Add a dashboard user to customer account

    $postfields = array(
    'method' => 'Customer',
    'Sub' => 'AddUser',
    'customer' => '', // Customer ID (int)
    'email' => '', // (var)
    'password' => '', // (var)
    'passwordConfirm' => '', // (var)
    'postlogin' => '', // Post login (0: Ent Dash 1: HS Dash 2: Voucher 3: Hardware 4: Stats (int)
    'EM' => '', // Ent Menu (0:No 1: Yes)
    'EG' => '', // Ent Graphs (0:No 1: Read 2: Write)
    'EU' => '', // Ent Users (0:No 1: Read 2: Write)
    'HM' => '', // HS Menu (0:No 1: Yes)
    'HG' => '', // HS Graphs(0:No 1: Read 2: Write)
    'HU' => '', // HS Users (0:No 1: Read 2: Write)
    'HV' => '', // HS Voucher (0:No 1: Read 2: Write)
    'HP' => '', // HS Profile (0:No 1: Read 2: Write)
    'DM' => '' // Device Manager (0:No 1: Read 2: Write)
    );

    ListUser

    List all dashboard users for customer account

    $postfields = array(
    'method' => 'Customer',
    'Sub' => 'ListUser',
    'id' => '' // Customer ID (int)
    );

    DelUser

    Delete a dashboard user

    $postfields = array(
    'method' => 'Customer',
    'Sub' => 'DelUser',
    'uid' => '' // User ID (int)
    );

  • routerHardware Manager
    Listed

    List all hardware

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'Listed'
    );

    Detail

    Get details for this hardware

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'Detail',
    'gateway' => '' // Device ID (int)
    );

    DNSUpdate

    Update DNS servers

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'DNSUpdate',
    'id' => '', // Device ID (int)
    'servers' => '' // Server IP (comma sep) (var)
    );

    LocationUpdate

    Update device location

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'LocationUpdate',
    'id' => '', // Device ID (int)
    'lat' => '', // Device Lat (var)
    'lng' => '' // Device Lng (var)
    );

    ToolLOG

    Get this devices logs

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'ToolLOG',
    'gateway' => '' // Device ID (int)
    );

    OuttageList

    Get outtage history for this device

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'OuttageList',
    'devid' => '' // Device ID (int)
    );

    HandleList

    Get a list of device friendly names

    $postfields = array(
    'method' => 'Router',
    'Sub' => 'HandleList'
    );

  • personReseller Functions (Resellers)
    Check

    List all customers

    $postfields = array(
    'method' => 'Reseller',
    'Sub' => 'Check'
    );

    Devices

    List all customer hardware

    $postfields = array(
    'method' => 'Reseller',
    'Sub' => 'Devices'
    );

    RemoveDevice

    Remove customer hardware (Requires hardware reset to remove permanently!)

    $postfields = array(
    'method' => 'Reseller',
    'Sub' => 'RemoveDevice',
    'did' => '' // Device ID (int)
    );

  • insert_chartReports (Hotspot)
    GTop10

    Top 10 os/vendor

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GTop10',
    'ts' => '' // Days 1|7|31 (int)
    );

    Maps

    Hadrware list for google maps output

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'Maps',
    'ts' => '' // Days 1|7|31 (int)
    );

    GUnique

    Unique user/device

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GUnique',
    'ts' => '' // Days 1|7|31 (int)
    );

    GDataAvg

    Average data transfered

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GDataAvg',
    'ts' => '' // Days 1|7|31 (int)
    );

    GSessionTime

    Total session time

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GSessionTime',
    'ts' => '' // Days 1|7|31 (int)
    );

    GSessionAvg

    Average session time

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GSessionAvg',
    'ts' => '' // Days 1|7|31 (int)
    );

    GTransaction

    Transaction counts new/returning

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GTransaction',
    'ts' => '' // Days 1|7|31 (int)
    );

    Headline

    Healine data for location/customer

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'Headline',
    'ts' => '' // Days 1|7|31 (int)
    );

    OfflineCount

    Hardware offline count

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'OfflineCount',
    'ts' => '' // Days 1|7|31 (int)
    );

    GGender

    Gender breakdown where captured

    $postfields = array(
    'method' => 'HS_Report',
    'Sub' => 'GGender',
    'ts' => '' // Days 1|7|31 (int)
    );

  • personUser Management (Hotspot)
    Search

    Search for a hotspot user

    $postfields = array(
    'method' => 'HS_User',
    'Sub' => 'Search',
    'username' => '', // Username (var)
    'type' => '' // mac|firstname|lastname|email (int)
    );

    Marketing

    Toggle marketing opt in

    $postfields = array(
    'method' => 'HS_User',
    'Sub' => 'Marketing',
    'userid' => '', // User ID (int)
    );

    Del

    Remove hotspot user

    $postfields = array(
    'method' => 'HS_User',
    'Sub' => 'Del',
    'uid' => '' // User ID (int)
    );

    History

    Get user transaction and session history

    $postfields = array(
    'method' => 'HS_User',
    'Sub' => 'History',
    'uid' => '' // User ID (int)
    );

    ProfileHistory

    Get transaction history for a given hotspot profile

    $postfields = array(
    'method' => 'HS_User',
    'Sub' => 'ProfileHistory',
    'pid' => '' // Hotspot Profile ID (int)
    );

  • labelVoucher System (Hotspot)
    Search

    Search for a voucher code

    $postfields = array(
    'method' => 'HS_Voucher',
    'Sub' => 'Search',
    'code' => '', // Voucher Code (var)
    'status' => '', // Status 0:active|1:used (int)
    'order' => '' // Order 0|1:created 2|3:used (int)
    );

    Add

    Add a batch or voucher

    $postfields = array(
    'method' => 'HS_Voucher',
    'Sub' => 'Add',
    'vcount' => ''. // Number to generate (int)
    'vtime' => '' // Access time - Seconds (int)
    );

    ExportBatch

    Export voucher batch

    $postfields = array(
    'method' => 'HS_Voucher',
    'Sub' => 'ExportBatch',
    'batchid' => '' // Batch ID (int)
    );

  • settings_applicationProfile Manager (Hotspot)
    Listed

    List all profiles

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'Listed'
    );

    Add

    Add a new profile

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'Add',
    'nasid' => '', // ()
    'ssid' => '', // ()
    'header' => '', // ()
    'subt' => '', // ()
    'q1' => '', // ()
    'q2' => '', // ()
    'q3' => '', // ()
    'q4' => '', // ()
    'q5' => '', // ()
    'q6' => '', // ()
    'q7' => '', // ()
    'q8' => '', // ()
    'q9' => '', // ()
    'q10' => '' // ()
    );

    Remove

    Remove a profile

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'Remove',
    'pid' => '' // ()
    );

    Information

    Get all profile information

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'Information',
    'pid' => '' // ()
    );

    UpdatePURL

    Update post-login redirection

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'UpdatePURL',
    'pid' => '', // ()
    'plurl' => '' // ()
    );

    AddProduct

    Add a product

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'AddProduct',
    'pid' => '', // ()
    'ap_type' => '', // ()
    'ap_time' => '', // ()
    'ap_refr' => '', // ()
    'ap_datacap' => '', // ()
    'ap_bandwidth' => '', // ()
    'ap_cost' => '', // ()
    'ap_vat' => '', // ()
    'ap_text' => '', // ()
    'ap_sub' => '' // ()
    );

    RemoveProduct

    Remove a product

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'RemoveProduct',
    'pid' => '', // ()
    'prid' => '' // ()
    );

    MCAdd

    Add/Update MailChimp API details

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'MCAdd',
    'pid' => '', // ()
    'apikey' => '', // ()
    'user' => '', // ()
    'listid' => '' // ()
    );

    MCRemove

    Clear MailChimp API details

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'MCRemove',
    'pid' => '' // ()
    );

    RCAdd

    Add/Update Red Circle Digital API details

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'RCAdd',
    'pid' => '', // ()
    'apikey' => '', // ()
    'user' => '', // ()
    'listid' => '' // ()
    );

    RCRemove

    Remove Red Circle Digital API details

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'RCRemove',
    'pid' => '' // ()
    );

    UpdateDetail

    Update profile details text/nasid

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'UpdateDetail',
    'pid' => '', // ()
    'ptext' => '', // ()
    'stext' => '', // ()
    'nasid' => '', // ()
    'subid' => '' // ()
    );

    UpdateGDPR

    Update data protection information

    $postfields = array(
    'method' => 'HS_Profile',
    'Sub' => 'UpdateGDPR',
    'pid' => '', // ()
    'name' => '', // ()
    'phone' => '', // ()
    'email' => '', // ()
    'statement' => '', // ()
    'state' => '' // ()
    );

  • personCustomer Exports (Legacy)
    Customer

    Export full customer list

    $postfields = array(
    'method' => 'CustomerInfo',
    'Sub' => 'Customer'
    );

    User

    Export all users

    $postfields = array(
    'method' => 'CustomerInfo',
    'Sub' => 'User',
    'Start' => '', // YYYY-MM-DD HH:MM:SS
    'End' => '' // YYYY-MM-DD HH:MM:SS
    );

    NAS_Profile

    Export site hotspot profiles

    $postfields = array(
    'method' => 'CustomerInfo',
    'Sub' => 'NAS_Profile'
    );

    User_Transactions

    Export user transactions

    $postfields = array(
    'method' => 'CustomerInfo',
    'Sub' => 'User_Transactions',
    'Start' => '', // YYYY-MM-DD HH:MM:SS
    'End' => '' // YYYY-MM-DD HH:MM:SS
    );

Contact Us