Sections
Method: GET
Provides list of current values of Custom Counters for the indicated logger.
Base URL
https://dlb.com.pl/api/v1/custom_counter/counters_list.php
Query parameters
| Key | Type | Description | |
|---|---|---|---|
| user | Required | string | Login |
| mac | Required | string | MAC address of the selected logger. |
| token | string | (see Authentication) | |
Authentication
Providing token is also required, you can do it using one of the following methods:
- Query parameter
- Standard Bearer token in the header:
Authorization: Bearer {token} - API key in the header:
HTTP_X_API_KEY: {token}
Response
Response is a string to be decoded to JSON object, where keys are counter IDs, and values are current values of counter and flag if is activated.
Example response:
{
"L1":{"active":"on","actual":"1009"},
"L2":{"active":"on","actual":"201"},
"L3":{"active":"on","actual":"500"},
"L4":{"active":false,"actual":0},
"L5":{"active":"off","actual":0},
"L6":{"active":false,"actual":0},
"L7":{"active":false,"actual":0},
"L8":{"active":false,"actual":0},
"L9":{"active":false,"actual":0},
"L10":{"active":false,"actual":0}
}
If a logger has never sent any data, its counter will be off and actual value will be 0.