Reference · Account

Organisations

GET /v1/organizations

Lists the organisations the user has access to and, for each one, what they can read through the API. This response is not paginated.

Parameters

This endpoint takes no parameters.

Fields of each item

uid string
Organisation identifier. Use it in the organization parameter of the lists.
name string
Organisation name.
neutral_zone boolean
true if it is a neutral zone organisation, whose files and playlists can be used by all other organisations.
admin boolean
true if the user is an administrator of the organisation or of the main organisation. In that case, they see everything in the organisation.
permissions object
What the user can read in this organisation.
permissions.tvs boolean
true if they can see the TVs.
permissions.files boolean
true if they can see the files.
permissions.playlists boolean
true if they can see the playlists.

Possible errors

Request
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();
Response200
{
  "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
      }
    }
  ]
}