Skip to content

Download a match recording

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

The recording of a finished ranked or casual match as bytes, for the match viewer. Its two players may fetch it at once; anyone else once its result is applied or its broadcast time has run out. Until then a player’s copy stops near the point the broadcast has reached and carries the header X-Live-Cut. A tournament or challenge match answers like an unknown id, before and after its broadcast: it is read by its public id (GET /api/replay/tournament-match/{id}).

A complete recording is sent with Cache-Control: public, max-age=86400; a partial one with no-store.

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.

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 (read its recording by its public id); a match not finished yet; a match without a recording.

The recording is no longer kept.

A server read failed. Nothing is sent.