Usage API

Usage API is designed to provide service usage information that could be used by the reporting and billing systems. Usage reports provided by Usage API contains different infromation regarding amount of uplink and downlink messages consumed, amount of API calls produced, etc...

All information is grouped and aggregated using time slots and name of the organisation.

Endpoints

Everynet is opearting different regions and private networks. Each region use it's own endpoint URL. Custom regions and private networks could get endpoint URLs from Everynet support.

For example US and EU region endpoints are:

https://ns.eu.everynet.io/api/v1.0/usage - European region 
https://ns.us.everynet.io/api/v1.0/usage - United States region

Resources

/api/v1.0/usage/totals - aggegated usage report for the specific organisation or list of organisations /api/v1.0/usage/management - usage report indicating Management API usage only /api/v1.0/usage/data - usage report indicating Data API usage only

All reports could be produced using hourly, daily, monthly and quaterly basis. Please refer to the Query Parameters section below.

Query parameters

Name Format Description
access_token access_token The API key. Admin rights required. Required.
from yyyymmddHHMMSS Time to prepare report from. Including the edge. Required.
to yyyymmddHHMMSS Time to prepare report to. NOT including the edge. Required.
group_time quarter | month | day | hour Time interval grouping. Optional. Default to 'day'.
round_time true | false Truncate from/to times to group_time slot. Optional. Default is true.
with_defaults true | false Fill time slots with 0 if no usage recorded. Optional. Default is true.
orgs * | org_id[,org_id] Admin only. List of organization IDs or * to get data from all. Default to requester's organizaion.

Report formats

Usage API allows you to generate reports in different data formats: JSON, CSV, TSV. Please use CSV in case you want to use Excel or similar tool for the further analysis.

JSON

In order to get report in JSON format use the following endpoints:

/api/v1.0/usage/totals.json
/api/v1.0/usage/management.json
/api/v1.0/usage/data.json

Example of report

/api/v1.0/usage/data.json
[
  {
    "org_name": "Everynet",
    "total_uplinks": 8156,
    "time_slot_start": "2019-01-01 00:00:00",
    "unique_downlink_devices": 3,
    "org_plan": "prepaid",
    "unique_active_devices": 3,
    "org_id": "5a5f5dcf65eb1500057416cf",
    "unique_uplink_devices": 3,
    "total_downlinks": 73,
    "unique_uplinks": 4649,
    "time_slot_start": "2019-01-02 00:00:00",
    "duplicate_uplinks": 3507
  }
]

CSV (default)

./totals
./totals.csv
./management
./management.csv
./data
./data.csv

Example of report

./data.csv
Time slot starts,Time slot ends,Organization ID,Organization Name,Organization Plan,Unique active devices,Unique uplink devices,Unique downlink devices,Unique uplinks,Duplicate uplinks,Total uplinks,Total downlinks
2019-01-01 00:00:00,2019-01-02 00:00:00,5a5f5dcf65eb1500057416cf,Everynet,prepaid,3,3,3,4649,3507,8156,73

TSV

./totals.tsv
./management.tsv
./data.tsv

Example of report

./data.tsv
Time slot starts    Time slot ends    Organization ID    Organization Name    Organization Plan    Unique active devices    Unique uplink devices    Unique downlink devices    Unique uplinks    Duplicate uplinks    Total uplinks    Total downlinks
2019-01-01 00:00:00    2019-01-02 00:00:00    5a5f5dcf65eb1500057416cf    Everynet    prepaid    3    3    3    4649    3507    8156    73

Reports content

All results contains rows sorted by (time_slot_start, org, org_plan). Organization names are filled using latest values.

Data usage

./data.*
Column name Column id Format Example
Time slot starts time_slot_start String 2019-01-01 00:00:00
Time slot ends time_slot_end String 2019-01-02 00:00:00
Organization ID org_id String 5a5f5dcf65eb1500057416cf
Organization Name org_name String Everynet
Organization Plan org_plan String prepaid
Unique active devices unique_active_devices Integer 23
Unique uplink devices unique_uplink_devices Integer 23
Unique downlink devices unique_downlink_devices Integer 5
Unique uplinks unique_uplinks Integer 1000
Duplicate uplinks duplicate_uplinks Integer 400
Total uplinks total_uplinks Integer 1400
Total downlinks total_downlinks Integer 50

Management usage

