Get server info
const url = 'https://example.com/api/v1/server';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/serverThe server’s ID, name and version, and for a signed-in client its
addresses and quality ladder.
Signed out, only id, name and version. A client keeps its
sign-in under id, which stays the same across restarts and address
changes, and tries a local URL first and the public one elsewhere.
Signed in, it also gets the quality ladder every client’s quality
menu shows.
An app that holds a session sends challenge and probeId before
it trusts a plain-HTTP address with its token, and the server
answers with its proof that it holds that session.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”16 to 64 random bytes, new for each probe, base64url without padding.
The app’s session’s probe ID, base64url without padding: the first 16 bytes of SHA-256(“kivo-probe-id” ‖ SHA-256(token)).
Responses
Section titled “Responses”The server.
The server, as GET /api/v1/server gives it.
object
The same across restarts and address changes; apps keep their sign-in under it.
The server’s name, from the serverName setting.
The version of the contract between Cast senders, the Cast
receiver and the server: the load request’s custom data, the
receiver’s status and messages, and the cast routes. A receiver
that speaks another version says which side to update.
Signed in: the server’s addresses on
its local networks, without container, VM or VPN interfaces (a
VPN only when the asker is on it). The asker’s own network comes
first, then addresses in the localNetworks setting, then the
rest.
Signed in, when one is set (the publicUrl setting), the address to use away from home.
Signed in: the quality menu’s fixed ladder, highest first, which
the quality menu, Home and remote quality and a user’s remote
limit offer below Auto and Original. A rung is chosen by sending
its bitrate as a limit quality’s maxBitrateBps.
object
The height in pixels a transcode at this bitrate is sent at, such as 1080.
With challenge and the probeId of a session the server holds.
object
Base64url without padding.
The host the probe reached, as its Host header, or a trusted proxy’s X-Forwarded-Host, names it.
Whether the probe came from a local address, after the trusted
proxies, as the localNetworks setting defines one.
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "version": "example", "castProtocol": 1, "localUrls": [ "example" ], "publicUrl": "example", "qualityLadder": [ { "bitrateBps": 1, "height": 1 } ], "proof": { "mac": "example", "host": "example", "local": true }}The request is malformed or a field is invalid (code invalidRequest).
An RFC 9457 problem document. code is stable and is what clients
translate.
object
A URI naming the problem type; about:blank when only code matters.
A short English summary, for logs.
English detail for logs and developers; never internal error text.
A problem’s stable code, which clients translate. A client that doesn’t know a code goes by the response’s status.
The request ID, also in the X-Request-Id header and the server log.
For transcodeBusy and notPlayable, why. For transcodeBusy:
transcodeLimit or storageFull. For notPlayable: noTracks,
fileUnplayable, subtitleUnplayable, transcodeFailed,
keyframeIndexMissing or downloadsNotAllowed.
For fileUnplayable, the capability the file failed.
object
The declared value, lists joined by commas; absent when the client declared none.
For throttled and rateLimited, the Retry-After header’s value.
For invalidRequest, what’s wrong with which field.
object
A JSON pointer into the body, or a parameter name.
What’s wrong with a field: tooLarge for a file or list over its
size, unsupported for a file in a format the server doesn’t take,
unknownEpisodeGroup for a group:<ID> ordering TMDb doesn’t list
for the series, and notABook for a work edited with books that
isn’t one.
For streamLimit, the user’s plays, to show what is playing where.
One of the user’s plays, for the stream limit.
object
A UUIDv7.
A UUIDv7.
The name of the session or API key it was started by.
For playEnded, the admin’s words to the viewer, when they gave any.
For quotaUsed, when the quota resets, when the provider said.
Example
{ "code": "invalidRequest", "reason": "noTracks", "errors": [ { "code": "required" } ]}default
Section titled “default”A server-side failure: 500 (code internal, or transcodeFailed
for a play’s media), or 503
for something unavailable (codes providerUnavailable and
transcodeBusy, for now; notConfigured, until an admin configures
it).
An RFC 9457 problem document. code is stable and is what clients
translate.
object
A URI naming the problem type; about:blank when only code matters.
A short English summary, for logs.
English detail for logs and developers; never internal error text.
A problem’s stable code, which clients translate. A client that doesn’t know a code goes by the response’s status.
The request ID, also in the X-Request-Id header and the server log.
For transcodeBusy and notPlayable, why. For transcodeBusy:
transcodeLimit or storageFull. For notPlayable: noTracks,
fileUnplayable, subtitleUnplayable, transcodeFailed,
keyframeIndexMissing or downloadsNotAllowed.
For fileUnplayable, the capability the file failed.
object
The declared value, lists joined by commas; absent when the client declared none.
For throttled and rateLimited, the Retry-After header’s value.
For invalidRequest, what’s wrong with which field.
object
A JSON pointer into the body, or a parameter name.
What’s wrong with a field: tooLarge for a file or list over its
size, unsupported for a file in a format the server doesn’t take,
unknownEpisodeGroup for a group:<ID> ordering TMDb doesn’t list
for the series, and notABook for a work edited with books that
isn’t one.
For streamLimit, the user’s plays, to show what is playing where.
One of the user’s plays, for the stream limit.
object
A UUIDv7.
A UUIDv7.
The name of the session or API key it was started by.
For playEnded, the admin’s words to the viewer, when they gave any.
For quotaUsed, when the quota resets, when the provider said.
Example
{ "code": "invalidRequest", "reason": "noTracks", "errors": [ { "code": "required" } ]}