Cyfeirnod · Cyfrif
Sefydliadau
GET
/v1/organizations
Yn rhestru'r sefydliadau y mae gan y defnyddiwr fynediad iddynt ac, ym mhob un, beth all ei ddarllen drwy'r API. Nid yw'r ymateb hwn wedi'i dudalennu.
Paramedrau
Nid yw'r pwynt terfyn hwn yn derbyn paramedrau.
Meysydd pob eitem
uidstring- Dynodydd y sefydliad. Defnyddiwch ef ym mharamedr
organizationy rhestrau. namestring- Enw'r sefydliad.
neutral_zonebooleantrueos yw'n sefydliad yn y Parth Niwtral, y gall pob sefydliad arall ddefnyddio ei ffeiliau a'i restrau chwarae.adminbooleantrueos yw'r defnyddiwr yn weinyddwr y sefydliad neu'r prif sefydliad. Os felly, mae'n gweld popeth yn y sefydliad.permissionsobject- Beth all y defnyddiwr ei ddarllen yn y sefydliad hwn.
permissions.tvsbooleantrueos gall weld y setiau teledu.permissions.filesbooleantrueos gall weld y ffeiliau.permissions.playlistsbooleantrueos gall weld y rhestrau chwarae.
Gwallau posibl
- Mae gwallau allwedd a therfyn ceisiadau yn berthnasol i bob pwynt terfyn. Gweld pob gwall
Cais
curl "https://api.on-cloud.live/v1/organizations" \
-H "X-API-Key: $API_KEY"<?php
$ch = curl_init('https://api.on-cloud.live/v1/organizations');
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/organizations', {
headers: { 'X-API-Key': process.env.API_KEY }
});
const { data } = await res.json();Ymateb200
{
"data": [
{
"uid": "8f14e45fceea167a5a36dedd4bea2543",
"name": "Loja Centro",
"neutral_zone": false,
"admin": true,
"permissions": {
"tvs": true,
"files": true,
"playlists": true
}
},
{
"uid": "1679091c5a880faf6fb5e6087eb1b2dc",
"name": "Loja Shopping Norte",
"neutral_zone": false,
"admin": true,
"permissions": {
"tvs": true,
"files": true,
"playlists": true
}
}
]
}