Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/renja-g/RiftRelay/llms.txt

Use this file to discover all available pages before exploring further.

Request Format

RiftRelay uses a simple URL format to proxy requests to the Riot Games API:
/{region}/{riot-api-path}
The region can be any valid Riot API region such as europe, americas, asia, na1, euw1, etc.

Sending Requests

1

Start RiftRelay

Ensure RiftRelay is running on your configured port (default: 8985):
export RIOT_TOKEN="your-riot-token"
go run .
2

Send a Request

Use the format /{region}/{riot-api-path} to make API calls:
curl "http://localhost:8985/europe/riot/account/v1/accounts/by-riot-id/Someone/EUW1"
3

Handle the Response

RiftRelay returns the same response from Riot’s API, with additional rate limit management.

Real Examples

curl "http://localhost:8985/europe/riot/account/v1/accounts/by-riot-id/Someone/EUW1"

Using Swagger UI

RiftRelay includes an integrated Swagger UI for easy API exploration and testing.

Accessing Swagger UI

1

Enable Swagger

Swagger UI is enabled by default. If disabled, set:
.env
ENABLE_SWAGGER=true
2

Open in Browser

Navigate to http://localhost:8985/swagger/ in your web browser.
3

Explore Endpoints

Use the interactive interface to explore available Riot API endpoints and send test requests.
RiftRelay Swagger UI
Swagger UI automatically includes your configured RIOT_TOKEN, so you can test requests immediately without additional setup.

Health Check Endpoint

Use the health check endpoint to verify RiftRelay is running:
curl http://localhost:8985/healthz
A successful response indicates the server is operational.

Response Handling

Successful Requests

When a request is successfully proxied to Riot’s API, RiftRelay returns:
  • The original response body from Riot’s API
  • Original response headers
  • HTTP status code from Riot’s API

Rate Limited Requests

When the queue is full or rate limits are exceeded, RiftRelay returns:
{
  "status": 429,
  "message": "Too Many Requests"
}
The response includes a Retry-After header indicating when to retry the request (in seconds).

Error Responses

Invalid route format. Ensure you’re using the correct /{region}/{riot-api-path} format.
Rate limit exceeded or queue is full. Check the Retry-After header for retry timing.
Upstream Riot API is unavailable. This is typically a temporary issue.

Request Flow

1

Request Received

RiftRelay receives your request and parses the region and API path.
2

Rate Limit Check

The request is checked against current rate limits for the region and API endpoint.
3

Queue or Send

If rate limits allow, the request is sent immediately. Otherwise, it’s queued and sent when capacity is available.
4

Response Returned

RiftRelay forwards the response from Riot’s API and updates its internal rate limit state.
RiftRelay spreads requests evenly across the rate limit window to avoid bursts. If you need immediate sending, use priority requests.

Next Steps

Configuration

Learn about all available configuration options

Priority Requests

Send time-sensitive requests with higher priority

Build docs developers (and LLMs) love