Cyfeirnod · Setiau teledu

Gweld set deledu

GET /v1/tvs/{uid}

Yn dangos set deledu yn ôl ei uid.

Paramedr yn y llwybr

EnwMathDisgrifiad
uidstringuid y set deledu.

Meysydd yr ymateb

uid string
Dynodydd y set deledu, yr un a ddefnyddir yn y Panel Rheoli.
name string
Enw'r set deledu.
description string
Disgrifiad o'r set deledu (gall fod yn wag).
organization object
Sefydliad y set deledu: uid a name.
playlist object | null
Rhestr chwarae'r set deledu (uid a name), neu null os nad oes un.
status string
online, alert neu offline, fel yr esbonnir isod.
last_seen_at string | null
Y cyswllt diwethaf rhwng y set deledu a'r platfform, neu null os nad yw erioed wedi cysylltu.
activated_at string | null
Pryd yr actifadwyd y set deledu.
app_version string
Fersiwn yr ap sydd wedi'i osod ar y set deledu.
os string
System weithredu'r set deledu, fel android.
device object
Brand (brand) a model (model) y ddyfais, pan fydd y set deledu'n eu hanfon.
timezone string | null
Cylchfa amser y set deledu, fel America/Sao_Paulo, neu null.

Sut mae'r statws yn cael ei gyfrifo

  • online cyswllt llai na 3 munud yn ôl, yn chwarae
  • alert cyswllt rhwng 3 a 9 munud yn ôl, neu mae'r set deledu'n dal i gychwyn
  • offline dim cyswllt ers 10 munud neu fwy, neu nid yw erioed wedi cysylltu

Dyma'r un rheol â lliwiau statws y Panel Rheoli.

Gwallau posibl

  • 404 not_found Dydy'r pwynt terfyn ddim yn bodoli, neu dydy'r eitem ddim yn bodoli neu mae'n perthyn i sefydliad na all y defnyddiwr ei weld.
  • Mae gwallau allwedd a therfyn ceisiadau yn berthnasol i bob pwynt terfyn. Gweld pob gwall
Cais
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();
Ymateb200
{
  "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"
  }
}
Eitem nad yw'n bodoli neu heb fynediad404
{
  "error": {
    "code": "not_found",
    "message": "Item not found or you do not have access to it."
  }
}