Usage API

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

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

Endpoints

Everynet is operating in different regions and private networks. Each region uses its 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

Resource Description
/api/v1.0/usage/totals Aggregated usage report indicating Management API + Data API usage.
/api/v1.0/usage/management Usage report indicating Management API usage only.
/api/v1.0/usage/data Usage report indicating Data API usage only.
/api/v1.0/usage/reports/consumption Billing consumption report with extra organization information.
/api/v1.0/usage/reports/consumption/<device_eui> Billing per device consumption report with extra organization information.

All reports can be produced on an hourly, daily, monthly and quarterly basis. Please refer to the Query Parameters section below.

Query parameters

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

Report formats

The 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.

CSV (default)

./<endpoint>
./<endpoint>.csv

Example of a report

/api/v1.0/usage/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

./<endpoint>
./<endpoint>.tsv

Example of a report

/api/v1.0/usage/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

JSON

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

./<endpoint>
./<endpoint>.json

Example of a 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_end": "2019-01-02 00:00:00",
    "duplicate_uplinks": 3507
  }
]

Reports content

All results contain rows sorted by (time_slot_start, org, org_plan). Organization names are filled using the the 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
Devices enabled minimum devices_enabled_min Integer 330
Devices enabled maximum devices_enabled_max Integer 334
Devices enabled before devices_enabled_before Integer 332
Devices enabled after devices_enabled_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
Devices enabled minimum devices_enabled_min Integer 330
Devices enabled maximum devices_enabled_max Integer 334
Devices enabled before devices_enabled_before Integer 332
Devices enabled after devices_enabled_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

Consumption report

./reports/consumption
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
Infrastructure Partner org_infrastructure_partner String Global Towers
Reseller org_reseller String Europe Telecom
Customer ID org_id String 5a5f5dcf65eb1500057416cf
Customer org_name String Gas Meter Company
Unique uplinks received unique_uplinks_received Integer 1000
Total uplinks received total_uplinks_received Integer 1400
Total uplinks consumed from DataAPI total_uplinks_consumed_dataapi Integer 1900
Total uplinks consumed from HistoryAPI total_uplinks_consumed_historyapi Integer 1900
Total downlinks transmitted total_downlinks_transmitted Integer 50
Total downlinks consumed total_downlinks_consumed Integer 30
Downlinks initiated by application total_downlinks_application Integer 30
Downlinks initiated by device total_downlinks_device Integer 30
Downlinks initiated by network total_downlinks_network Integer 30

Per device consumption report

./reports/consumption/<device_eui>
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
Infrastructure Partner org_infrastructure_partner String Global Towers
Reseller org_reseller String Europe Telecom
Customer ID org_id String 5a5f5dcf65eb1500057416cf
Customer org_name String Gas Meter Company
Device EUI device_eui String 16a8ef2d25d08a5c
Unique uplinks received unique_uplinks_received Integer 1000
Total uplinks received total_uplinks_received Integer 1400
Total uplinks consumed from DataAPI total_uplinks_consumed_dataapi Integer 1900
Total uplinks consumed from HistoryAPI total_uplinks_consumed_historyapi Integer 1900
Total downlinks transmitted total_downlinks_transmitted Integer 50
Total downlinks consumed total_downlinks_consumed Integer 30
Downlinks initiated by application total_downlinks_application Integer 30
Downlinks initiated by device total_downlinks_device Integer 30
Downlinks initiated by network total_downlinks_network Integer 30

Device statistics report

./reports/statistics
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
Infrastructure Partner org_infrastructure_partner String Global Towers
Reseller org_reseller String Europe Telecom
Customer ID org_id String 5a5f5dcf65eb1500057416cf
Customer org_name String Gas Meter Company
Unique active devices unique_active_devices Integer 23
Unique uplink devices unique_uplink_devices Integer 23
Unique downlink devices unique_downlink_devices Integer 5
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
Devices enabled minimum devices_enabled_min Integer 330
Devices enabled maximum devices_enabled_max Integer 334
Devices enabled before devices_enabled_before Integer 332
Devices enabled after devices_enabled_after Integer 332

Examples

To get monthly usage for all organizations for 2 months.

GET https://ns.us.everynet.io/api/v1.0/usage/data.json?access_token=7d913465b31949cab8a271f8e6f49728&from=20190101000000&to=20190104000000&group_time=day
[
  {
    "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 ""