Obsah dokumentace

Reference API

Plochy a přehrávače

Plochy účtu s připojením přehrávače a posledním přehráním, stav plochy, přehrávače a jejich telemetrie (monitoring), příkazy přehrávačům (oprávnění devices) a struktura sítě s místy a patry (DOOHUB Network).

Každý endpoint přijímá i hlavičku DOOHUB-Account (agentury: id klientského účtu).

get/screens

The account's screens

With the network node, the player's connection (online, hidden – page not visible, offline – no heartbeat for 5 minutes, unpaired) and the last play within 30 days.

Jakýkoli klíč

Parametry

NázevTypPopis
statusv dotazudraft | pending_review | active | paused | rejected
environmentv dotazuoutdoor | indoor | window
tagv dotazustringScreens with this tag.
nodev dotazustring (uuid)Screens in this region or location and everything under it (GET /networks).
limitv dotazuinteger
offsetv dotazuinteger

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/screens" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": [
    {
      "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "name": "string",
      "status": "string",
      "environment": "outdoor",
      "venue_type": "string",
      "address": "string",
      "city": "string",
      "location": {
        "lat": 0,
        "lng": 0
      },
      "timezone": "string",
      "resolution": {
        "width": 0,
        "height": 0
      },
      "orientation": "string",
      "max_spot_seconds": 0,
      "audience_per_day": 0,
      "price": {
        "currency": "string",
        "cpm_minor": 0,
        "slot_day_minor": 0
      },
      "tags": [
        "string"
      ],
      "created_at": "2026-11-02T09:30:00Z",
      "node_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "connection": "online",
      "last_seen_at": "2026-11-02T09:30:00Z",
      "last_play": {
        "at": "2026-11-02T09:30:00Z",
        "campaign_id": "string",
        "content_id": "string",
        "title": "string"
      }
    }
  ],
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0
  }
}
get/screens/{id}

One screen

Jakýkoli klíč

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 404Not found in this account.
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/screens/{id}" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "name": "string",
    "status": "string",
    "environment": "outdoor",
    "venue_type": "string",
    "address": "string",
    "city": "string",
    "location": {
      "lat": 0,
      "lng": 0
    },
    "timezone": "string",
    "resolution": {
      "width": 0,
      "height": 0
    },
    "orientation": "string",
    "max_spot_seconds": 0,
    "audience_per_day": 0,
    "price": {
      "currency": "string",
      "cpm_minor": 0,
      "slot_day_minor": 0
    },
    "tags": [
      "string"
    ],
    "created_at": "2026-11-02T09:30:00Z",
    "node_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "connection": "online",
    "last_seen_at": "2026-11-02T09:30:00Z",
    "last_play": {
      "at": "2026-11-02T09:30:00Z",
      "campaign_id": "string",
      "content_id": "string",
      "title": "string"
    }
  }
}
get/screens/{id}/status

Live state of a screen

Connection, the player (version, display, media cache, clock offset, signing), the last play and – with DOOHUB Network monitoring – what is on screen, open alerts and availability over the last 7 days.

Jakýkoli klíč

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 404Not found in this account.
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/screens/{id}/status" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "status": "string",
    "connection": "online",
    "last_seen_at": "2026-11-02T09:30:00Z",
    "visible": false,
    "player": {
      "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "paired_at": "2026-11-02T09:30:00Z",
      "connection": "online",
      "last_seen_at": "2026-11-02T09:30:00Z",
      "visible": false,
      "visibility_changed_at": "2026-11-02T09:30:00Z",
      "display": {
        "width": 0,
        "height": 0
      },
      "user_agent": "string",
      "clock_offset_seconds": 0,
      "media": {
        "cached": 0,
        "total": 0,
        "checked_at": "2026-11-02T09:30:00Z"
      },
      "signing": "signed",
      "token_rotated_at": "2026-11-02T09:30:00Z",
      "disconnected": {
        "at": "2026-11-02T09:30:00Z",
        "reason": "string"
      },
      "revoked_at": "2026-11-02T09:30:00Z",
      "telemetry_at": "2026-11-02T09:30:00Z"
    },
    "last_play": {
      "at": "2026-11-02T09:30:00Z",
      "campaign_id": "string",
      "content_id": "string",
      "title": "string"
    },
    "showing": {},
    "monitoring": false,
    "open_alerts": [
      {
        "id": "string",
        "kind": "offline",
        "opened_at": "2026-11-02T09:30:00Z",
        "details": {}
      }
    ],
    "availability_7d": {
      "from": "2026-11-02T09:30:00Z",
      "to": "2026-11-02T09:30:00Z",
      "on_air_slots": 0,
      "up_slots": 0,
      "percent": 0
    }
  }
}
post/screens/{id}/commands

Send a command to the screen's player

