Referenz · TVs

Ein TV abrufen

GET /v1/tvs/{uid}

Liefert ein TV anhand seiner uid.

Pfadparameter

NameTypBeschreibung
uidstringuid des TVs.

Antwortfelder

uid string
Kennung des TVs, dieselbe wie im Kontrollzentrum.
name string
Name des TVs.
description string
Beschreibung des TVs (kann leer sein).
organization object
Organisation des TVs: uid und name.
playlist object | null
Playlist des TVs (uid und name) oder null, wenn keine zugewiesen ist.
status string
online, alert oder offline, wie unten erklärt.
last_seen_at string | null
Letzter Kontakt des TVs mit der Plattform oder null, wenn es sich noch nie verbunden hat.
activated_at string | null
Zeitpunkt, zu dem das TV aktiviert wurde.
app_version string
Version der auf dem TV installierten App.
os string
Betriebssystem des TVs, z. B. android.
device object
Marke (brand) und Modell (model) des Geräts, sofern das TV sie meldet.
timezone string | null
Zeitzone des TVs, z. B. America/Sao_Paulo, oder null.

So wird der Status berechnet

  • online Kontakt vor weniger als 3 Minuten, Wiedergabe läuft
  • alert Kontakt vor 3 bis 9 Minuten oder TV startet noch
  • offline Kein Kontakt seit mindestens 10 Minuten oder noch nie verbunden

Es gilt dieselbe Regel wie für die Statusfarben im Kontrollzentrum.

Mögliche Fehler

  • 404 not_found Der Endpunkt existiert nicht, oder das Element existiert nicht bzw. gehört zu einer Organisation, die der Benutzer nicht sehen kann.
  • Fehler zum Schlüssel und zum Anfragelimit gelten für alle Endpunkte. Alle Fehler ansehen
Anfrage
curl "https://api.on-cloud.live/v1/tvs/c98cb8f9cc62887d1f6cf5693df9219c" \
  -H "X-API-Key: $API_KEY"
<?php
$ch = curl_init('https://api.on-cloud.live/v1/tvs/c98cb8f9cc62887d1f6cf5693df9219c');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('API_KEY')],
]);
$response = json_decode(curl_exec($ch), true);
const res = await fetch('https://api.on-cloud.live/v1/tvs/c98cb8f9cc62887d1f6cf5693df9219c', {
  headers: { 'X-API-Key': process.env.API_KEY }
});
const { data } = await res.json();
Antwort200
{
  "data": {
    "uid": "c98cb8f9cc62887d1f6cf5693df9219c",
    "name": "Recepção",
    "description": "TV da entrada",
    "organization": {
      "uid": "8f14e45fceea167a5a36dedd4bea2543",
      "name": "Loja Centro"
    },
    "playlist": {
      "uid": "e4da3b7fbbce2345d7772b0674a318d5",
      "name": "Lista principal"
    },
    "status": "online",
    "last_seen_at": "2026-11-03T14:32:10-03:00",
    "activated_at": "2025-03-12T09:41:05-03:00",
    "app_version": "3.12.84",
    "os": "android",
    "device": {
      "brand": "TCL",
      "model": "43P635"
    },
    "timezone": "America/Sao_Paulo"
  }
}
Element existiert nicht oder kein Zugriff404
{
  "error": {
    "code": "not_found",
    "message": "Item not found or you do not have access to it."
  }
}