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

uid string
Dynodydd y sefydliad. Defnyddiwch ef ym mharamedr organization y rhestrau.
name string
Enw'r sefydliad.
neutral_zone boolean
true os yw'n sefydliad yn y Parth Niwtral, y gall pob sefydliad arall ddefnyddio ei ffeiliau a'i restrau chwarae.
admin boolean
true os yw'r defnyddiwr yn weinyddwr y sefydliad neu'r prif sefydliad. Os felly, mae'n gweld popeth yn y sefydliad.
permissions object
Beth all y defnyddiwr ei ddarllen yn y sefydliad hwn.
permissions.tvs boolean
true os gall weld y setiau teledu.
permissions.files boolean
true os gall weld y ffeiliau.
permissions.playlists boolean
true os 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
      }
    }
  ]
}