Skip to content

Stream a match broadcast

GET
/api/live/{match_id}
curl --request GET \
--url https://foxleague.ai/api/live/1

The recording of a ranked or casual match on air, up to the point its broadcast has reached, for the live viewer. While the match is on air the response carries the header X-Live-Cut: fetch again with from set to the number of bytes you hold to receive what has been broadcast since (that response carries X-Live-From). A response without X-Live-Cut holds the whole match. Responses carry Cache-Control: no-cache; a partial one carries no-store. Its two players may fetch it at once; anyone else once its result is applied or its broadcast time has run out. A tournament or challenge match answers like an unknown id, before and after its broadcast: it is read by its public id (GET /api/live/tournament-match/{id}).

Who: anyone. A session identifies the two players of a ranked or casual match; a missing or invalid session counts as anonymous.

match_id
required
integer format: int32

The match id.

from
integer

Bytes of this recording you already hold; the answer starts after them. A value larger than what can be sent now is ignored and the whole window is sent again.

Success or a refusal: read success (the refusals are in the description).

Media type application/octet-stream
Array<integer>

No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.

Media type text/plain
string
Example
Session expired or invalid

A ranked or casual match whose result is not public yet, asked by anyone but its two players.

No such match; a tournament or challenge match (stream it by its public id); a broadcast that is not available yet (the viewer retries).

The recording is no longer kept.

A server read failed. Nothing is sent.