Key with the devices scope (agencies: the client's screen manager or technician role). reload – reload the player page, resync – download all media again (both DOOHUB Network maintenance), report – send telemetry now (monitoring), rotate_token / rotate_key – new player token (and signing key). The player takes the command with its own token, so delivery is sent (signalled now) or queued (at its next check-in). Written to the screen's service log.

Klíč s oprávněním příkazy přehrávačům

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Tělo požadavku

PoleTypPopis
commandpovinnýreload | resync | report | rotate_token | rotate_key

Chyby

  • 401Missing, invalid or revoked API key.
  • 403No devices scope (devices_required), the client's role doesn't allow it (client_role) or the command needs DOOHUB Network (module_required).
  • 404Not found in this account.
  • 409No paired player on the screen (no_device).
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl -X POST "https://admin.doohub.online/api/v1/screens/{id}/commands" \
  -H "Authorization: Bearer dh_…" \
  -H "Content-Type: application/json" \
  -d '{"command":"reload"}'
Příklad těla
{
  "command": "reload"
}
Odpověď 202
{
  "data": {
    "screen_id": "string",
    "command": "string",
    "delivery": "sent"
  }
}
get/devices

Players of the account's screens

Paired players with their connection, media cache, clock and signing. Revoked players only with include_revoked=true. Tokens and pairing codes are never returned.

Jakýkoli klíč

Parametry

NázevTypPopis
screen_idv dotazustring (uuid)
connectionv dotazuonline | hidden | offline | unpaired
include_revokedv dotazuboolean
limitv dotazuinteger
offsetv dotazuinteger

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/devices" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": [
    {
      "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "paired_at": "2026-11-02T09:30:00Z",
      "connection": "online",
      "last_seen_at": "2026-11-02T09:30:00Z",
      "visible": false,
      "visibility_changed_at": "2026-11-02T09:30:00Z",
      "display": {
        "width": 0,
        "height": 0
      },
      "user_agent": "string",
      "clock_offset_seconds": 0,
      "media": {
        "cached": 0,
        "total": 0,
        "checked_at": "2026-11-02T09:30:00Z"
      },
      "signing": "signed",
      "token_rotated_at": "2026-11-02T09:30:00Z",
      "disconnected": {
        "at": "2026-11-02T09:30:00Z",
        "reason": "string"
      },
      "revoked_at": "2026-11-02T09:30:00Z",
      "telemetry_at": "2026-11-02T09:30:00Z"
    }
  ],
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0
  }
}
get/devices/{id}/telemetry

Last telemetry of a player

What the player reported last (every 5 minutes on monitored screens): version, uptime, memory, storage, battery, network, errors, lost plays, what is on screen. DOOHUB Network monitoring (Network plan); otherwise 403 module_required.

Jakýkoli klíč

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 404Not found in this account.
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/devices/{id}/telemetry" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "device_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "screen_id": "string",
    "reported_at": "2026-11-02T09:30:00Z",
    "telemetry": {}
  }
}
get/networks

The network structure

Regions and locations as a flat tree (parent_id), with the screens placed directly in each, the screen groups and the screens without a place. DOOHUB Network (Network plan); otherwise 403 module_required.

Jakýkoli klíč

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/networks" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "nodes": [
      {
        "id": "string",
        "parent_id": "string",
        "kind": "region",
        "name": "string",
        "note": "string",
        "screen_ids": [
          "string"
        ]
      }
    ],
    "groups": [
      {
        "id": "string",
        "kind": "city",
        "name": "string",
        "note": "string",
        "screen_ids": [
          "string"
        ]
      }
    ],
    "unassigned_screen_ids": [
      "string"
    ]
  }
}
get/locations

Locations of the network

Places of the tree with their path, address and screens; with floor plans also the floors and where each screen sits (x, y in the floor's units, angle = where it faces). DOOHUB Network (Network plan).

Jakýkoli klíč

Chyby

  • 401Missing, invalid or revoked API key.
  • 403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).
  • 429More than 120 requests a minute; see Retry-After.
Požadavek
curl "https://admin.doohub.online/api/v1/locations" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": [
    {
      "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "name": "string",
      "path": [
        {
          "id": "string",
          "name": "string"
        }
      ],
      "address": "string",
      "city": "string",
      "note": "string",
      "screen_ids": [
        "string"
      ],
      "floors": [
        {
          "id": "string",
          "name": "string",
          "level": 0,
          "size": {
            "width": 0,
            "height": 0
          },
          "screens": [
            {
              "screen_id": null,
              "x": null,
              "y": null,
              "angle": null
            }
          ]
        }
      ]
    }
  ],
  "meta": {
    "total": 0,
    "floors": false
  }
}

Cookies jsou malé soubory, které si web ukládá ve vašem prohlížeči. Nezbytné nelze vypnout, ostatní kategorie povolujete vy.

Nezbytné

Vždy zapnuté

Přihlášení, volba účtu a jazyka, uložení vaší volby cookies a ochrana plateb. Bez nich web nefunguje.

sb-…-auth-token, doohub_account, NEXT_LOCALE, doohub_consent, doohub_ref, doohub_sidebar, doohub_menu, doohub_theme, doohub_support_return, doohub_mfa_later, doohub_signed_in, __stripe_mid, __stripe_sid

Žádné analytické ani marketingové cookies nepoužíváme, proto se vás na souhlas neptáme. Kdybychom je zavedli, zeptáme se předem.