Sections
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Method: GET
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Provides a detailed, time-stamped list of events for one or more devices on a given date, with optional filtering by shift.
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Base URL
https://dlb.com.pl/api/v1/global_counter_tab.php
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Query parameters
| Key | Type | Description | |
|---|---|---|---|
| user | Required | string | Login |
| token | string | Authentication token (see Authentication) | |
| date | Required | string | Date in YYYY-MM-DD format. Important: it is the date of start of 1st shift. 3rd shift is under the same date! |
| mac | Required | string | MAC address of the device, or a comma-separated list of MAC addresses |
| shift | string | Filter results by shift: 1, 2, 3, or all (default: all) |
|
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Authentication
Providing token is also required, you can do it using one of the following methods:
- Query parameter:
token - Standard Bearer token in the header:
Authorization: Bearer {token} - API key in the header:
HTTP_X_API_KEY: {token}
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Response
Response is a string to be decoded to a JSON object, where keys are MAC addresses of the requested devices and values are arrays of event objects. Each object represents one event recorded on the given date (filtered by shift if specified).
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
| Key | Type | Description |
|---|---|---|
| name | string | Event name |
| duration | number | Event duration in seconds (rounded to 2 decimal places) |
| start | string | Event start timestamp (YYYY-MM-DD HH:MM:SS) |
| end | string | Event end timestamp (YYYY-MM-DD HH:MM:SS) |
| shift | number | Shift number (1, 2, or 3) |
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Example response:
{
"00:00:95:9D:68:16": [
{
"name": "PRACA",
"duration": 3600.00,
"start": "2024-06-01 06:00:00",
"end": "2024-06-01 07:00:00",
"shift": 1
},
{
"name": "POSTOJ",
"duration": 900.00,
"start": "2024-06-01 07:00:00",
"end": "2024-06-01 07:15:00",
"shift": 1
}
]
}
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Warning: Uninitialized string offset 1 in /home/klient.dhosting.pl/dlboffice19/dlb.com.pl/public_html/DOC/index.php on line 251
Error Responses
| HTTP Code | Message | Cause |
|---|---|---|
| 400 | 400 Bad Request: missing parameters |
user, date, or mac query parameter is missing |
| 400 | 400 Bad Request: invalid input data |
date value is not a valid YYYY-MM-DD date |
| 400 | 400 Bad Request: invalid shift parameter |
shift value is not one of all, 1, 2, 3 |
| 400 | 400 Bad Request: missing parameter MAC |
mac value could not be parsed as a valid MAC address |
| 403 | 403 Unauthorized access |
Authentication failed — invalid or missing token |
| 405 | 405 Method Not Allowed |
Request method is not GET |
