Shell HTTP JavaScript Ruby Python PHP Java Go

Screenly v4 API v(Beta)

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Welcome to the Screenly v4 API documentation. Our comprehensive API guide provides detailed instructions for interacting with and harnessing the power of our APIs. You'll find information on our RESTful APIs, including authentication, various endpoints, and in-depth descriptions of object attributes.

Our API is built on postgREST, offering advanced data manipulation capabilities.

Flexible Filtering
Easily filter data using any field, even nested ones. For instance, to fetch all video assets, employ a filter like the following:
GET /v4/assets?type=eq.video

Resource Embedding
You can include related resources in your API calls. For instance, to retrieve a playlist along with all its items, utilize a filter like this:
GET /v4/playlists?select=*,playlist_items(*)

Base URLs:

Authentication

Asset Groups

Delete an asset group

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/asset-groups',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/asset-groups', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/asset-groups', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/asset-groups", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/asset-groups

Asset groups are used to organize assets, serving as folders for grouping them. Please note that this endpoint will delete all assets in the group.

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the asset group.
title query string(text) false The title or name of the asset group.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of asset groups

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/asset-groups \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/asset-groups HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/asset-groups',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/asset-groups',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/asset-groups', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/asset-groups', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/asset-groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/asset-groups", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/asset-groups

Asset groups are used to organize assets, serving as folders for grouping them.

Embedded resource name: asset_groups

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the asset group.
title query string(text) false The title or name of the asset group.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "title": "My Asset Group"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [asset-groups.select] false none none
» id string(ulid) false none A unique identifier for the asset group.
» title string(text) false none The title or name of the asset group.

Update an asset group

Code samples

# You can also use wget
curl -X PATCH https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