./management.*
Column name Column id Format Example
Time slot starts time_slot_start String 2019-01-01 00:00:00
Time slot ends time_slot_end String 2019-01-02 00:00:00
Organization ID org_id String 5a5f5dcf65eb1500057416cf
Organization Name org_name String Everynet
Organization Plan org_plan String prepaid
Devices created devices_created Integer 4
Devices updated devices_updated Integer 13
Devices deleted devices_deleted Integer 2
Devices total minimum devices_total_min Integer 330
Devices total maximum devices_total_max Integer 334
Devices total before devices_total_before Integer 332
Devices total after devices_total_after Integer 332
Filters created filters_created Integer 1
Filters updated filters_updated Integer 2
Filters deleted filters_deleted Integer 0
Filters total minimum filters_total_min Integer 3
Filters total maximum filters_total_max Integer 4
Filters total before filters_total_before Integer 3
Filters total after filters_total_after Integer 4
Keys created keys_created Integer 0
Keys updated keys_updated Integer 0
Keys deleted keys_deleted Integer 0
Keys total minimum keys_total_min Integer 3
Keys total maximum keys_total_max Integer 3
Keys total before keys_total_before Integer 3
Keys total after keys_total_after Integer 3
Users created users_created Integer 1
Users updated users_updated Integer 0
Users deleted users_deleted Integer 0
Users total minimum users_total_min Integer 2
Users total maximum users_total_max Integer 3
Users total before users_total_before Integer 2
Users total after users_total_after Integer 3

Total usage

Basically it is data + management usage at the same time

./totals.*
Column name Column id Format Example
Time slot starts time_slot_start String 2019-01-01 00:00:00
Time slot ends time_slot_end String 2019-01-02 00:00:00
Organization ID org_id String 5a5f5dcf65eb1500057416cf
Organization Name org_name String Everynet
Organization Plan org_plan String prepaid
Unique active devices unique_active_devices Integer 23
Unique uplink devices unique_uplink_devices Integer 23
Unique downlink devices unique_downlink_devices Integer 5
Unique uplinks unique_uplinks Integer 1000
Duplicate uplinks duplicate_uplinks Integer 400
Total uplinks total_uplinks Integer 1400
Total downlinks total_downlinks Integer 50
Devices created devices_created Integer 4
Devices updated devices_updated Integer 13
Devices deleted devices_deleted Integer 2
Devices total minimum devices_total_min Integer 330
Devices total maximum devices_total_max Integer 334
Devices total before devices_total_before Integer 332
Devices total after devices_total_after Integer 332
Filters created filters_created Integer 1
Filters updated filters_updated Integer 2
Filters deleted filters_deleted Integer 0
Filters total minimum filters_total_min Integer 3
Filters total maximum filters_total_max Integer 4
Filters total before filters_total_before Integer 3
Filters total after filters_total_after Integer 4
Keys created keys_created Integer 0
Keys updated keys_updated Integer 0
Keys deleted keys_deleted Integer 0
Keys total minimum keys_total_min Integer 3
Keys total maximum keys_total_max Integer 3
Keys total before keys_total_before Integer 3
Keys total after keys_total_after Integer 3
Users created users_created Integer 1
Users updated users_updated Integer 0
Users deleted users_deleted Integer 0
Users total minimum users_total_min Integer 2
Users total maximum users_total_max Integer 3
Users total before users_total_before Integer 2
Users total after users_total_after Integer 3

Examples

To get monthly usage for all organizations for 2 month.

```http request GET https://ns.us.everynet.io/api/v1.0/usage/data.json?access_token=7d913465b31949cab8a271f8e6f49728&from=20190101000000&to=20190104000000&group_time=day


```json
[
  {
    "org_name": "Everynet",
    "total_uplinks": 0,
    "time_slot_start": "2019-01-01 00:00:00",
    "unique_downlink_devices": 0,
    "org_plan": "prepaid",
    "unique_active_devices": 0,
    "org_id": "59d4d7faaabb6e00055df373",
    "unique_uplink_devices": 0,
    "total_downlinks": 0,
    "unique_uplinks": 0,
    "time_slot_end": "2019-01-02 00:00:00",
    "duplicate_uplinks": 0
  },
  {
    "org_name": "Everynet",
    "total_uplinks": 0,
    "time_slot_start": "2019-01-02 00:00:00",
    "unique_downlink_devices": 0,
    "org_plan": "prepaid",
    "unique_active_devices": 0,
    "org_id": "59d4d7faaabb6e00055df373",
    "unique_uplink_devices": 0,
    "total_downlinks": 0,
    "unique_uplinks": 0,
    "time_slot_end": "2019-01-03 00:00:00",
    "duplicate_uplinks": 0
  },
  {
    "org_name": "Everynet",
    "total_uplinks": 0,
    "time_slot_start": "2019-01-03 00:00:00",
    "unique_downlink_devices": 0,
    "org_plan": "prepaid",
    "unique_active_devices": 0,
    "org_id": "59d4d7faaabb6e00055df373",
    "unique_uplink_devices": 0,
    "total_downlinks": 0,
    "unique_uplinks": 0,
    "time_slot_end": "2019-01-04 00:00:00",
    "duplicate_uplinks": 0
  }
]

results matching ""

    No results matching ""