Riot Endpoints

View the OpenAPI specification file

Authentication

Every API request must include an authentication token in the x-api-token header.

  • Scope: Each token is tied to a single organization, ensuring that access and data are restricted to the appropriate entity.
  • Obtaining a token: To acquire an API token, customers must contact the technical team.

Pagination

All endpoints that return an array of objects support pagination through two request headers: x-item-limit and x-next-cursor. Even for endpoints with a limited number of items (e.g., /courses), pagination is available to maintain consistency across all endpoints.

  • x-item-limit: Specifies the maximum number of items per page. The maximum allowed value is 100, with a default of 50.
  • x-next-cursor: Pagination cursor for retrieving the next page of results. On the first request, the client may omit this header or include only x-item-limit. This value must be obtained from the ‘x-next-cursor’ response header of a previous API call. The cursor should be passed unchanged to fetch next pages. Here are some snippets to showcase the usage:
import requests

# Setup headers for API requests
headers = {
    'x-api-token': 'your_api_token',
    'x-item-limit': '50'
}

# First request
response = requests.get('https://public-api.tryriot.com/courses', headers=headers)
# Process first page of results...

# Add cursor to headers for next page request
headers['x-next-cursor'] = response.headers.get('x-next-cursor')

# Second request with updated headers including cursor
response = requests.get('https://public-api.tryriot.com/courses', headers=headers)
# Process second page of results...

Rate limits

Rate limiting is enforced across all API endpoints and is scoped by the authentication token. This ensures fair usage and prevents abuse of the system.

  • Scope: Rate limits are applied per token, meaning all requests made with the same token share the same limit.
  • Configuration: Specific rate limits are defined and managed by the technical team.
  • Behavior: The rate limiting mechanism operates within fixed time intervals. If the limit is exceeded within a given interval, further requests will return 429 status code until the next interval begins.