PATCH https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "title": "My Asset Group"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.patch 'https://api.screenlyapp.com/v4/asset-groups',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.patch('https://api.screenlyapp.com/v4/asset-groups', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.screenlyapp.com/v4/asset-groups', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/asset-groups?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.screenlyapp.com/v4/asset-groups", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v4/asset-groups

Asset groups are used to organize assets, serving as folders for grouping them.

Body parameter

{
  "title": "My Asset Group"
}

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the asset group.
title query string(text) false The title or name of the asset group.
Prefer header string false Preference
body body asset-groups.update false asset_groups

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Create an asset group

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/asset-groups \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/asset-groups HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "title": "My Asset Group"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/asset-groups',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/asset-groups',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/asset-groups', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/asset-groups', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/asset-groups");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/asset-groups", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/asset-groups

Asset groups are used to organize assets, serving as folders for grouping them.

Body parameter

{
  "title": "My Asset Group"
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body asset-groups.insert false asset_groups

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Assets

Delete an asset

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/assets',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/assets', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/assets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/assets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/assets

Assets refer to content that can be scheduled on screens, including images, videos, and web pages.

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the asset.
asset_group_id query string(ulid) false The unique identifier of the asset group to which the asset belongs.
type query string(enum) false The type of the asset. Refer to the Enumerated Values for possible options.
title query string(text) false The title or name of the asset.
duration query string(numeric) false The duration of the asset in seconds. Applicable to Video and Audio assets only.
asset_url query string(text) false The URL of the asset after it has been processed by Screenly's backend.
md5 query string(text) false The MD5 hash of the asset.
source_md5 query string(text) false The MD5 hash of the source asset.
source_size query string(bigint) false The size of the source asset in bytes.
source_url query string(text) false The URL of the source asset before it has been processed by Screenly's backend.
width query string(integer) false The width of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
height query string(integer) false The height of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
disable_verification query string(boolean) false Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
headers query string(jsonb) false Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
send_metadata query string(boolean) false With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
metadata query string(jsonb) false This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
status query string(enum) false The processing status of the asset by Screenly's backend. Refer to Enumerated Values for options.
js_injection query string(text) false Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
thumbnail_uri query string(text) false The URI of the asset's thumbnail, typically used for previewing. Applicable to Image and Video assets only.
processing_error query string(text) false The reason for the processing status being set to error by Screenly's backend.
mimetype query string(text) false The MIME type of the asset.
app_id query string(ulid) false The App ID associated with the asset. Check out our Edge App examples here.
signature query string(text) false The signature of the asset.
app_revision query string(integer) false The App revision of the asset. Check out our Edge App examples here.
app_channel query string(text) false The App channel of the asset. Check out our Edge App examples here.
app_installation_id query string(ulid) false The App installation ID of the asset. Check out our Edge App examples here.
team_id query string(ulid) false The unique identifier of the team to which the asset belongs.
created_at query string(timestamp with time zone) false none
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of assets

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/assets \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/assets HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/assets',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/assets',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/assets', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/assets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/assets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/assets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/assets

Assets refer to content that can be scheduled on screens, including images, videos, and web pages.

Embedded resource name: assets

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the asset.
asset_group_id query string(ulid) false The unique identifier of the asset group to which the asset belongs.
type query string(enum) false The type of the asset. Refer to the Enumerated Values for possible options.
title query string(text) false The title or name of the asset.
duration query string(numeric) false The duration of the asset in seconds. Applicable to Video and Audio assets only.
asset_url query string(text) false The URL of the asset after it has been processed by Screenly's backend.
md5 query string(text) false The MD5 hash of the asset.
source_md5 query string(text) false The MD5 hash of the source asset.
source_size query string(bigint) false The size of the source asset in bytes.
source_url query string(text) false The URL of the source asset before it has been processed by Screenly's backend.
width query string(integer) false The width of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
height query string(integer) false The height of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
disable_verification query string(boolean) false Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
headers query string(jsonb) false Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
send_metadata query string(boolean) false With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
metadata query string(jsonb) false This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
status query string(enum) false The processing status of the asset by Screenly's backend. Refer to Enumerated Values for options.
js_injection query string(text) false Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
thumbnail_uri query string(text) false The URI of the asset's thumbnail, typically used for previewing. Applicable to Image and Video assets only.
processing_error query string(text) false The reason for the processing status being set to error by Screenly's backend.
mimetype query string(text) false The MIME type of the asset.
app_id query string(ulid) false The App ID associated with the asset. Check out our Edge App examples here.
signature query string(text) false The signature of the asset.
app_revision query string(integer) false The App revision of the asset. Check out our Edge App examples here.
app_channel query string(text) false The App channel of the asset. Check out our Edge App examples here.
app_installation_id query string(ulid) false The App installation ID of the asset. Check out our Edge App examples here.
team_id query string(ulid) false The unique identifier of the team to which the asset belongs.
created_at query string(timestamp with time zone) false none
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "app_channel": "stable",
    "app_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "app_installation_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "app_revision": 1,
    "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "asset_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
    "created_at": "string",
    "disable_verification": false,
    "duration": 10,
    "headers": {
      "X-My-Header": "My Value"
    },
    "height": 1080,
    "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "js_injection": "alert('Hello World!');",
    "md5": "20eb595e2e3780b53c8cb21c67f5ab55",
    "metadata": {
      "foo": "bar"
    },
    "mimetype": "image/jpeg",
    "processing_error": "",
    "send_metadata": false,
    "signature": "0a20c95dd2b8966a7212227469272bc806461884e6d68769e47922063d520d6c7e1b1220b62d74d8b7be7c284f5a6f0ba9f32a28e5eb587c8de968721f027f782abcf8e01a180a14afec7236e34e130216ff25f53500c415d53ccaba10001a1a0a147a6998108f2e00fa869548c24ce5e70dff860b45108080201a1a0a14315c1cce3760f30b9069926a444f7cdcb43c001a108080401a1a0a14212e7ad9f42a32efa43dd97576bdfb5944b898e9108080601a1b0a1471eca1b9f3646aa3db600afd7072d1caf796392310808080011a1b0a144aacd4d1d3abd15d9cc726bd4202bceb967fb8d9108080a0011a1b0a147379e74c86a195d64c7d24568c6fa17feddc1bef108080c001",
    "source_md5": "20eb595e2e3780b53c8cb21c67f5ab55",
    "source_size": 123456,
    "source_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
    "status": "finished",
    "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "thumbnail_uri": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI_thumbnail.jpg",
    "title": "My Asset",
    "type": "image",
    "width": 1920
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [assets.select] false none none
» app_channel string(text) false none The App channel of the asset. Check out our Edge App examples here.
» app_id string(ulid) false none The App ID associated with the asset. Check out our Edge App examples here.
» app_installation_id string(ulid) false none The App installation ID of the asset. Check out our Edge App examples here.
» app_revision integer(integer) false none The App revision of the asset. Check out our Edge App examples here.
» asset_group_id string(ulid) false none The unique identifier of the asset group to which the asset belongs.
» asset_url string(text) false none The URL of the asset after it has been processed by Screenly's backend.
» created_at string(timestamp with time zone) false none none
» disable_verification boolean(boolean) false none Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
» duration number(numeric) false none The duration of the asset in seconds. Applicable to Video and Audio assets only.
» headers any false none Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
» height integer(integer) false none The height of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
» id string(ulid) false none A unique identifier for the asset.
» js_injection string(text) false none Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
» md5 string(text) false none The MD5 hash of the asset.
» metadata any false none This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
» mimetype string(text) false none The MIME type of the asset.
» processing_error string(text) false none The reason for the processing status being set to error by Screenly's backend.
» send_metadata boolean(boolean) false none With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
» signature string(text) false none The signature of the asset.
» source_md5 string(text) false none The MD5 hash of the source asset.
» source_size integer(bigint) false none The size of the source asset in bytes.
» source_url string(text) false none The URL of the source asset before it has been processed by Screenly's backend.
» status string(enum) false none The processing status of the asset by Screenly's backend. Refer to Enumerated Values for options.
» team_id string(ulid) false none The unique identifier of the team to which the asset belongs.
» thumbnail_uri string(text) false none The URI of the asset's thumbnail, typically used for previewing. Applicable to Image and Video assets only.
» title string(text) false none The title or name of the asset.
» type string(enum) false none The type of the asset. Refer to the Enumerated Values for possible options.
» width integer(integer) false none The width of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.

Enumerated Values

Property Value
status none
status downloading
status processing
status error
status finished
status not-promoted
type appweb
type image
type video
type web
type audio
type edge-app
type edge-app-file
type pdf
type pdf-page

Update an asset

Code samples

# You can also use wget
curl -X PATCH https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

PATCH https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "disable_verification": false,
  "headers": {
    "X-My-Header": "My Value"
  },
  "js_injection": "alert('Hello World!');",
  "metadata": {
    "foo": "bar"
  },
  "send_metadata": false,
  "title": "My Asset"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.patch 'https://api.screenlyapp.com/v4/assets',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.patch('https://api.screenlyapp.com/v4/assets', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.screenlyapp.com/v4/assets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/assets?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.screenlyapp.com/v4/assets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v4/assets

Assets refer to content that can be scheduled on screens, including images, videos, and web pages.

Body parameter

{
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "disable_verification": false,
  "headers": {
    "X-My-Header": "My Value"
  },
  "js_injection": "alert('Hello World!');",
  "metadata": {
    "foo": "bar"
  },
  "send_metadata": false,
  "title": "My Asset"
}

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the asset.
asset_group_id query string(ulid) false The unique identifier of the asset group to which the asset belongs.
type query string(enum) false The type of the asset. Refer to the Enumerated Values for possible options.
title query string(text) false The title or name of the asset.
duration query string(numeric) false The duration of the asset in seconds. Applicable to Video and Audio assets only.
asset_url query string(text) false The URL of the asset after it has been processed by Screenly's backend.
md5 query string(text) false The MD5 hash of the asset.
source_md5 query string(text) false The MD5 hash of the source asset.
source_size query string(bigint) false The size of the source asset in bytes.
source_url query string(text) false The URL of the source asset before it has been processed by Screenly's backend.
width query string(integer) false The width of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
height query string(integer) false The height of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
disable_verification query string(boolean) false Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
headers query string(jsonb) false Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
send_metadata query string(boolean) false With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
metadata query string(jsonb) false This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
status query string(enum) false The processing status of the asset by Screenly's backend. Refer to Enumerated Values for options.
js_injection query string(text) false Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
thumbnail_uri query string(text) false The URI of the asset's thumbnail, typically used for previewing. Applicable to Image and Video assets only.
processing_error query string(text) false The reason for the processing status being set to error by Screenly's backend.
mimetype query string(text) false The MIME type of the asset.
app_id query string(ulid) false The App ID associated with the asset. Check out our Edge App examples here.
signature query string(text) false The signature of the asset.
app_revision query string(integer) false The App revision of the asset. Check out our Edge App examples here.
app_channel query string(text) false The App channel of the asset. Check out our Edge App examples here.
app_installation_id query string(ulid) false The App installation ID of the asset. Check out our Edge App examples here.
team_id query string(ulid) false The unique identifier of the team to which the asset belongs.
created_at query string(timestamp with time zone) false none
Prefer header string false Preference
body body assets.update false assets

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Create an asset

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/assets \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/assets HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "app_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "app_revision": 1,
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "disable_verification": false,
  "headers": {
    "X-My-Header": "My Value"
  },
  "js_injection": "alert('Hello World!');",
  "metadata": {
    "foo": "bar"
  },
  "send_metadata": false,
  "source_md5": "20eb595e2e3780b53c8cb21c67f5ab55",
  "source_size": 123456,
  "source_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
  "title": "My Asset"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/assets',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/assets',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/assets', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/assets', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/assets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/assets", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/assets

Assets refer to content that can be scheduled on screens, including images, videos, and web pages.

Body parameter

{
  "app_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "app_revision": 1,
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "disable_verification": false,
  "headers": {
    "X-My-Header": "My Value"
  },
  "js_injection": "alert('Hello World!');",
  "metadata": {
    "foo": "bar"
  },
  "send_metadata": false,
  "source_md5": "20eb595e2e3780b53c8cb21c67f5ab55",
  "source_size": 123456,
  "source_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
  "title": "My Asset"
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body assets.insert false assets

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Labels

Delete a label

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/labels',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/labels', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/labels', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/labels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/labels

Labels are used to group screens and can be used to schedule playlists on them.

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the label.
team_id query string(ulid) false The unique identifier of the team to which the label belongs.
type query string(enum) false The type of the label. Refer to Enumerated Values for options.
name query string(text) false The name of the label.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of labels

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/labels \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/labels HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/labels',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/labels', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/labels', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/labels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/labels

Labels are used to group screens and can be used to schedule playlists on them.

Embedded resource name: labels

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the label.
team_id query string(ulid) false The unique identifier of the team to which the label belongs.
type query string(enum) false The type of the label. Refer to Enumerated Values for options.
name query string(text) false The name of the label.
human_name query string(text) false The human-readable name of the label.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "human_name": "My Label",
    "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "name": "My Label",
    "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "type": "manual"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [labels.select] false none none
» human_name string(text) false none The human-readable name of the label.
» id string(ulid) false none A unique identifier for the label.
» name string(text) false none The name of the label.
» team_id string(ulid) false none The unique identifier of the team to which the label belongs.
» type string(enum) false none The type of the label. Refer to Enumerated Values for options.

Enumerated Values

Property Value
type all-screens
type manual
type screen
type virtual
type landscape
type portrait
type full_hd
type uhd
type anywhere

Update a label

Code samples

# You can also use wget
curl -X PATCH https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

PATCH https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "name": "My Label"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.patch 'https://api.screenlyapp.com/v4/labels',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.patch('https://api.screenlyapp.com/v4/labels', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.screenlyapp.com/v4/labels', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.screenlyapp.com/v4/labels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v4/labels

Labels are used to group screens and can be used to schedule playlists on them.

Body parameter

{
  "name": "My Label"
}

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the label.
team_id query string(ulid) false The unique identifier of the team to which the label belongs.
type query string(enum) false The type of the label. Refer to Enumerated Values for options.
name query string(text) false The name of the label.
Prefer header string false Preference
body body labels.update false labels_updatable

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Create a label

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/labels \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/labels HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "name": "My Label"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/labels',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/labels', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/labels', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/labels", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/labels

Labels are used to group screens and can be used to schedule playlists on them.

Body parameter

{
  "name": "My Label"
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body labels.insert false labels_updatable

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Delete a playlist label

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/labels/playlists?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/labels/playlists?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels/playlists?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/labels/playlists',
  params: {
  'label_id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/labels/playlists', params={
  'label_id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/labels/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels/playlists?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/labels/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/labels/playlists

Labels attached to playlists. All screens with the same label will play the playlist.

Parameters

Name In Type Required Description
label_id query string(ulid) true The unique identifier of the label.
playlist_id query string(ulid) false The unique identifier of the playlist.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of playlist labels

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/labels/playlists \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/labels/playlists HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels/playlists',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/labels/playlists',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/labels/playlists', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/labels/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels/playlists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/labels/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/labels/playlists

Labels attached to playlists. All screens with the same label will play the playlist.

Embedded resource name: label_playlist

Parameters

Name In Type Required Description
label_id query string(ulid) false The unique identifier of the label.
playlist_id query string(ulid) false The unique identifier of the playlist.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [labels_playlists.select] false none none
» label_id string(ulid) false none The unique identifier of the label.
» playlist_id string(ulid) false none The unique identifier of the playlist.

Create a playlist label

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/labels/playlists \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/labels/playlists HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels/playlists',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/labels/playlists',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/labels/playlists', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/labels/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels/playlists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/labels/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/labels/playlists

Labels attached to playlists. All screens with the same label will play the playlist.

Body parameter

{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body labels_playlists.insert false label_playlist

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Delete a screen label

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/labels/screens?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/labels/screens?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels/screens?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/labels/screens',
  params: {
  'label_id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/labels/screens', params={
  'label_id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/labels/screens', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels/screens?label_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/labels/screens", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/labels/screens

Labels attached to screens. The screen will include playlists with the same label.

Parameters

Name In Type Required Description
label_id query string(ulid) true The unique identifier of the label.
screen_id query string(ulid) false The unique identifier of the screen.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of screen labels

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/labels/screens \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/labels/screens HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels/screens',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/labels/screens',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/labels/screens', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/labels/screens', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels/screens");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/labels/screens", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/labels/screens

Labels attached to screens. The screen will include playlists with the same label.

Embedded resource name: label_screen

Parameters

Name In Type Required Description
label_id query string(ulid) false The unique identifier of the label.
screen_id query string(ulid) false The unique identifier of the screen.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "screen_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [labels_screens.select] false none none
» label_id string(ulid) false none The unique identifier of the label.
» screen_id string(ulid) false none The unique identifier of the screen.

Create a screen label

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/labels/screens \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/labels/screens HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "screen_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/labels/screens',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/labels/screens',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/labels/screens', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/labels/screens', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/labels/screens");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/labels/screens", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/labels/screens

Labels attached to screens. The screen will include playlists with the same label.

Body parameter

{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "screen_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body labels_screens.insert false label_screen

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Playlist Items

Delete a playlist item

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/playlist-items',
  params: {
  'playlist_id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/playlist-items', params={
  'playlist_id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/playlist-items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/playlist-items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/playlist-items

Playlist items are individual assets that make up a playlist.

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the playlist item.
playlist_id query string(ulid) true A unique identifier for the playlist to which the playlist item belongs. Can be replaced with id
asset_id query string(ulid) false A unique identifier for the asset to which the playlist item belongs.
duration query string(numeric) false The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
effective_duration query string(numeric) false The effective duration of the playlist item in seconds, representing the actual duration played on the screen.
position query string(bigint) false The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of playlist items

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/playlist-items \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/playlist-items HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlist-items',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/playlist-items',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/playlist-items', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/playlist-items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlist-items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/playlist-items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/playlist-items

Playlist items are individual assets that make up a playlist.

Embedded resource name: playlist_items

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the playlist item.
playlist_id query string(ulid) false A unique identifier for the playlist to which the playlist item belongs.
asset_id query string(ulid) false A unique identifier for the asset to which the playlist item belongs.
duration query string(numeric) false The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
effective_duration query string(numeric) false The effective duration of the playlist item in seconds, representing the actual duration played on the screen.
position query string(bigint) false The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "asset_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "duration": 10,
    "effective_duration": 10,
    "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "position": 1
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [playlist-items.select] false none none
» asset_id string(ulid) false none A unique identifier for the asset to which the playlist item belongs.
» duration number(numeric) false none The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
» effective_duration number(numeric) false none The effective duration of the playlist item in seconds, representing the actual duration played on the screen.
» id string(ulid) false none A unique identifier for the playlist item.
» playlist_id string(ulid) false none A unique identifier for the playlist to which the playlist item belongs.
» position integer(bigint) false none The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.

Update a playlist item

Code samples

# You can also use wget
curl -X PATCH https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

PATCH https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "duration": 10,
  "position": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.patch 'https://api.screenlyapp.com/v4/playlist-items',
  params: {
  'playlist_id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.patch('https://api.screenlyapp.com/v4/playlist-items', params={
  'playlist_id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.screenlyapp.com/v4/playlist-items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlist-items?playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.screenlyapp.com/v4/playlist-items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v4/playlist-items

Playlist items are individual assets that make up a playlist.

Body parameter

{
  "duration": 10,
  "position": 1
}

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the playlist item.
playlist_id query string(ulid) true A unique identifier for the playlist to which the playlist item belongs. Can be replaced with id
asset_id query string(ulid) false A unique identifier for the asset to which the playlist item belongs.
duration query string(numeric) false The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
effective_duration query string(numeric) false The effective duration of the playlist item in seconds, representing the actual duration played on the screen.
position query string(bigint) false The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.
Prefer header string false Preference
body body playlist-items.update false playlist_items

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Create a playlist item

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/playlist-items \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/playlist-items HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "asset_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "duration": 10,
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "position": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlist-items',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/playlist-items',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/playlist-items', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/playlist-items', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlist-items");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/playlist-items", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/playlist-items

Playlist items are individual assets that make up a playlist.

Body parameter

{
  "asset_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "duration": 10,
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "position": 1
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body playlist-items.insert false playlist_items

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Playlists

Delete a playlist

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/playlists',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/playlists', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/playlists

Playlists describe what assets to display and when.

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the playlist.
title query string(text) false The title or name of the playlist.
predicate query string(text) false The predicate of the playlist.
priority query string(boolean) false Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
is_enabled query string(boolean) false Allows enabling or disabling the playlist.
transitions query string(boolean) false Slide Transitions enable smooth transitions between your slides.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of playlists

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/playlists \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/playlists HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/playlists',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/playlists', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/playlists

Playlists describe what assets to display and when.

Embedded resource name: playlists

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the playlist.
title query string(text) false The title or name of the playlist.
predicate query string(text) false The predicate of the playlist.
priority query string(boolean) false Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
is_enabled query string(boolean) false Allows enabling or disabling the playlist.
transitions query string(boolean) false Slide Transitions enable smooth transitions between your slides.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "is_enabled": true,
    "predicate": "TRUE AND ($DATE >= 1683676800000)",
    "priority": false,
    "title": "My Playlist",
    "transitions": true
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [playlists.select] false none none
» id string(ulid) false none A unique identifier for the playlist.
» is_enabled boolean(boolean) false none Allows enabling or disabling the playlist.
» predicate string(text) false none The predicate of the playlist.
» priority boolean(boolean) false none Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
» title string(text) false none The title or name of the playlist.
» transitions boolean(boolean) false none Slide Transitions enable smooth transitions between your slides.

Update a playlist

Code samples

# You can also use wget
curl -X PATCH https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

PATCH https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.patch 'https://api.screenlyapp.com/v4/playlists',
  params: {
  'id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.patch('https://api.screenlyapp.com/v4/playlists', params={
  'id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PATCH','https://api.screenlyapp.com/v4/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists?id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "https://api.screenlyapp.com/v4/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PATCH /v4/playlists

Playlists describe what assets to display and when.

Body parameter

{
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}

Parameters

Name In Type Required Description
id query string(ulid) true A unique identifier for the playlist.
title query string(text) false The title or name of the playlist.
predicate query string(text) false The predicate of the playlist.
priority query string(boolean) false Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
is_enabled query string(boolean) false Allows enabling or disabling the playlist.
transitions query string(boolean) false Slide Transitions enable smooth transitions between your slides.
Prefer header string false Preference
body body playlists.update false playlists

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Create a playlist

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/playlists \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/playlists HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/playlists',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/playlists', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/playlists', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/playlists", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/playlists

Playlists describe what assets to display and when.

Body parameter

{
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body playlists.insert false playlists

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Delete a shared playlist

Code samples

# You can also use wget
curl -X DELETE https://api.screenlyapp.com/v4/playlists/shared?team_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P&playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

DELETE https://api.screenlyapp.com/v4/playlists/shared?team_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P&playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P HTTP/1.1
Host: api.screenlyapp.com

Prefer: return=representation


const headers = {
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists/shared?team_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P&playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.delete 'https://api.screenlyapp.com/v4/playlists/shared',
  params: {
  'team_id' => 'string(ulid)',
'playlist_id' => 'string(ulid)'
}, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.delete('https://api.screenlyapp.com/v4/playlists/shared', params={
  'team_id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P',  'playlist_id': 'eq.01HC9RFEFP1ATEH5ZT5VQMF65P'
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://api.screenlyapp.com/v4/playlists/shared', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists/shared?team_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P&playlist_id=eq.01HC9RFEFP1ATEH5ZT5VQMF65P");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "https://api.screenlyapp.com/v4/playlists/shared", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /v4/playlists/shared

Shared playlists are playlists that are shared with other teams.

Parameters

Name In Type Required Description
team_id query string(ulid) true A unique identifier for the team receiving the shared playlist.
playlist_id query string(ulid) true A unique identifier for the playlist that is shared.
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none

Responses

Status Meaning Description Schema
204 No Content No Content None

Retrieve a list of shared playlists

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/playlists/shared \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/playlists/shared HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists/shared',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/playlists/shared',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/playlists/shared', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/playlists/shared', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists/shared");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/playlists/shared", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/playlists/shared

Shared playlists are playlists that are shared with other teams.

Embedded resource name: shared_playlists

Parameters

Name In Type Required Description
team_id query string(ulid) false A unique identifier for the team receiving the shared playlist.
playlist_id query string(ulid) false A unique identifier for the playlist that is shared.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [playlists_shared.select] false none none
» playlist_id string(ulid) false none A unique identifier for the playlist that is shared.
» team_id string(ulid) false none A unique identifier for the team receiving the shared playlist.

Create a shared playlist

Code samples

# You can also use wget
curl -X POST https://api.screenlyapp.com/v4/playlists/shared \
  -H 'Content-Type: application/json' \
  -H 'Prefer: return=representation' \
  -H 'Authorization: API_KEY'

POST https://api.screenlyapp.com/v4/playlists/shared HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json

Prefer: return=representation

const inputBody = '{
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}';
const headers = {
  'Content-Type':'application/json',
  'Prefer':'return=representation',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/playlists/shared',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Prefer' => 'return=representation',
  'Authorization' => 'API_KEY'
}

result = RestClient.post 'https://api.screenlyapp.com/v4/playlists/shared',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Prefer': 'return=representation',
  'Authorization': 'API_KEY'
}

r = requests.post('https://api.screenlyapp.com/v4/playlists/shared', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Prefer' => 'return=representation',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://api.screenlyapp.com/v4/playlists/shared', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/playlists/shared");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Prefer": []string{"return=representation"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "https://api.screenlyapp.com/v4/playlists/shared", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /v4/playlists/shared

Shared playlists are playlists that are shared with other teams.

Body parameter

{
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Parameters

Name In Type Required Description
select query string false Filtering Columns
Prefer header string false Preference
body body playlists_shared.insert false shared_playlists

Enumerated Values

Parameter Value
Prefer return=representation
Prefer return=minimal
Prefer return=none
Prefer resolution=ignore-duplicates
Prefer resolution=merge-duplicates

Responses

Status Meaning Description Schema
201 Created Created None

Screens

Retrieve a list of screens

Code samples

# You can also use wget
curl -X GET https://api.screenlyapp.com/v4/screens \
  -H 'Accept: application/json' \
  -H 'Range: string' \
  -H 'Range-Unit: items' \
  -H 'Prefer: count=none' \
  -H 'Authorization: API_KEY'

GET https://api.screenlyapp.com/v4/screens HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
Range: string
Range-Unit: items
Prefer: count=none


const headers = {
  'Accept':'application/json',
  'Range':'string',
  'Range-Unit':'items',
  'Prefer':'count=none',
  'Authorization':'API_KEY'
};

fetch('https://api.screenlyapp.com/v4/screens',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Range' => 'string',
  'Range-Unit' => 'items',
  'Prefer' => 'count=none',
  'Authorization' => 'API_KEY'
}

result = RestClient.get 'https://api.screenlyapp.com/v4/screens',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Range': 'string',
  'Range-Unit': 'items',
  'Prefer': 'count=none',
  'Authorization': 'API_KEY'
}

r = requests.get('https://api.screenlyapp.com/v4/screens', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Range' => 'string',
    'Range-Unit' => 'items',
    'Prefer' => 'count=none',
    'Authorization' => 'API_KEY',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://api.screenlyapp.com/v4/screens', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://api.screenlyapp.com/v4/screens");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Range": []string{"string"},
        "Range-Unit": []string{"items"},
        "Prefer": []string{"count=none"},
        "Authorization": []string{"API_KEY"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.screenlyapp.com/v4/screens", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /v4/screens

Screens represent the physical and virtual devices running Screenly software.

Embedded resource name: screens

Parameters

Name In Type Required Description
id query string(ulid) false A unique identifier for the screen.
team_id query string(ulid) false The unique identifier of the team to which the screen belongs.
created_at query string(timestamp with time zone) false The creation date of the screen.
name query string(text) false The name of the screen.
description query string(text) false A description of the screen.
is_enabled query string(boolean) false Indicates whether the screen is enabled.
coords query string(json) false The latitude-longitude coordinate of the screen.
last_ping query string(timestamp with time zone) false The timestamp of the last ping received from the screen.
last_ip query string(text) false The last known IP address of the screen.
local_ip query string(character varying) false The local IP address of the screen.
mac query string(character) false The MAC address of the screen.
last_screenshot_time query string(timestamp with time zone) false The timestamp of the last screenshot taken from the screen.
uptime query string(integer) false Time duration in seconds for which the system has been continuously running without a reboot.
load_avg query string(text) false The load average of the screen.
signal_strength query string(jsonb) false The signal strength of the wireless network connection, if available.
interface query string(text) false The network interface name of the screen, as it's seen by the operating system. E.g. wlan0, eth0.
debug query string(jsonb) false Debug information related to the screen.
location query string(text) false Human-readable representation of the location of the screen. Usually - an address.
timezone query string(text) false The time zone of the screen.
type query string(enum) false The type of the screen. Refer to Enumerated Values for options.
hostname query string(text) false The hostname of the screen.
ws_open query string(boolean) false The WebSocket connection status of the screen.
status query string(text) false The status of the screen.
in_sync query string(boolean) false Indicates if the playlist of the screen is synchronized with the web-console.
hardware_version query string(text) false The hardware version of the screen.
config query string(jsonb) false Configuration details of the screen.
client_version query string(text) false The client version of the screen.
select query string false Filtering Columns
order query string false Ordering
Range header string false Limiting and Pagination
Range-Unit header string false Limiting and Pagination
offset query string false Limiting and Pagination
limit query string false Limiting and Pagination
Prefer header string false Preference

Enumerated Values

Parameter Value
Prefer count=none

Example responses

200 Response

[
  {
    "client_version": "screenly-client-armhf-3.4.7-25888a91-x5",
    "config": {
      "audio_output": "hdmi",
      "disable_overscan": 0,
      "display_rotate": 0,
      "framebuffer_height": 0,
      "framebuffer_width": 0,
      "hdmi_boost": 2,
      "hdmi_drive": 0,
      "hdmi_force_hotplug": true,
      "hdmi_group": 0,
      "hdmi_mode": 0,
      "hdmi_pixel_encoding": 0,
      "hdmi_timings": "",
      "overscan_bottom": 0,
      "overscan_left": 0,
      "overscan_right": 0,
      "overscan_scale": 0,
      "overscan_top": 0,
      "play_history_enabled": false,
      "shuffle_playlist": false,
      "use_composite": false,
      "use_composite_ntsc": false,
      "use_composite_pal": false,
      "verify_ssl": true
    },
    "coords": [
      59.329504,
      18.069532
    ],
    "created_at": "2023-05-30T11:19:22+00:00",
    "debug": false,
    "description": "It's a screen that I use for restaurant menus.",
    "hardware_version": "Raspberry Pi 3B+",
    "hostname": "srly-79fjzydx3ye5o8j",
    "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "in_sync": true,
    "interface": "wlp1s0",
    "is_enabled": true,
    "last_ip": "192.168.1.100",
    "last_ping": "2021-01-01T00:00:00.000Z",
    "last_screenshot_time": "2023-05-30T11:34:52.679+00:00",
    "load_avg": "1.36181640625",
    "local_ip": "192.168.1.100",
    "location": "Gustav Adolfs torg 2, 111 52 Stockholm, Sweden",
    "mac": "00:1a:2b:3c:4d:5e",
    "name": "My Screen",
    "signal_strength": 61,
    "status": "Online",
    "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
    "timezone": "Europe/Stockholm",
    "type": "hardware",
    "uptime": 1125,
    "ws_open": true
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
206 Partial Content Partial Content None

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [screens.select] false none none
» client_version string(text) false none The client version of the screen.
» config any false none Configuration details of the screen.
» coords any false none The latitude-longitude coordinate of the screen.
» created_at string(timestamp with time zone) false none The creation date of the screen.
» debug any false none Debug information related to the screen.
» description string(text) false none A description of the screen.
» hardware_version string(text) false none The hardware version of the screen.
» hostname string(text) false none The hostname of the screen.
» id string(ulid) false none A unique identifier for the screen.
» in_sync boolean(boolean) false none Indicates if the playlist of the screen is synchronized with the web-console.
» interface string(text) false none The network interface name of the screen, as it's seen by the operating system. E.g. wlan0, eth0.
» is_enabled boolean(boolean) false none Indicates whether the screen is enabled.
» last_ip string(text) false none The last known IP address of the screen.
» last_ping string(timestamp with time zone) false none The timestamp of the last ping received from the screen.
» last_screenshot_time string(timestamp with time zone) false none The timestamp of the last screenshot taken from the screen.
» load_avg string(text) false none The load average of the screen.
» local_ip string(character varying) false none The local IP address of the screen.
» location string(text) false none Human-readable representation of the location of the screen. Usually - an address.
» mac string(character) false none The MAC address of the screen.
» name string(text) false none The name of the screen.
» signal_strength any false none The signal strength of the wireless network connection, if available.
» status string(text) false none The status of the screen.
» team_id string(ulid) false none The unique identifier of the team to which the screen belongs.
» timezone string(text) false none The time zone of the screen.
» type string(enum) false none The type of the screen. Refer to Enumerated Values for options.
» uptime integer(integer) false none Time duration in seconds for which the system has been continuously running without a reboot.
» ws_open boolean(boolean) false none The WebSocket connection status of the screen.

Enumerated Values

Property Value
type hardware
type virtual
type anywhere

Schemas

asset-groups.insert

{
  "title": "My Asset Group"
}

Properties

Name Type Required Restrictions Description
title string(text) false none The title or name of the asset group.

asset-groups.select

{
  "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "title": "My Asset Group"
}

Properties

Name Type Required Restrictions Description
id string(ulid) false none A unique identifier for the asset group.
title string(text) false none The title or name of the asset group.

asset-groups.update

{
  "title": "My Asset Group"
}

Properties

Name Type Required Restrictions Description
title string(text) false none The title or name of the asset group.

assets.insert

{
  "app_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "app_revision": 1,
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "disable_verification": false,
  "headers": {
    "X-My-Header": "My Value"
  },
  "js_injection": "alert('Hello World!');",
  "metadata": {
    "foo": "bar"
  },
  "send_metadata": false,
  "source_md5": "20eb595e2e3780b53c8cb21c67f5ab55",
  "source_size": 123456,
  "source_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
  "title": "My Asset"
}

Properties

Name Type Required Restrictions Description
app_id string(ulid) false none The App ID associated with the asset. Check out our Edge App examples here.
app_revision integer(integer) false none The App revision of the asset. Check out our Edge App examples here.
asset_group_id string(ulid) false none The unique identifier of the asset group to which the asset belongs.
disable_verification boolean(boolean) false none Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
headers any false none Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
js_injection string(text) false none Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
metadata any false none This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
send_metadata boolean(boolean) false none With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
source_md5 string(text) false none The MD5 hash of the source asset.
source_size integer(bigint) false none The size of the source asset in bytes.
source_url string(text) false none The URL of the source asset before it has been processed by Screenly's backend.
title string(text) false none The title or name of the asset.

assets.select

{
  "app_channel": "stable",
  "app_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "app_installation_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "app_revision": 1,
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "asset_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
  "created_at": "string",
  "disable_verification": false,
  "duration": 10,
  "headers": {
    "X-My-Header": "My Value"
  },
  "height": 1080,
  "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "js_injection": "alert('Hello World!');",
  "md5": "20eb595e2e3780b53c8cb21c67f5ab55",
  "metadata": {
    "foo": "bar"
  },
  "mimetype": "image/jpeg",
  "processing_error": "",
  "send_metadata": false,
  "signature": "0a20c95dd2b8966a7212227469272bc806461884e6d68769e47922063d520d6c7e1b1220b62d74d8b7be7c284f5a6f0ba9f32a28e5eb587c8de968721f027f782abcf8e01a180a14afec7236e34e130216ff25f53500c415d53ccaba10001a1a0a147a6998108f2e00fa869548c24ce5e70dff860b45108080201a1a0a14315c1cce3760f30b9069926a444f7cdcb43c001a108080401a1a0a14212e7ad9f42a32efa43dd97576bdfb5944b898e9108080601a1b0a1471eca1b9f3646aa3db600afd7072d1caf796392310808080011a1b0a144aacd4d1d3abd15d9cc726bd4202bceb967fb8d9108080a0011a1b0a147379e74c86a195d64c7d24568c6fa17feddc1bef108080c001",
  "source_md5": "20eb595e2e3780b53c8cb21c67f5ab55",
  "source_size": 123456,
  "source_url": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI",
  "status": "finished",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "thumbnail_uri": "https://us-assets.screenlyapp.com/1gs77YJwiBmNg2xfSbtKEI_thumbnail.jpg",
  "title": "My Asset",
  "type": "image",
  "width": 1920
}

Properties

Name Type Required Restrictions Description
app_channel string(text) false none The App channel of the asset. Check out our Edge App examples here.
app_id string(ulid) false none The App ID associated with the asset. Check out our Edge App examples here.
app_installation_id string(ulid) false none The App installation ID of the asset. Check out our Edge App examples here.
app_revision integer(integer) false none The App revision of the asset. Check out our Edge App examples here.
asset_group_id string(ulid) false none The unique identifier of the asset group to which the asset belongs.
asset_url string(text) false none The URL of the asset after it has been processed by Screenly's backend.
created_at string(timestamp with time zone) false none none
disable_verification boolean(boolean) false none Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
duration number(numeric) false none The duration of the asset in seconds. Applicable to Video and Audio assets only.
headers any false none Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
height integer(integer) false none The height of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.
id string(ulid) false none A unique identifier for the asset.
js_injection string(text) false none Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
md5 string(text) false none The MD5 hash of the asset.
metadata any false none This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
mimetype string(text) false none The MIME type of the asset.
processing_error string(text) false none The reason for the processing status being set to error by Screenly's backend.
send_metadata boolean(boolean) false none With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
signature string(text) false none The signature of the asset.
source_md5 string(text) false none The MD5 hash of the source asset.
source_size integer(bigint) false none The size of the source asset in bytes.
source_url string(text) false none The URL of the source asset before it has been processed by Screenly's backend.
status string(enum) false none The processing status of the asset by Screenly's backend. Refer to Enumerated Values for options.
team_id string(ulid) false none The unique identifier of the team to which the asset belongs.
thumbnail_uri string(text) false none The URI of the asset's thumbnail, typically used for previewing. Applicable to Image and Video assets only.
title string(text) false none The title or name of the asset.
type string(enum) false none The type of the asset. Refer to the Enumerated Values for possible options.
width integer(integer) false none The width of the asset in pixels after processing by Screenly's backend. Applicable to Image and Video assets only.

Enumerated Values

Property Value
status none
status downloading
status processing
status error
status finished
status not-promoted
type appweb
type image
type video
type web
type audio
type edge-app
type edge-app-file
type pdf
type pdf-page

assets.update

{
  "asset_group_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "disable_verification": false,
  "headers": {
    "X-My-Header": "My Value"
  },
  "js_injection": "alert('Hello World!');",
  "metadata": {
    "foo": "bar"
  },
  "send_metadata": false,
  "title": "My Asset"
}

Properties

Name Type Required Restrictions Description
asset_group_id string(ulid) false none The unique identifier of the asset group to which the asset belongs.
disable_verification boolean(boolean) false none Flag to disable verification of the asset. Enabling this means ignoring the availability or security of the Web asset.
headers any false none Configure custom headers for web assets, allowing you to include specific headers in HTTP requests when accessing the server hosting the Web content.
js_injection string(text) false none Allows custom JavaScript injection into Web assets. Check out our JS injection examples here.
metadata any false none This field is intended for API users to associate data with the asset. You can use this field to attach custom data.
send_metadata boolean(boolean) false none With this feature enabled, the Screenly player will include Screenly-specific headers in its HTTP requests to the server hosting the Web content.
title string(text) false none The title or name of the asset.

labels.insert

{
  "name": "My Label"
}

Properties

Name Type Required Restrictions Description
name string(text) false none The name of the label.

labels.select

{
  "human_name": "My Label",
  "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "name": "My Label",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "type": "manual"
}

Properties

Name Type Required Restrictions Description
human_name string(text) false none The human-readable name of the label.
id string(ulid) false none A unique identifier for the label.
name string(text) false none The name of the label.
team_id string(ulid) false none The unique identifier of the team to which the label belongs.
type string(enum) false none The type of the label. Refer to Enumerated Values for options.

Enumerated Values

Property Value
type all-screens
type manual
type screen
type virtual
type landscape
type portrait
type full_hd
type uhd
type anywhere

labels.update

{
  "name": "My Label"
}

Properties

Name Type Required Restrictions Description
name string(text) false none The name of the label.

labels_playlists.insert

{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Properties

Name Type Required Restrictions Description
label_id string(ulid) false none The unique identifier of the label.
playlist_id string(ulid) false none The unique identifier of the playlist.

labels_playlists.select

{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Properties

Name Type Required Restrictions Description
label_id string(ulid) false none The unique identifier of the label.
playlist_id string(ulid) false none The unique identifier of the playlist.

labels_screens.insert

{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "screen_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Properties

Name Type Required Restrictions Description
label_id string(ulid) false none The unique identifier of the label.
screen_id string(ulid) false none The unique identifier of the screen.

labels_screens.select

{
  "label_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "screen_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Properties

Name Type Required Restrictions Description
label_id string(ulid) false none The unique identifier of the label.
screen_id string(ulid) false none The unique identifier of the screen.

playlist-items.insert

{
  "asset_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "duration": 10,
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "position": 1
}

Properties

Name Type Required Restrictions Description
asset_id string(ulid) false none A unique identifier for the asset to which the playlist item belongs.
duration number(numeric) false none The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
playlist_id string(ulid) false none A unique identifier for the playlist to which the playlist item belongs.
position integer(bigint) false none The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.

playlist-items.select

{
  "asset_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "duration": 10,
  "effective_duration": 10,
  "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "position": 1
}

Properties

Name Type Required Restrictions Description
asset_id string(ulid) false none A unique identifier for the asset to which the playlist item belongs.
duration number(numeric) false none The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
effective_duration number(numeric) false none The effective duration of the playlist item in seconds, representing the actual duration played on the screen.
id string(ulid) false none A unique identifier for the playlist item.
playlist_id string(ulid) false none A unique identifier for the playlist to which the playlist item belongs.
position integer(bigint) false none The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.

playlist-items.update

{
  "duration": 10,
  "position": 1
}

Properties

Name Type Required Restrictions Description
duration number(numeric) false none The duration of the playlist item in seconds. Relevant for assets without a fixed duration (e.g., video assets).
position integer(bigint) false none The order in which the playlist items will be played. If two playlist items have the same position, they will be ordered by the creation date.

playlists.insert

{
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}

Properties

Name Type Required Restrictions Description
is_enabled boolean(boolean) false none Allows enabling or disabling the playlist.
predicate string(text) false none The predicate of the playlist.
priority boolean(boolean) false none Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
title string(text) false none The title or name of the playlist.
transitions boolean(boolean) false none Slide Transitions enable smooth transitions between your slides.

playlists.select

{
  "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}

Properties

Name Type Required Restrictions Description
id string(ulid) false none A unique identifier for the playlist.
is_enabled boolean(boolean) false none Allows enabling or disabling the playlist.
predicate string(text) false none The predicate of the playlist.
priority boolean(boolean) false none Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
title string(text) false none The title or name of the playlist.
transitions boolean(boolean) false none Slide Transitions enable smooth transitions between your slides.

playlists.update

{
  "is_enabled": true,
  "predicate": "TRUE AND ($DATE >= 1683676800000)",
  "priority": false,
  "title": "My Playlist",
  "transitions": true
}

Properties

Name Type Required Restrictions Description
is_enabled boolean(boolean) false none Allows enabling or disabling the playlist.
predicate string(text) false none The predicate of the playlist.
priority boolean(boolean) false none Use a priority playlist to override all other playlists on screens when it's active. If multiple priority playlists are enabled at once for the same screen, they will all play.
title string(text) false none The title or name of the playlist.
transitions boolean(boolean) false none Slide Transitions enable smooth transitions between your slides.

playlists_shared.insert

{
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Properties

Name Type Required Restrictions Description
playlist_id string(ulid) false none A unique identifier for the playlist that is shared.
team_id string(ulid) false none A unique identifier for the team receiving the shared playlist.

playlists_shared.select

{
  "playlist_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P"
}

Properties

Name Type Required Restrictions Description
playlist_id string(ulid) false none A unique identifier for the playlist that is shared.
team_id string(ulid) false none A unique identifier for the team receiving the shared playlist.

screens.select

{
  "client_version": "screenly-client-armhf-3.4.7-25888a91-x5",
  "config": {
    "audio_output": "hdmi",
    "disable_overscan": 0,
    "display_rotate": 0,
    "framebuffer_height": 0,
    "framebuffer_width": 0,
    "hdmi_boost": 2,
    "hdmi_drive": 0,
    "hdmi_force_hotplug": true,
    "hdmi_group": 0,
    "hdmi_mode": 0,
    "hdmi_pixel_encoding": 0,
    "hdmi_timings": "",
    "overscan_bottom": 0,
    "overscan_left": 0,
    "overscan_right": 0,
    "overscan_scale": 0,
    "overscan_top": 0,
    "play_history_enabled": false,
    "shuffle_playlist": false,
    "use_composite": false,
    "use_composite_ntsc": false,
    "use_composite_pal": false,
    "verify_ssl": true
  },
  "coords": [
    59.329504,
    18.069532
  ],
  "created_at": "2023-05-30T11:19:22+00:00",
  "debug": false,
  "description": "It's a screen that I use for restaurant menus.",
  "hardware_version": "Raspberry Pi 3B+",
  "hostname": "srly-79fjzydx3ye5o8j",
  "id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "in_sync": true,
  "interface": "wlp1s0",
  "is_enabled": true,
  "last_ip": "192.168.1.100",
  "last_ping": "2021-01-01T00:00:00.000Z",
  "last_screenshot_time": "2023-05-30T11:34:52.679+00:00",
  "load_avg": "1.36181640625",
  "local_ip": "192.168.1.100",
  "location": "Gustav Adolfs torg 2, 111 52 Stockholm, Sweden",
  "mac": "00:1a:2b:3c:4d:5e",
  "name": "My Screen",
  "signal_strength": 61,
  "status": "Online",
  "team_id": "01HC9RFEFP1ATEH5ZT5VQMF65P",
  "timezone": "Europe/Stockholm",
  "type": "hardware",
  "uptime": 1125,
  "ws_open": true
}

Properties

Name Type Required Restrictions Description
client_version string(text) false none The client version of the screen.
config any false none Configuration details of the screen.
coords any false none The latitude-longitude coordinate of the screen.
created_at string(timestamp with time zone) false none The creation date of the screen.
debug any false none Debug information related to the screen.
description string(text) false none A description of the screen.
hardware_version string(text) false none The hardware version of the screen.
hostname string(text) false none The hostname of the screen.
id string(ulid) false none A unique identifier for the screen.
in_sync boolean(boolean) false none Indicates if the playlist of the screen is synchronized with the web-console.
interface string(text) false none The network interface name of the screen, as it's seen by the operating system. E.g. wlan0, eth0.
is_enabled boolean(boolean) false none Indicates whether the screen is enabled.
last_ip string(text) false none The last known IP address of the screen.
last_ping string(timestamp with time zone) false none The timestamp of the last ping received from the screen.
last_screenshot_time string(timestamp with time zone) false none The timestamp of the last screenshot taken from the screen.
load_avg string(text) false none The load average of the screen.
local_ip string(character varying) false none The local IP address of the screen.
location string(text) false none Human-readable representation of the location of the screen. Usually - an address.
mac string(character) false none The MAC address of the screen.
name string(text) false none The name of the screen.
signal_strength any false none The signal strength of the wireless network connection, if available.
status string(text) false none The status of the screen.
team_id string(ulid) false none The unique identifier of the team to which the screen belongs.
timezone string(text) false none The time zone of the screen.
type string(enum) false none The type of the screen. Refer to Enumerated Values for options.
uptime integer(integer) false none Time duration in seconds for which the system has been continuously running without a reboot.
ws_open boolean(boolean) false none The WebSocket connection status of the screen.

Enumerated Values

Property Value
type hardware
type virtual
type anywhere