Customer API — DATPOL Control

Read your measurements and history in your own system. Request a read-only key from DATPOL, specifying your account and devices. Access is limited by both the key and your current account permissions.

Access and limits

Every key has an expiry date (up to 365 days), an explicit device list and can be revoked immediately. DATPOL issues keys; no shared MQTT or Home Assistant credentials are disclosed.

GET only. No switching, configuration or business calculations are available through this API. Home Assistant remains the core.

60 requests per minute per key. HTTP 429 includes Retry-After; wait before retrying. History is limited to 31 calendar days per request and 1,000 rows per page. Follow next_offset until null. Dates use Europe/Warsaw; observed_at includes the stored time-zone offset. History is newest first; avoid paging a changing time range when importing archives.

Values are JSON numbers, with unit, quality and measurement time. latest means the last available sample, not necessarily a fresh or valid reading. Check status, source_status, quality and observed_at. Unused inputs return latest: null. API access does not turn disconnected sensors into live measurements.

401: missing, expired or revoked key. 404: unavailable resource or no access (including disabled devices). 405: unsupported method. 422: invalid parameters. 429: rate limit. 503: temporary service failure.

Store keys on your server, not in browser JavaScript, mobile application bundles or URLs. Use HTTPS. On suspected disclosure, request revocation and a replacement key. For rotation, test a new key before revoking the old one.

curl

# Set CONTROL_API_KEY securely in your server environment. Never put it in a URL or browser code.
curl --fail-with-body -H "Authorization: Bearer $CONTROL_API_KEY" \
  'https://control.datpol.com/api/v1/?resource=devices'

# Replace 123 and 456 with IDs returned by the API.
curl --fail-with-body -H "Authorization: Bearer $CONTROL_API_KEY" \
  'https://control.datpol.com/api/v1/?resource=points&device_id=123'

curl --fail-with-body -H "Authorization: Bearer $CONTROL_API_KEY" \
  'https://control.datpol.com/api/v1/?resource=history&point_id=456&from=2026-10-01&to=2026-10-20&limit=500&offset=0' 

Python

import os
import requests
response = requests.get(
    "https://control.datpol.com/api/v1/",
    params={"resource": "devices"},
    headers={"Authorization": "Bearer " + os.environ["CONTROL_API_KEY"],
             "User-Agent": "Customer-Control-Integration/1.0"},
    timeout=20,
)
response.raise_for_status()
print(response.json())

Install the requests package. Examples contain placeholder IDs, not customer data.

Request an API key: [email protected]