Screenly API v3
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Screenly API for external use
Base URLs:
Authentication
- API Key (Bearer)
- Parameter Name: Authorization, in: header. Bearer authentication is an HTTP authentication scheme that involves security tokens called bearer tokens. The bearer token is a cryptic string, generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources:
Authorization: Token <token>
.
Click here to get your bearer token.
- Parameter Name: Authorization, in: header. Bearer authentication is an HTTP authentication scheme that involves security tokens called bearer tokens. The bearer token is a cryptic string, generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources:
assets
assets_list
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/assets/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/assets/',
headers=headers
)
print(response.json())
GET /assets/
Get Asset List
Get a list of assets. Assets are the content that can be scheduled on screens, such as images, video and web pages.
Example responses
[
{
"id": "01FJXRHS3MNQXNXPNMMPPGTEST",
"url": "/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/",
"type": "web",
"title": "https://www.screenly.io/",
"duration": 10,
"asset_url": "https://www.screenly.io/",
"md5": "skip_md5",
"source_md5": null,
"source_size": null,
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": false,
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"Cookie": "sessionid=5d5ceccb6d387e196d578c6x;"
},
"metadata": {},
"folder_name": "Websites for advertising",
"status": "finished"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Asset |
401 | Unauthorized | You provided invalid credentials. | None |
assets_create
Code samples
curl -X POST \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"source_url": "https://www.screenly.io/", "folder_name": "Websites for advertising", "title": "https://www.screenly.io/", "disable_verification": false, "js_injection": "console.log('Hello World!');"}' \
'https://api.screenlyapp.com/api/v3/assets/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='POST',
url='https://api.screenlyapp.com/api/v3/assets/',
json={'source_url': 'https://www.screenly.io/', 'folder_name': 'Websites for advertising', 'title': 'https://www.screenly.io/', 'disable_verification': False, 'js_injection': "console.log('Hello World!');"},
headers=headers
)
print(response.json())
POST /assets/
Create Asset
Define a new asset by providing a URL to a web page, an image file or a video file. Assets are the content that can be scheduled on screens, such as images, video and web pages.
Body parameter
{
"title": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"js_injection": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssetCreate | true | none |
Example responses
{
"id": "01FJXRHS3MNQXNXPNMMPPGTEST",
"url": "/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/",
"type": "web",
"title": "https://www.screenly.io/",
"duration": 10,
"asset_url": "https://www.screenly.io/",
"md5": "skip_md5",
"source_md5": null,
"source_size": null,
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": false,
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"Cookie": "sessionid=5d5ceccb6d387e196d578c6x;"
},
"metadata": {},
"folder_name": "Websites for advertising",
"status": "finished"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | Asset |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
assets_upload
Code samples
# You can also use wget
curl -X POST https://api.screenlyapp.com/api/v3/assets/upload/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
POST https://api.screenlyapp.com/api/v3/assets/upload/ HTTP/1.1
Host: api.screenlyapp.com
Content-Type: application/json
Accept: application/json
const inputBody = '{
"title": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"js_injection": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/assets/upload/',
{
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',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://api.screenlyapp.com/api/v3/assets/upload/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://api.screenlyapp.com/api/v3/assets/upload/', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.screenlyapp.com/api/v3/assets/upload/', 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/api/v3/assets/upload/");
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"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.screenlyapp.com/api/v3/assets/upload/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /assets/upload/
Body parameter
{
"title": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"js_injection": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssetCreate | true | none |
Example responses
201 Response
{
"id": "string",
"url": "string",
"type": "audio",
"title": "string",
"duration": 0,
"asset_url": "string",
"md5": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"status": "none",
"js_injection": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | AssetCreate |
assets_read
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/assets/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/assets/{id}/',
headers=headers
)
print(response.json())
GET /assets/{id}/
Get Asset
Get the details of a specific asset. Assets are the content that can be scheduled on screens, such as images, video and web pages.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Example responses
{
"id": "01FJXRHS3MNQXNXPNMMPPGTEST",
"url": "/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/",
"type": "web",
"title": "https://www.screenly.io/",
"duration": 10,
"asset_url": "https://www.screenly.io/",
"md5": "skip_md5",
"source_md5": null,
"source_size": null,
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": false,
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"Cookie": "sessionid=5d5ceccb6d387e196d578c6x;"
},
"metadata": {},
"folder_name": "Websites for advertising",
"status": "finished"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Asset |
401 | Unauthorized | You provided invalid credentials. | None |
assets_update
Code samples
curl -X PUT \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"id": "01FJXRHS3MNQXNXPNMMPPGTEST", "url": "/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/", "type": "web", "title": "https://www.screenly.io/", "duration": 10.0, "asset_url": "https://www.screenly.io/", "md5": "skip_md5", "source_md5": null, "source_size": null, "finalized": true, "width": 0, "height": 0, "disable_verification": false, "headers": {"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1", "Cookie": "sessionid=5d5ceccb6d387e196d578c6x;"}, "metadata": {}, "folder_name": "Websites for advertising", "status": "finished", "js_injection": "console.log('Hello World!');"}' \
'https://api.screenlyapp.com/api/v3/assets/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PUT',
url='https://api.screenlyapp.com/api/v3/assets/{id}/',
json={'id': '01FJXRHS3MNQXNXPNMMPPGTEST', 'url': '/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/', 'type': 'web', 'title': 'https://www.screenly.io/', 'duration': 10.0, 'asset_url': 'https://www.screenly.io/', 'md5': 'skip_md5', 'source_md5': None, 'source_size': None, 'finalized': True, 'width': 0, 'height': 0, 'disable_verification': False, 'headers': {'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1', 'Cookie': 'sessionid=5d5ceccb6d387e196d578c6x;'}, 'metadata': {}, 'folder_name': 'Websites for advertising', 'status': 'finished', 'js_injection': "console.log('Hello World!');"},
headers=headers
)
print(response.json())
PUT /assets/{id}/
Update Asset
Change an asset. Assets are the content that can be scheduled on screens, such as images, video and web pages.
Body parameter
{
"title": "string",
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"js_injection": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssetUpdate | true | none |
id | path | string | true | none |
Example responses
{
"id": "01FJXRHS3MNQXNXPNMMPPGTEST",
"url": "/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/",
"type": "web",
"title": "https://www.screenly.io/",
"duration": 10,
"asset_url": "https://www.screenly.io/",
"md5": "skip_md5",
"source_md5": null,
"source_size": null,
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": false,
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"Cookie": "sessionid=5d5ceccb6d387e196d578c6x;"
},
"metadata": {},
"folder_name": "Websites for advertising",
"status": "finished"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Asset |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
assets_partial_update
Code samples
curl -X PATCH \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"folder_name": "Websites for advertising", "title": "https://www.screenly.io/", "js_injection": "console.log('Hello World!');"}' \
'https://api.screenlyapp.com/api/v3/assets/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PATCH',
url='https://api.screenlyapp.com/api/v3/assets/{id}/',
json={'folder_name': 'Websites for advertising', 'title': 'https://www.screenly.io/', 'js_injection': "console.log('Hello World!');"},
headers=headers
)
print(response.json())
PATCH /assets/{id}/
Update Asset Partially
Change specific fields of an asset. Assets are the content that can be scheduled on screens, such as images, video and web pages.
Body parameter
{
"title": "string",
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"js_injection": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssetUpdate | true | none |
id | path | string | true | none |
Example responses
{
"id": "01FJXRHS3MNQXNXPNMMPPGTEST",
"url": "/api/v3/assets/01FJXRHS3MNQXNXPNMMPPGTEST/",
"type": "web",
"title": "https://www.screenly.io/",
"duration": 10,
"asset_url": "https://www.screenly.io/",
"md5": "skip_md5",
"source_md5": null,
"source_size": null,
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": false,
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
"Cookie": "sessionid=5d5ceccb6d387e196d578c6x;"
},
"metadata": {},
"folder_name": "Websites for advertising",
"status": "finished"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Asset |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
assets_delete
Code samples
curl -X DELETE \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/assets/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='DELETE',
url='https://api.screenlyapp.com/api/v3/assets/{id}/',
headers=headers
)
print(response.json())
DELETE /assets/{id}/
Delete Asset
Delete a specific asset. Assets are the content that can be scheduled on screens, such as images, video and web pages.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
401 | Unauthorized | You provided invalid credentials. | None |
assets_screenshot
Code samples
# You can also use wget
curl -X GET https://api.screenlyapp.com/api/v3/assets/{id}/capture/ \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
GET https://api.screenlyapp.com/api/v3/assets/{id}/capture/ HTTP/1.1
Host: api.screenlyapp.com
Accept: application/json
const headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/assets/{id}/capture/',
{
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',
'Authorization' => 'API_KEY'
}
result = RestClient.get 'https://api.screenlyapp.com/api/v3/assets/{id}/capture/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.get('https://api.screenlyapp.com/api/v3/assets/{id}/capture/', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.screenlyapp.com/api/v3/assets/{id}/capture/', 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/api/v3/assets/{id}/capture/");
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"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.screenlyapp.com/api/v3/assets/{id}/capture/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /assets/{id}/capture/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Example responses
200 Response
{
"id": "string",
"url": "string",
"type": "audio",
"title": "string",
"duration": 0,
"asset_url": "string",
"md5": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"status": "none"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Asset |
groups
groups_list
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/groups/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/groups/',
headers=headers
)
print(response.json())
GET /groups/
Get Group List
Get a list of groups. Groups are used to associate screens and can be used to schedule playlists on them.
Example responses
[
{
"url": "/api/v3/groups/all-screens/",
"screens": [
{
"coords": [
48.852253,
2.351276
],
"id": "597077272aeda0002a02b5bc",
"name": "Notre Dame"
},
{
"coords": [
48.858544,
2.294205
],
"id": "5f436b3ace8f09002d758fcc",
"name": "La Tour Eiffel"
},
{
"coords": [
48.873759,
2.294945
],
"id": "597077272aeda0002a02b5cd",
"name": "Arc de Triomphe"
},
{
"coords": [
59.329504,
18.069532
],
"id": "5f436b3ace8f09002d758fcd",
"name": "Stockholm Opera"
},
{
"coords": [
0,
0
],
"id": "5f436b3ace8f09002d758fd8",
"name": "New screen"
}
],
"id": "all-screens",
"name": "All Screens"
},
{
"url": "/api/v3/groups/5f436b3b019b03002a358efd/",
"screens": [
{
"coords": [
0,
0
],
"id": "5f436b3ace8f09002d758fd8",
"name": "New screen"
}
],
"id": "5f436b3b019b03002a358efd",
"name": "Group 1"
},
{
"url": "/api/v3/groups/5f436b3b019b030028358efd/",
"screens": [
{
"coords": [
0,
0
],
"id": "5f436b3ace8f09002d758fd8",
"name": "New screen"
}
],
"id": "5f436b3b019b030028358efd",
"name": "Group 2"
},
{
"url": "/api/v3/groups/5f436b3ace8f09002d758fd0/",
"screens": [
{
"coords": [
48.852253,
2.351276
],
"id": "597077272aeda0002a02b5bc",
"name": "Notre Dame"
},
{
"coords": [
48.858544,
2.294205
],
"id": "5f436b3ace8f09002d758fcc",
"name": "La Tour Eiffel"
}
],
"id": "5f436b3ace8f09002d758fd0",
"name": "Group A"
},
{
"url": "/api/v3/groups/5f436b3ace8f09002d758fd1/",
"screens": [
{
"coords": [
48.873759,
2.294945
],
"id": "597077272aeda0002a02b5cd",
"name": "Arc de Triomphe"
},
{
"coords": [
59.329504,
18.069532
],
"id": "5f436b3ace8f09002d758fcd",
"name": "Stockholm Opera"
}
],
"id": "5f436b3ace8f09002d758fd1",
"name": "Group B"
},
{
"url": "/api/v3/groups/5f436b3ace8f09002d758fce/",
"screens": [
{
"coords": [
48.852253,
2.351276
],
"id": "597077272aeda0002a02b5bc",
"name": "Notre Dame"
},
{
"coords": [
48.873759,
2.294945
],
"id": "597077272aeda0002a02b5cd",
"name": "Arc de Triomphe"
},
{
"coords": [
48.858544,
2.294205
],
"id": "5f436b3ace8f09002d758fcc",
"name": "La Tour Eiffel"
}
],
"id": "5f436b3ace8f09002d758fce",
"name": "Paris"
},
{
"url": "/api/v3/groups/5f436b3ace8f09002d758fd2/",
"screens": [
{
"coords": [
59.329504,
18.069532
],
"id": "5f436b3ace8f09002d758fcd",
"name": "Stockholm Opera"
}
],
"id": "5f436b3ace8f09002d758fd2",
"name": "Really long group name, just to be sure"
},
{
"url": "/api/v3/groups/5f436b3ace8f09002d758fcf/",
"screens": [
{
"coords": [
59.329504,
18.069532
],
"id": "5f436b3ace8f09002d758fcd",
"name": "Stockholm Opera"
}
],
"id": "5f436b3ace8f09002d758fcf",
"name": "Stockholm"
},
{
"url": "/api/v3/groups/5f436b3ace8f09002d758fd3/",
"screens": [
{
"coords": [
48.873759,
2.294945
],
"id": "597077272aeda0002a02b5cd",
"name": "Arc de Triomphe"
},
{
"coords": [
59.329504,
18.069532
],
"id": "5f436b3ace8f09002d758fcd",
"name": "Stockholm Opera"
}
],
"id": "5f436b3ace8f09002d758fd3",
"name": "✂«☕➔➹➼☧"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | GroupRead |
401 | Unauthorized | You provided invalid credentials. | None |
groups_create
Code samples
curl -X POST \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"name": "Group of fast food screens", "screens": [{"id": "5f4291c94e3278002862e5ff"}]}' \
'https://api.screenlyapp.com/api/v3/groups/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='POST',
url='https://api.screenlyapp.com/api/v3/groups/',
json={'name': 'Group of fast food screens', 'screens': [{'id': '5f4291c94e3278002862e5ff'}]},
headers=headers
)
print(response.json())
POST /groups/
Create Group
Define a new group. Groups are used to associate screens and can be used to schedule playlists on them.
Body parameter
{
"name": "New Group",
"screens": []
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | GroupWrite | true | none |
Example responses
{
"url": "/api/v3/groups/5f4291c94e3278002862e5ff/",
"screens": [
{
"coords": [
0,
0
],
"id": "5f4291c885addd002d0200b6",
"name": "New screen"
}
],
"id": "5f4291c94e3278002862e5ff",
"name": "Group of fast food screens"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | GroupRead |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
groups_read
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/groups/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/groups/{id}/',
headers=headers
)
print(response.json())
GET /groups/{id}/
Get Group
Get the details of a specific group. Groups are used to associate screens and can be used to schedule playlists on them.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Example responses
{
"url": "/api/v3/groups/5f4291c94e3278002862e5ff/",
"screens": [
{
"coords": [
0,
0
],
"id": "5f4291c885addd002d0200b6",
"name": "New screen"
}
],
"id": "5f4291c94e3278002862e5ff",
"name": "Group of fast food screens"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | GroupRead |
401 | Unauthorized | You provided invalid credentials. | None |
groups_update
Code samples
curl -X PUT \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"screens": [], "name": "Empty group"}' \
'https://api.screenlyapp.com/api/v3/groups/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PUT',
url='https://api.screenlyapp.com/api/v3/groups/{id}/',
json={'screens': [], 'name': 'Empty group'},
headers=headers
)
print(response.json())
PUT /groups/{id}/
Update Group
Change a group. Groups are used to associate screens and can be used to schedule playlists on them.
Body parameter
{
"name": "New Group",
"screens": []
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | GroupWrite | true | none |
id | path | string | true | none |
Example responses
{
"url": "/api/v3/groups/5f4291c94e3278002862e5ff/",
"screens": [],
"id": "5f4291c94e3278002862e5ff",
"name": "Empty group"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | GroupRead |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
groups_partial_update
Code samples
curl -X PATCH \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"screens": [{"coords": [0.0, 0.0], "id": "5f4291c885addd002d0200b6", "name": "New screen"}], "name": "Group of some screens"}' \
'https://api.screenlyapp.com/api/v3/groups/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PATCH',
url='https://api.screenlyapp.com/api/v3/groups/{id}/',
json={'screens': [{'coords': [0.0, 0.0], 'id': '5f4291c885addd002d0200b6', 'name': 'New screen'}], 'name': 'Group of some screens'},
headers=headers
)
print(response.json())
PATCH /groups/{id}/
Update Group Partially
Change specific fields of a group. Groups are used to associate screens and can be used to schedule playlists on them.
Body parameter
{
"name": "New Group",
"screens": []
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | GroupWrite | true | none |
id | path | string | true | none |
Example responses
{
"url": "/api/v3/groups/5f4291c94e3278002862e5ff/",
"screens": [
{
"coords": [
0,
0
],
"id": "5f4291c885addd002d0200b6",
"name": "New screen"
}
],
"id": "5f4291c94e3278002862e5ff",
"name": "Group of some screens"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | GroupRead |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
groups_delete
Code samples
curl -X DELETE \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/groups/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='DELETE',
url='https://api.screenlyapp.com/api/v3/groups/{id}/',
headers=headers
)
print(response.json())
DELETE /groups/{id}/
Delete Group
Delete a specific group. Groups are used to associate screens and can be used to schedule playlists on them.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
401 | Unauthorized | You provided invalid credentials. | None |
playlists
playlists_list
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/playlists/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/playlists/',
headers=headers
)
print(response.json())
GET /playlists/
Get Playlist List
Get a list of playlists. Playlists describe what assets to display and when. Once a playlist has been defined it can be scheduled on groups of screens.
Example responses
[
{
"is_enabled": true,
"priority": 0,
"predicate": "TRUE AND ($DATE >= 0) AND ($DATE <= 4102444800000)",
"groups": [
{
"url": "/api/v3/groups/all_screens/",
"id": "all_screens",
"name": "All Screens"
}
],
"title": "Play on All Screens",
"url": "/api/v3/playlists/all-screens/",
"duration": 0,
"id": "all-screens"
},
{
"is_enabled": true,
"predicate": "TRUE",
"title": "Test playlist 1",
"url": "/api/v3/playlists/5f3fcec66db0cd002837c5ca/",
"priority": 0,
"groups": [],
"duration": 0,
"id": "5f3fcec66db0cd002837c5ca"
},
{
"is_enabled": true,
"predicate": "TRUE",
"title": "Test playlist 2",
"url": "/api/v3/playlists/5f3fcec66db0cd002837c5ca/",
"priority": 0,
"groups": [],
"duration": 0,
"id": "5f3fcec66db0cd002837c5ca"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PlaylistListRead |
401 | Unauthorized | You provided invalid credentials. | None |
playlists_create
Code samples
curl -X POST \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"title": "Test playlist"}' \
'https://api.screenlyapp.com/api/v3/playlists/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='POST',
url='https://api.screenlyapp.com/api/v3/playlists/',
json={'title': 'Test playlist'},
headers=headers
)
print(response.json())
POST /playlists/
Create Playlist
Define a new playlist. Playlists describe what assets to display and when. Once a playlist has been defined it can be scheduled on groups of screens.
Body parameter
{
"assets": [],
"groups": [],
"predicate": "TRUE",
"title": "New",
"is_enabled": true,
"priority": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | PlaylistWrite | true | none |
Example responses
{
"is_enabled": true,
"predicate": "TRUE",
"assets": [],
"title": "Test playlist",
"url": "/api/v3/playlists/5f3fcec66db0cd002837c5ca/",
"priority": 0,
"groups": [],
"duration": 0,
"id": "5f3fcec66db0cd002837c5ca"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | PlaylistRead |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
playlists_read
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/playlists/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/playlists/{id}/',
headers=headers
)
print(response.json())
GET /playlists/{id}/
Get Playlist
Get the details of a specific playlist. Playlists describe what assets to display and when. Once a playlist has been defined it can be scheduled on groups of screens.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Example responses
{
"is_enabled": true,
"predicate": "TRUE",
"assets": [],
"title": "Test playlist",
"url": "/api/v3/playlists/5f3fcec66db0cd002837c5ca/",
"priority": 0,
"groups": [],
"duration": 0,
"id": "5f3fcec66db0cd002837c5ca"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PlaylistRead |
401 | Unauthorized | You provided invalid credentials. | None |
playlists_update
Code samples
curl -X PUT \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"title": "Test playlist"}' \
'https://api.screenlyapp.com/api/v3/playlists/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PUT',
url='https://api.screenlyapp.com/api/v3/playlists/{id}/',
json={'title': 'Test playlist'},
headers=headers
)
print(response.json())
PUT /playlists/{id}/
Update Playlist
Change a playlist. Playlists describe what assets to display and when. Once a playlist has been defined it can be scheduled on groups of screens.
Body parameter
{
"assets": [],
"groups": [],
"predicate": "TRUE",
"title": "New",
"is_enabled": true,
"priority": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | PlaylistWrite | true | none |
id | path | string | true | none |
Example responses
{
"is_enabled": true,
"predicate": "TRUE",
"assets": [],
"title": "New playlist name",
"url": "/api/v3/playlists/5f3fcec66db0cd002837c5ca/",
"priority": 0,
"groups": [],
"duration": 0,
"id": "5f3fcec66db0cd002837c5ca"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PlaylistRead |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
playlists_partial_update
Code samples
curl -X PATCH \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"title": "New playlist name"}' \
'https://api.screenlyapp.com/api/v3/playlists/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PATCH',
url='https://api.screenlyapp.com/api/v3/playlists/{id}/',
json={'title': 'New playlist name'},
headers=headers
)
print(response.json())
PATCH /playlists/{id}/
Update Playlist Partially
Change specific fields of a playlist. Playlists describe what assets to display and when. Once a playlist has been defined it can be scheduled on groups of screens.
Body parameter
{
"assets": [],
"groups": [],
"predicate": "TRUE",
"title": "New",
"is_enabled": true,
"priority": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | PlaylistWrite | true | none |
id | path | string | true | none |
Example responses
{
"is_enabled": true,
"predicate": "TRUE",
"assets": [],
"title": "New playlist name",
"url": "/api/v3/playlists/5f3fcec66db0cd002837c5ca/",
"priority": 0,
"groups": [],
"duration": 0,
"id": "5f3fcec66db0cd002837c5ca"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PlaylistRead |
401 | Unauthorized | You provided invalid credentials. | None |
playlists_delete
Code samples
curl -X DELETE \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/playlists/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='DELETE',
url='https://api.screenlyapp.com/api/v3/playlists/{id}/',
headers=headers
)
print(response.json())
DELETE /playlists/{id}/
Delete Playlist
Delete a specific playlist. Playlists describe what assets to display and when. Once a playlist has been defined it can be scheduled on groups of screens.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
401 | Unauthorized | You provided invalid credentials. | None |
predicate-validation
predicate-validation_create
Code samples
# You can also use wget
curl -X POST https://api.screenlyapp.com/api/v3/predicate-validation \
-H 'Authorization: API_KEY'
POST https://api.screenlyapp.com/api/v3/predicate-validation HTTP/1.1
Host: api.screenlyapp.com
const headers = {
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/predicate-validation',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://api.screenlyapp.com/api/v3/predicate-validation',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'API_KEY'
}
r = requests.post('https://api.screenlyapp.com/api/v3/predicate-validation', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.screenlyapp.com/api/v3/predicate-validation', 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/api/v3/predicate-validation");
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{
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.screenlyapp.com/api/v3/predicate-validation", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /predicate-validation
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | None |
screens
screens_list
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/screens/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/screens/',
headers=headers
)
print(response.json())
GET /screens/
Get Screen List
Get a list of screens. Screens are a representation of the physical device running Screenly software.
Example responses
[
{
"id": "01DQ0KJT300007KJAK074WGTBD",
"in_sync": false,
"status": "Offline",
"type": "hardware",
"coords": [
0,
0
],
"is_enabled": true,
"last_ping": "2020-05-21T19:58:52",
"groups": [
{
"id": "all_screens",
"url": "/api/v3/groups/all_screens/",
"name": "All Screens"
}
],
"name": "My Screen",
"last_screenshot": "last_screenshot.png"
},
{
"id": "01DQ0KJT300007KJAK074WGTBE",
"in_sync": false,
"last_ping": null,
"status": "Offline",
"coords": [
0,
0
],
"type": "hardware",
"is_enabled": true,
"groups": [
{
"id": "all_screens",
"url": "/api/v3/groups/all_screens/",
"name": "All Screens"
}
],
"name": "My Screen",
"last_screenshot": "last_screenshot.png"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ScreenEndpoint |
401 | Unauthorized | You provided invalid credentials. | None |
screens_create
Code samples
curl -X POST \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"pin": "012345", "name": "My Screen"}' \
'https://api.screenlyapp.com/api/v3/screens/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='POST',
url='https://api.screenlyapp.com/api/v3/screens/',
json={'pin': '012345', 'name': 'My Screen'},
headers=headers
)
print(response.json())
POST /screens/
Create Screen
Create new screen. Screens are a representation of the physical device running Screenly software.
Body parameter
{
"pin": "string",
"name": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ScreenCreate | true | none |
Example responses
{
"id": "01ANCN7K4000005MYH0C84HXXD",
"in_sync": false,
"last_ping": null,
"status": "Offline",
"type": "hardware",
"is_enabled": true,
"coords": [
-33.925278,
18.423889
],
"groups": [
{
"id": "all_screens",
"url": "/api/v3/groups/all_screens/",
"name": "All Screens"
},
{
"id": "01ANCPFHF000005MYH0E5BR0DN",
"url": "/api/v3/groups/01ANCPFHF000005MYH0E5BR0DN/",
"name": "Beta Group"
},
{
"id": "01ANCPFGF000005MYH0E5BR0DM",
"url": "/api/v3/groups/01ANCPFGF000005MYH0E5BR0DM/",
"name": "Bronze Group"
}
],
"name": "New Screen",
"last_screenshot": "http://localhost",
"hostname": "bronze0.screenly.local",
"last_ip": "N/A",
"local_ip": "",
"mac": "",
"last_screenshot_time": null,
"location": "Cape Town",
"timezone": "UTC",
"uptime": "N/A",
"hardware_version": "Screenly Player",
"software_version": "",
"load_avg": "N/A",
"ws_open": false,
"team": "01ANCN7K4000005MYH0C84HXXB"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | ScreenDetailed |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
screens_playlist_list
Code samples
# You can also use wget
curl -X GET https://api.screenlyapp.com/api/v3/screens/playlist \
-H 'Authorization: API_KEY'
GET https://api.screenlyapp.com/api/v3/screens/playlist HTTP/1.1
Host: api.screenlyapp.com
const headers = {
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/screens/playlist',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'API_KEY'
}
result = RestClient.get 'https://api.screenlyapp.com/api/v3/screens/playlist',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'API_KEY'
}
r = requests.get('https://api.screenlyapp.com/api/v3/screens/playlist', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.screenlyapp.com/api/v3/screens/playlist', 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/api/v3/screens/playlist");
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{
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.screenlyapp.com/api/v3/screens/playlist", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /screens/playlist
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
screens_playlist_partial_update
Code samples
# You can also use wget
curl -X PATCH https://api.screenlyapp.com/api/v3/screens/playlist \
-H 'Authorization: API_KEY'
PATCH https://api.screenlyapp.com/api/v3/screens/playlist HTTP/1.1
Host: api.screenlyapp.com
const headers = {
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/screens/playlist',
{
method: 'PATCH',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'API_KEY'
}
result = RestClient.patch 'https://api.screenlyapp.com/api/v3/screens/playlist',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'API_KEY'
}
r = requests.patch('https://api.screenlyapp.com/api/v3/screens/playlist', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('PATCH','https://api.screenlyapp.com/api/v3/screens/playlist', 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/api/v3/screens/playlist");
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{
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PATCH", "https://api.screenlyapp.com/api/v3/screens/playlist", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PATCH /screens/playlist
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
screens_upload
Code samples
# You can also use wget
curl -X POST https://api.screenlyapp.com/api/v3/screens/upload/ \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
POST https://api.screenlyapp.com/api/v3/screens/upload/ HTTP/1.1
Host: api.screenlyapp.com
Content-Type: multipart/form-data
Accept: application/json
const inputBody = '{
"pin": "string",
"name": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/screens/upload/',
{
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' => 'multipart/form-data',
'Accept' => 'application/json',
'Authorization' => 'API_KEY'
}
result = RestClient.post 'https://api.screenlyapp.com/api/v3/screens/upload/',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'Authorization': 'API_KEY'
}
r = requests.post('https://api.screenlyapp.com/api/v3/screens/upload/', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.screenlyapp.com/api/v3/screens/upload/', 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/api/v3/screens/upload/");
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{"multipart/form-data"},
"Accept": []string{"application/json"},
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.screenlyapp.com/api/v3/screens/upload/", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /screens/upload/
Body parameter
pin: string
name: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | none |
» pin | body | string | true | Pin code created with registrations endpoint |
» name | body | string | false | Name of the new screen |
Example responses
201 Response
{
"pin": "string",
"name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | none | ScreenCreate |
screens_read
Code samples
curl -X GET \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/screens/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='GET',
url='https://api.screenlyapp.com/api/v3/screens/{id}/',
headers=headers
)
print(response.json())
GET /screens/{id}/
Get Screen
Get the details of a specific screen. Screens are a representation of the physical device running Screenly software.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Example responses
{
"id": "01ANCN7K4000005MYH0C84HXXD",
"in_sync": false,
"last_ping": null,
"status": "Offline",
"type": "hardware",
"is_enabled": true,
"coords": [
-33.925278,
18.423889
],
"groups": [
{
"id": "all_screens",
"url": "/api/v3/groups/all_screens/",
"name": "All Screens"
},
{
"id": "01ANCPFHF000005MYH0E5BR0DN",
"url": "/api/v3/groups/01ANCPFHF000005MYH0E5BR0DN/",
"name": "Beta Group"
},
{
"id": "01ANCPFGF000005MYH0E5BR0DM",
"url": "/api/v3/groups/01ANCPFGF000005MYH0E5BR0DM/",
"name": "Bronze Group"
}
],
"name": "New Screen",
"last_screenshot": "http://localhost",
"hostname": "bronze0.screenly.local",
"last_ip": "N/A",
"local_ip": "",
"mac": "",
"last_screenshot_time": null,
"location": "Cape Town",
"timezone": "UTC",
"uptime": "N/A",
"hardware_version": "Screenly Player",
"software_version": "",
"load_avg": "N/A",
"ws_open": false,
"team": "01ANCN7K4000005MYH0C84HXXB"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ScreenDetailed |
401 | Unauthorized | You provided invalid credentials. | None |
screens_update
Code samples
curl -X PUT \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
-d '{"id": "01ANCN7K4000005MYH0C84HXXD", "in_sync": false, "last_ping": "", "status": "Offline", "type": "hardware", "is_enabled": true, "coords": [-33.925278, 18.423889], "groups": [{"id": "all_screens", "url": "/api/v3/groups/all_screens/", "name": "All Screens"}, {"id": "01ANCPFHF000005MYH0E5BR0DN", "url": "/api/v3/groups/01ANCPFHF000005MYH0E5BR0DN/", "name": "Beta Group"}, {"id": "01ANCPFGF000005MYH0E5BR0DM", "url": "/api/v3/groups/01ANCPFGF000005MYH0E5BR0DM/", "name": "Bronze Group"}], "name": "New Screen", "last_screenshot": "http://localhost", "hostname": "bronze0.screenly.local", "last_ip": "N/A", "local_ip": "", "mac": "", "last_screenshot_time": "", "location": "Cape Town", "timezone": "UTC", "uptime": "N/A", "hardware_version": "Screenly Player", "software_version": "", "load_avg": "N/A", "ws_open": false, "team": "01ANCN7K4000005MYH0C84HXXB"}' \
'https://api.screenlyapp.com/api/v3/screens/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='PUT',
url='https://api.screenlyapp.com/api/v3/screens/{id}/',
json={'id': '01ANCN7K4000005MYH0C84HXXD', 'in_sync': False, 'last_ping': '', 'status': 'Offline', 'type': 'hardware', 'is_enabled': True, 'coords': [-33.925278, 18.423889], 'groups': [{'id': 'all_screens', 'url': '/api/v3/groups/all_screens/', 'name': 'All Screens'}, {'id': '01ANCPFHF000005MYH0E5BR0DN', 'url': '/api/v3/groups/01ANCPFHF000005MYH0E5BR0DN/', 'name': 'Beta Group'}, {'id': '01ANCPFGF000005MYH0E5BR0DM', 'url': '/api/v3/groups/01ANCPFGF000005MYH0E5BR0DM/', 'name': 'Bronze Group'}], 'name': 'New Screen', 'last_screenshot': 'http://localhost', 'hostname': 'bronze0.screenly.local', 'last_ip': 'N/A', 'local_ip': '', 'mac': '', 'last_screenshot_time': '', 'location': 'Cape Town', 'timezone': 'UTC', 'uptime': 'N/A', 'hardware_version': 'Screenly Player', 'software_version': '', 'load_avg': 'N/A', 'ws_open': False, 'team': '01ANCN7K4000005MYH0C84HXXB'},
headers=headers
)
print(response.json())
PUT /screens/{id}/
Update Screen
Change a screen. Screens are a representation of the physical device running Screenly software.
Body parameter
{
"in_sync": true,
"last_ping": "string",
"status": "string",
"type": "string",
"is_enabled": true,
"coords": [
0
],
"groups": [
{
"id": "string"
}
],
"name": "string",
"last_screenshot": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ScreenEndpoint | true | none |
id | path | string | true | none |
Example responses
{
"in_sync": false,
"last_ping": "",
"status": "Offline",
"type": "hardware",
"enabled": true,
"coords": [
-33.925278,
18.423889
],
"groups": [
{
"_id": "all-screens"
},
{
"_id": "01ANCPFHF000005MYH0E5BR0DN"
},
{
"_id": "01ANCPFGF000005MYH0E5BR0DM"
}
],
"name": "New Screen1",
"last_screenshot": "http://localhost",
"hostname": "bronze0.screenly.local",
"last_ip": "N/A",
"local_ip": "",
"mac": "",
"last_screenshot_time": "",
"location": "Cape Town",
"timezone": "UTC",
"uptime": "N/A",
"hardware_version": "Screenly Player",
"software_version": "",
"load_avg": "N/A",
"ws_open": false,
"org": "01ANCN7K4000005MYH0C84HXXB"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ScreenDetailed |
400 | Bad Request | You sent a malformed or bad request. | None |
401 | Unauthorized | You provided invalid credentials. | None |
screens_delete
Code samples
curl -X DELETE \
-H 'Authorization: Token {token}' \
-H 'Content-Type: application/json' \
'https://api.screenlyapp.com/api/v3/screens/{id}/'
import requests
headers = {
"Authorization": "Token {token}",
"Content-Type": "application/json"
}
response = requests.request(
method='DELETE',
url='https://api.screenlyapp.com/api/v3/screens/{id}/',
headers=headers
)
print(response.json())
DELETE /screens/{id}/
Delete Screen
Delete a specific screen. Screens are a representation of the physical device running Screenly software.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
401 | Unauthorized | You provided invalid credentials. | None |
screens_active-playlist-items_list
Code samples
# You can also use wget
curl -X GET https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-playlist-items \
-H 'Authorization: API_KEY'
GET https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-playlist-items HTTP/1.1
Host: api.screenlyapp.com
const headers = {
'Authorization':'API_KEY'
};
fetch('https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-playlist-items',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'API_KEY'
}
result = RestClient.get 'https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-playlist-items',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'API_KEY'
}
r = requests.get('https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-playlist-items', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Authorization' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-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/api/v3/screens/{screen_id}/active-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{
"Authorization": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.screenlyapp.com/api/v3/screens/{screen_id}/active-playlist-items", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /screens/{screen_id}/active-playlist-items
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
screen_id | path | string | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | None |
Schemas
Asset
{
"id": "string",
"url": "string",
"type": "audio",
"title": "string",
"duration": 0,
"asset_url": "string",
"md5": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"status": "none"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Unique ID of the asset |
url | string | false | read-only | This is API URL of this asset in the following form: /v3/assets/ |
type | string¦null | false | read-only | Type of the asset. Web, video and images are supported. |
title | string | false | none | Title of the asset. |
duration | number¦null | false | read-only | Duration of the asset. For videos it is equal to the duration of the whole video. For web and images this field is unused - duration of the playback is controlled by the playlist. |
asset_url | string | false | read-only | none |
md5 | string | false | read-only | MD5 checksum of the asset. |
source_md5 | string¦null | false | read-only | MD5 checksum of the original source file. |
source_size | integer | false | read-only | Size of the original source file in bytes. |
source_url | string¦null | false | read-only | URL of the original source file. |
finalized | boolean | false | read-only | Indicates whether processing of the asset is finalized or not. |
width | integer | false | read-only | Width of the asset. |
height | integer | false | read-only | Height of the asset. |
disable_verification | boolean | false | none | Disables HTTPS verification when set to true. |
folder_name | string | false | none | Name of the folder the asset is located in. |
headers | object | false | none | HTTP headers for web assets. |
» additionalProperties | string¦null | false | none | none |
metadata | object | false | none | A key-value user-defined store for an asset. {"meta_1": "meta_1 data", "meta_2": "meta_2 data"} |
» additionalProperties | string¦null | false | none | none |
status | string | false | read-only | Indicates the current status of the asset processing |
Enumerated Values
Property | Value |
---|---|
type | audio |
type | edge-app |
type | edge-app-file |
type | image |
type | |
type | pdf-page |
type | video |
type | web |
status | none |
status | downloading |
status | processing |
status | error |
status | finished |
status | not-promoted |
AssetCreate
{
"id": "string",
"url": "string",
"type": "audio",
"title": "string",
"duration": 0,
"asset_url": "string",
"md5": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"status": "none",
"js_injection": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Unique ID of the asset |
url | string | false | read-only | This is API URL of this asset in the following form: /v3/assets/ |
type | string¦null | false | read-only | Type of the asset. Web, video and images are supported. |
title | string | false | none | Title of the asset. |
duration | number¦null | false | read-only | Duration of the asset. For videos it is equal to the duration of the whole video. For web and images this field is unused - duration of the playback is controlled by the playlist. |
asset_url | string | false | read-only | none |
md5 | string | false | read-only | MD5 checksum of the asset. |
source_md5 | string¦null | false | none | MD5 checksum of the original source file. |
source_size | integer¦null | false | none | Size of the original source file in bytes. |
source_url | string | true | none | URL of the original source file. The field can be omitted when uploading a file directly. |
finalized | boolean | false | read-only | Indicates whether processing of the asset is finalized or not. |
width | integer | false | read-only | Width of the asset. |
height | integer | false | read-only | Height of the asset. |
disable_verification | boolean | false | none | Disables HTTPS verification when set to true. |
folder_name | string | false | none | Name of the folder the asset is located in. |
headers | object | false | none | HTTP headers for web assets. |
» additionalProperties | string¦null | false | none | none |
metadata | object | false | none | A key-value user-defined store for an asset. {"meta_1": "meta_1 data", "meta_2": "meta_2 data"} |
» additionalProperties | string¦null | false | none | none |
status | string | false | read-only | Indicates the current status of the asset processing |
js_injection | string | false | none | Custom js code, running when asset is loaded. See examples on: https://github.com/Screenly/playground/tree/master/javascript-injectors/ |
Enumerated Values
Property | Value |
---|---|
type | audio |
type | edge-app |
type | edge-app-file |
type | image |
type | |
type | pdf-page |
type | video |
type | web |
status | none |
status | downloading |
status | processing |
status | error |
status | finished |
status | not-promoted |
AssetUpdate
{
"id": "string",
"url": "string",
"type": "audio",
"title": "string",
"duration": 0,
"asset_url": "string",
"md5": "string",
"source_md5": "string",
"source_size": 0,
"source_url": "string",
"finalized": true,
"width": 0,
"height": 0,
"disable_verification": true,
"folder_name": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"metadata": {
"property1": "string",
"property2": "string"
},
"status": "none",
"js_injection": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Unique ID of the asset |
url | string | false | read-only | This is API URL of this asset in the following form: /v3/assets/ |
type | string¦null | false | read-only | Type of the asset. Web, video and images are supported. |
title | string | false | none | Title of the asset. |
duration | number¦null | false | read-only | Duration of the asset. For videos it is equal to the duration of the whole video. For web and images this field is unused - duration of the playback is controlled by the playlist. |
asset_url | string | false | read-only | none |
md5 | string | false | read-only | MD5 checksum of the asset. |
source_md5 | string¦null | false | read-only | MD5 checksum of the original source file. |
source_size | integer | false | read-only | Size of the original source file in bytes. |
source_url | string¦null | false | read-only | URL of the original source file. |
finalized | boolean | false | read-only | Indicates whether processing of the asset is finalized or not. |
width | integer | false | read-only | Width of the asset. |
height | integer | false | read-only | Height of the asset. |
disable_verification | boolean | false | none | Disables HTTPS verification when set to true. |
folder_name | string | false | none | Name of the folder the asset is located in. |
headers | object | false | none | HTTP headers for web assets. |
» additionalProperties | string¦null | false | none | none |
metadata | object | false | none | A key-value user-defined store for an asset. {"meta_1": "meta_1 data", "meta_2": "meta_2 data"} |
» additionalProperties | string¦null | false | none | none |
status | string | false | read-only | Indicates the current status of the asset processing |
js_injection | string | false | none | Custom js code, running when asset is loaded. See examples on: https://github.com/Screenly/playground/tree/master/javascript-injectors/ |
Enumerated Values
Property | Value |
---|---|
type | audio |
type | edge-app |
type | edge-app-file |
type | image |
type | |
type | pdf-page |
type | video |
type | web |
status | none |
status | downloading |
status | processing |
status | error |
status | finished |
status | not-promoted |
Screen
{
"id": "string",
"name": "string",
"coords": {}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
name | string | false | read-only | Name of the screen. |
coords | object | false | read-only | Screen coordinates. |
GroupRead
{
"id": "string",
"url": "string",
"name": "string",
"screens": [
{
"id": "string",
"name": "string",
"coords": {}
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | none |
url | string | false | read-only | none |
name | string | true | none | none |
screens | [Screen] | true | none | none |
GroupWrite
{
"id": "string",
"name": "New Group",
"url": "string",
"screens": []
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | none |
name | string | false | none | Group name. |
url | string | false | read-only | none |
screens | object | false | none | Screens in this group in form [ {"id": "screen1_id"}, {"id": "screen2_id"}, ] |
Group
{
"id": "string",
"url": "string",
"name": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
url | string | false | read-only | none |
name | string | false | read-only | none |
PlaylistListRead
{
"id": "string",
"groups": [
{
"id": "string",
"url": "string",
"name": "string"
}
],
"predicate": "string",
"duration": 0,
"title": "string",
"url": "string",
"is_enabled": true,
"priority": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | none |
groups | [Group] | false | none | none |
predicate | string | true | none | none |
duration | number | false | read-only | none |
title | string | true | none | none |
url | string | false | read-only | none |
is_enabled | boolean | true | none | none |
priority | integer | false | none | none |
PlaylistWrite
{
"id": "string",
"url": "string",
"assets": [],
"duration": 0,
"groups": [],
"predicate": "TRUE",
"title": "New",
"is_enabled": true,
"priority": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Identifier of the playlist |
url | string | false | read-only | none |
assets | object | false | none | Assets attached to this playlist in form [ {"id": "asset_id", "duration": 5}, {"id": "asset2_id"} ] Duration is optional and set to 10 seconds by default. |
duration | number | false | read-only | Duration of the playlist in seconds. It is equal to the sum of the duration of assets inside. |
groups | object | false | none | Screen groups to which this playlist is attached in the following form: [ {"id": "group_id"}, {"id": "group2_id"} ] |
predicate | string | false | none | Predicate in the screenly pro format. Defaults to 'TRUE' |
title | string | false | none | Title of the playlist |
is_enabled | boolean | false | none | Set to enable/disable playlist |
priority | integer | false | none | Playlists with a priority of 1 suppress any scheduled playlists with a lower priority. |
PlaylistItem
{
"id": "string",
"duration": 10
}
Assets attached to this playlist
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
duration | number | false | none | none |
PlaylistRead
{
"id": "string",
"assets": [
{
"id": "string",
"duration": 10
}
],
"groups": [
{
"id": "string",
"url": "string",
"name": "string"
}
],
"predicate": "string",
"duration": 0,
"title": "string",
"url": "string",
"is_enabled": true,
"priority": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Unique ID of the playlist |
assets | [PlaylistItem] | false | none | Assets attached to this playlist |
groups | [Group] | false | none | Screen groups to which this playlist is attached |
predicate | string | true | none | Predicate in the screenly pro format |
duration | number | false | read-only | Duration of the playlist in seconds. It is equal to the sum of the duration of assets inside. |
title | string | true | none | Title of the playlist |
url | string | false | read-only | none |
is_enabled | boolean | true | none | Set to enable/disable playlist |
priority | integer | false | none | Playlists with a priority of 1 suppress any scheduled playlists with a lower priority. |
ScreenEndpoint
{
"id": "string",
"in_sync": true,
"last_ping": "string",
"status": "string",
"type": "string",
"is_enabled": true,
"coords": [
0
],
"groups": [
{
"id": "string",
"url": "string",
"name": "string"
}
],
"name": "string",
"last_screenshot": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Unique ID of the screen |
in_sync | boolean | true | none | Shows if the screen is in sync |
last_ping | string¦null | false | none | The last time screen has pinged the server |
status | string | true | none | Current status of the screen. ONLINE/OUT OF SYNC/OFFLINE/DISABLED |
type | string | true | none | Type of the screen. HARDWARE/VIRTUAL |
is_enabled | boolean | true | none | Set to enable/disable screen |
coords | [number] | false | none | Lat/Long tuple of device geolocation. |
groups | [Group] | false | none | Groups to which this screen is attached |
name | string | true | none | Name of the screen |
last_screenshot | string | false | none | The last screenshot captured from the device |
ScreenCreate
{
"pin": "string",
"name": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
pin | string | true | none | Pin code created with registrations endpoint |
name | string | false | none | Name of the new screen |
ScreenDetailed
{
"id": "string",
"in_sync": true,
"last_ping": "string",
"status": "string",
"type": "string",
"is_enabled": true,
"coords": [
0
],
"groups": [
{
"id": "string",
"url": "string",
"name": "string"
}
],
"name": "string",
"last_screenshot": "string",
"hostname": "string",
"last_ip": "string",
"local_ip": "string",
"mac": "string",
"last_screenshot_time": "string",
"location": "string",
"team": "string",
"timezone": "string",
"uptime": "string",
"hardware_version": "string",
"software_version": "string",
"load_avg": "string",
"ws_open": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | false | read-only | Unique ID of the screen |
in_sync | boolean | true | none | Shows if the screen is in sync |
last_ping | string¦null | false | none | The last time screen has pinged the server |
status | string | true | none | Current status of the screen. ONLINE/OUT OF SYNC/OFFLINE/DISABLED |
type | string | true | none | Type of the screen. HARDWARE/VIRTUAL |
is_enabled | boolean | true | none | Set to enable/disable screen |
coords | [number] | false | none | Lat/Long tuple of device geolocation. |
groups | [Group] | false | none | Groups to which this screen is attached |
name | string | true | none | Name of the screen |
last_screenshot | string | false | none | The last screenshot captured from the device |
hostname | string | false | none | Unique hostname of the device, assigned by screenly |
last_ip | string | false | none | IP used used by the device |
local_ip | string | false | none | Device IP in the local network |
mac | string | false | none | MAC address of the device |
last_screenshot_time | string¦null | false | none | Time when last screenshot was taken |
location | string | false | none | Geographic location auto-detected for device |
team | string | false | none | Team ID of the device |
timezone | string | false | none | Timezone detected for the device |
uptime | string | false | none | Uptime of the device |
hardware_version | string | false | none | Hardware version of the device. Currently only Raspberry Pi versions are detected |
software_version | string | false | none | Software version of the device |
load_avg | string | false | none | Average load of the device |
ws_open | boolean | false | none | Shows if device has a websocket connection |