Depot tvdisplay
Registers the TV page’s public routes.
This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.
GET /api/v1/tv/{slug}/board
Section titled “GET /api/v1/tv/{slug}/board”GETNo permission neededpublic facehosteditmspremoteIdempotent
Source: [object Object]
tvBoard is the paired display’s board: its name, refresh and the playlist items the activating user may see right now.
Display cookie only.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, TvBoardView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/json, object | The request was refused. |
404 | application/problem+json, ProblemDetails | No TV board has this address. |
500 | application/problem+json, ProblemDetails | The request failed. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of TvItemView | |
items[].definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
items[].definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
items[].definition.range.from | string | |
items[].definition.range.presetrequired | string | |
items[].definition.range.to | string | |
items[].definition.versionrequired | integer | |
items[].definition.widgetsrequired | array of Widget | |
items[].definition.widgets[].chart | string | |
items[].definition.widgets[].compare | string | |
items[].definition.widgets[].drill | boolean or null | |
items[].definition.widgets[].idrequired | string | |
items[].definition.widgets[].kindrequired | string | |
items[].definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
items[].definition.widgets[].mine | boolean | |
items[].definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
items[].definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
items[].definition.widgets[].target | number or null | double. |
items[].definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
items[].definition.widgets[].titlerequired | string | |
items[].facerequired | string | |
items[].indexrequired | integer | |
items[].secondsrequired | integer | |
items[].titlerequired | string | |
namerequired | string | |
refreshSecondsrequired | integer |
Request samples
Section titled “Request samples”# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/tv/<slug>/board' \ -H 'Accept: application/json'# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'Accept' = 'application/json'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/tv/<slug>/board' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/tv/<slug>/board"headers = { "Accept": "application/json",}
response = requests.get(url, headers=headers, timeout=30)response.raise_for_status()print(response.json())// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/tv/<slug>/board", nil) if err != nil { log.Fatal(err) }
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
const url = "https://depot.example.com/api/v1/tv/<slug>/board";
const response = await fetch(url, { method: "GET", headers: { "Accept": "application/json", },});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/tv/<slug>/board");request.Headers.TryAddWithoutValidation("Accept", "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/tv/{slug}/data
Section titled “GET /api/v1/tv/{slug}/data”GETNo permission neededpublic facehosteditmspremoteIdempotent
Source: [object Object]
tvBoardData is one playlist item’s data (the D7 shape) for the paired display, read as the activating user with no drill-downs and no ticket subjects.
Display cookie only.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | Yes | |
item | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Data | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/json, object | The request was refused. |
404 | application/problem+json, ProblemDetails | No TV board has this address. |
500 | application/problem+json, ProblemDetails | The request failed. |
200 response body
| Field | Type | Description |
|---|---|---|
fleetEmpty | boolean | |
generatedAtrequired | string (date-time) | |
rangerequired | DataRange | DataRange is the resolved dashboard range. |
range.fromrequired | string (date-time) | |
range.torequired | string (date-time) | |
scoperequired | DataScope | DataScope drives the "9 of 12 clients" banner. |
scope.clientName | string | |
scope.clientsrequired | integer | |
scope.kindrequired | string, one of client, practice | |
scope.unavailableClientsrequired | array of string | |
widgetsrequired | object |
Request samples
Section titled “Request samples”# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/tv/<slug>/data?item=<item>' \ -H 'Accept: application/json'# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'Accept' = 'application/json'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/tv/<slug>/data?item=<item>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# This operation is public. It takes no credentials.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/tv/<slug>/data"params = { "item": "<item>",}headers = { "Accept": "application/json",}
response = requests.get(url, params=params, headers=headers, timeout=30)response.raise_for_status()print(response.json())// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/tv/<slug>/data?item=<item>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
const url = new URL("https://depot.example.com/api/v1/tv/<slug>/data");url.searchParams.set("item", "<item>");
const response = await fetch(url, { method: "GET", headers: { "Accept": "application/json", },});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// This operation is public. It takes no credentials.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/tv/<slug>/data?item=<item>");request.Headers.TryAddWithoutValidation("Accept", "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/tv/{slug}/pairing
Section titled “POST /api/v1/tv/{slug}/pairing”POSTNo permission neededpublic facehosteditmspremote
Source: [object Object]
startTvPairing starts pairing a TV with a board: a six-digit code to show on screen (and a QR of the activation link), and a device secret the TV polls with.
Public.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PairingStart | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
404 | application/problem+json, ProblemDetails | No TV board has this address. |
429 | application/problem+json, ProblemDetails | Too many pairing requests. Try again in a minute. |
500 | application/problem+json, ProblemDetails | The request failed. |
200 response body
| Field | Type | Description |
|---|---|---|
activationUrlrequired | string | |
boardNamerequired | string | |
deviceSecretrequired | string | |
expiresInrequired | integer | |
intervalrequired | integer | |
qrPngrequired | string | |
userCoderequired | string |
Request samples
Section titled “Request samples”# This operation is public. It takes no credentials.curl -X POST 'https://depot.example.com/api/v1/tv/<slug>/pairing' \ -H 'Accept: application/json'# This operation is public. It takes no credentials.
$headers = @{ 'Accept' = 'application/json'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/tv/<slug>/pairing' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# This operation is public. It takes no credentials.
import requests
url = "https://depot.example.com/api/v1/tv/<slug>/pairing"headers = { "Accept": "application/json",}
response = requests.post(url, headers=headers, timeout=30)response.raise_for_status()print(response.json())// This operation is public. It takes no credentials.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/tv/<slug>/pairing", nil) if err != nil { log.Fatal(err) }
req.Header.Set("Accept", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// This operation is public. It takes no credentials.
const url = "https://depot.example.com/api/v1/tv/<slug>/pairing";
const response = await fetch(url, { method: "POST", headers: { "Accept": "application/json", },});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// This operation is public. It takes no credentials.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/tv/<slug>/pairing");request.Headers.TryAddWithoutValidation("Accept", "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/tv/{slug}/pairing/poll
Section titled “POST /api/v1/tv/{slug}/pairing/poll”POSTNo permission neededpublic facehosteditmspremote
Source: [object Object]
pollTvPairing reports whether the pairing was approved.
On approval it pairs the TV: the display cookie is set and the pairing is spent. Public; the device secret is the credential.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
deviceSecretrequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PairingPoll | Success. |
400 | application/problem+json, ProblemDetails | The request body is not valid JSON. |
404 | application/problem+json, ProblemDetails | No TV board has this address. |
500 | application/problem+json, ProblemDetails | The request failed. |
200 response body
| Field | Type | Description |
|---|---|---|
statusrequired | string |
Request samples
Section titled “Request samples”# This operation is public. It takes no credentials.curl -X POST 'https://depot.example.com/api/v1/tv/<slug>/pairing/poll' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --data '{ "deviceSecret": "string"}'# This operation is public. It takes no credentials.
$headers = @{ 'Accept' = 'application/json' 'Content-Type' = 'application/json'}
$body = @'{ "deviceSecret": "string"}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/tv/<slug>/pairing/poll' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# This operation is public. It takes no credentials.
import requests
url = "https://depot.example.com/api/v1/tv/<slug>/pairing/poll"headers = { "Accept": "application/json", "Content-Type": "application/json",}payload = { "deviceSecret": "string",}
response = requests.post(url, headers=headers, json=payload, timeout=30)response.raise_for_status()print(response.json())// This operation is public. It takes no credentials.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "deviceSecret": "string"}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/tv/<slug>/pairing/poll", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// This operation is public. It takes no credentials.
const url = "https://depot.example.com/api/v1/tv/<slug>/pairing/poll";
const response = await fetch(url, { method: "POST", headers: { "Accept": "application/json", "Content-Type": "application/json", }, body: JSON.stringify({ "deviceSecret": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// This operation is public. It takes no credentials.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "deviceSecret": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/tv/<slug>/pairing/poll");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.