API reference
Cast
Hand playback to a receiver (P3-15).
Paths are relative to /api/v1 on your server.
/cast/devices#The Collectoh devices the caller may play to
Every Collectoh open on a screen that has said it is on in the last 75 seconds: the caller’s own wherever it is, and other accounts’ when both are on the home network — never the device asking (X-Client-Id). What a device is playing is shown to its own account and to whoever has sent to it. With Play To on and the caller at home, the televisions and speakers found on the home network too (kind: dlna), and playTo says whether it is on and whether the caller is at home.
- Authorisation
- Bearer token or API key · Session cookie
- 200Success.
application/json·object - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/cast/devices/{id}/commands#Play, pause, seek, skip, turn up or down, change channel or stop on another device
Handed to the device on the live wire (cast.command). A play carries only the items the caller may see; the device plays them under its own account. seekBy moves from where it is, volume sets, steps or mutes, and live puts a live channel on (P6-48): only an account that may watch live TV sends that, else 403 PERMISSION_AGE_RESTRICTED. 404 for a device that is off or not the caller’s to play to.
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
- 202Success.
- 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope - 404
NOT_FOUND: no such thing, or not one the caller may see.application/json·ErrorEnvelope
/cast/devices/self#Say this device is on, and what it is playing
The device is the browser or app the X-Client-Id header names, under the signed-in account. Sent every 30 seconds and whenever what it plays changes; the answer is the id other devices send to.
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 200Success.
application/json·object - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/cast/devices/self#Say this device is going
- Authorisation
- Bearer token or API key · Session cookie
- 204Done; no body.
- 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/cast/session#Make a cast session for a receiver
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 201Success.
application/json·CastSession - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/cast/ticket#A cast ticket for one item, for AirPlay
The credential an Apple TV needs to fetch the player’s own stream, which it cannot fetch with the browser’s cookie: one item the caller may see, read-only, for six hours. Appended as ?ticket= to the stream, playlist and subtitle addresses of that item. 404 for an item the caller cannot see.
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 200Success.
application/json·object - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
No endpoint here matches. Try another word, or look in another area.