Sections

Method: GET

Provides the current operational status (PRACA or a stop code) for one or more devices.

Base URL

https://dlb.com.pl/api/v1/global_counter_status.php

Query parameters

Key Type Description
user Required string Login
token string Authentication token (see Authentication)
mac Required string MAC address of the device, or a comma-separated list of MAC addresses

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}

Response

Response is a string to be decoded to a JSON object, where keys are MAC addresses of the requested devices and values are JSON objects with the device status:

Key Type Description
status string PRACA if the device is currently active (sent log within the last ~8 minutes). Otherwise returns a stop code — either P1 or O1.

Example response:

{
    "00:00:95:9D:68:16": {"status": "PRACA"},
    "00:00:95:9D:68:FF": {"status": "P1"}
}

Error Responses

HTTP Code Message Cause
400 400 Bad Request: missing parameters user or mac query parameter is missing
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