Cyfeirnod · Setiau teledu
Rhestru setiau teledu
GET
/v1/tvs
Yn rhestru'r setiau teledu sydd wedi'u hactifadu yn y sefydliadau lle gall y defnyddiwr weld setiau teledu, yn nhrefn yr wyddor.
Ymateb wedi'i dudalennu: daw'r eitemau yn data a gwybodaeth y dudalen yn meta. Tudaleniad a hidlwyr
Paramedrau
| Enw | Math | Disgrifiad |
|---|---|---|
organization | string | uid sefydliad, i ddychwelyd ei eitemau ef yn unig (gweler /organizations). |
q | string | Rhan o'r enw, hyd at 100 nod. |
page | integer | Tudalen, gan ddechrau ar 1. Rhagosodiad: 1. |
per_page | integer | Eitemau fesul tudalen, o 1 i 100. Rhagosodiad: 50. |
Meysydd pob eitem
uidstring- Dynodydd y set deledu, yr un a ddefnyddir yn y Panel Rheoli.
namestring- Enw'r set deledu.
descriptionstring- Disgrifiad o'r set deledu (gall fod yn wag).
organizationobject- Sefydliad y set deledu:
uidaname. playlistobject | null- Rhestr chwarae'r set deledu (
uidaname), neunullos nad oes un. statusstringonline,alertneuoffline, fel yr esbonnir isod.last_seen_atstring | null- Y cyswllt diwethaf rhwng y set deledu a'r platfform, neu
nullos nad yw erioed wedi cysylltu. activated_atstring | null- Pryd yr actifadwyd y set deledu.
app_versionstring- Fersiwn yr ap sydd wedi'i osod ar y set deledu.
osstring- System weithredu'r set deledu, fel
android. deviceobject- Brand (
brand) a model (model) y ddyfais, pan fydd y set deledu'n eu hanfon. timezonestring | null- Cylchfa amser y set deledu, fel
America/Sao_Paulo, neunull.
Sut mae'r statws yn cael ei gyfrifo
onlinecyswllt llai na 3 munud yn ôl, yn chwaraealertcyswllt rhwng 3 a 9 munud yn ôl, neu mae'r set deledu'n dal i gychwynofflinedim cyswllt ers 10 munud neu fwy, neu nid yw erioed wedi cysylltu
Dyma'r un rheol â lliwiau statws y Panel Rheoli.
Gwallau posibl
- 400
invalid_parameterMae gan baramedr werth annilys, felper_pageuwchlaw'r uchafswm. - 404
organization_not_foundNid yw'rorganizationa roddwyd yn sefydliad lle gall y defnyddiwr weld y math hwn o eitem. - Mae gwallau allwedd a therfyn ceisiadau yn berthnasol i bob pwynt terfyn. Gweld pob gwall
Cais
curl "https://api.on-cloud.live/v1/tvs?per_page=2" \
-H "X-API-Key: $API_KEY"<?php
$ch = curl_init('https://api.on-cloud.live/v1/tvs?per_page=2');
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?per_page=2', {
headers: { 'X-API-Key': process.env.API_KEY }
});
const { data, meta } = await res.json();Ymateb200
{
"data": [
{
"uid": "d3d9446802a44259755d38e6d163e820",
"name": "Caixa 2",
"description": "",
"organization": {
"uid": "1679091c5a880faf6fb5e6087eb1b2dc",
"name": "Loja Shopping Norte"
},
"playlist": null,
"status": "offline",
"last_seen_at": "2026-11-01T18:04:51-03:00",
"activated_at": "2025-03-12T09:41:05-03:00",
"app_version": "3.12.83",
"os": "android",
"device": {
"brand": "Philco",
"model": "PTV32G70"
},
"timezone": "America/Sao_Paulo"
},
{
"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"
}
],
"meta": {
"page": 1,
"per_page": 2,
"total": 3,
"total_pages": 2
}
}