Replay API

What is the Replay API?

The Replay API is a new game client API that allows developers to adjust the in-game camera during replays. We have also released League Director, which uses these APIs and will give a good jumping off point for any development.


Getting Started


By default the Replay API is disabled. To get started using the Replay API you will first need to enable the Replay API in the game client config. To do so you will need to locate where your game is installed and add the following lines to the game.cfg file:


Example file location:

C:\Riot Games\League of Legends\Config\game.cfg


Once you have enabled the Replay API, the game client will generate the Swagger v2 and OpenAPI v3 specs for the Replay API. At this point the Replay API is usable, but you’ll receive an SSL cert error when making requests to the game client. You can ignore these errors or use the following root certificate authority to validate the game client’s SSL cert.


Links


ROOT CERTIFICATE LINK

OPENAPI LINK

SWAGGER  LINK


Endpoints

  • GET /replay/game

    • Information about the game client process.

  • GET /replay/playback

    • Returns the current replay playback state such as pause and current time.

  • POST /replay/playback

    • Allows modifying the playback state such as play / pause and the game time to seek to. All values are optional.

  • GET /replay/render

    • Returns the current render properties.

  • POST /replay/render

    • Allows modifying the current render properties. All values are optional.

  • GET /replay/recording

    • Returns the current status of video recording. Poll this resource for progress on the output.

  • POST /replay/recording

    • Post to begin a recording specifying the codec and output filepath. Subsequent GET requests to this resource will update the status.

  • GET /replay/sequence

    • Returns the sequence currently being applied.

  • POST /replay/sequence

    • Post to apply a sequence of keyframes that the replay should play. Post an empty object to remove the sequence.


Please keep in mind that the Replay API is only enabled on HTTPS when playing replays.


Here are some sample URLs


https://127.0.0.1:2999/replay/game
https://127.0.0.1:2999/replay/playback
https://127.0.0.1:2999/replay/render
https://127.0.0.1:2999/replay/recording
https://127.0.0.1:2999/replay/sequence
https://127.0.0.1:2999/swagger/v2/swagger.json
https://127.0.0.1:2999/swagger/v3/openapi.json