Leaderboard API docs

Leaderboard API lets you manage teams, scores and leaderboards

Leaderboard API OpenAPI Spec

Get the most up-to-date Open API specification for leaderboard API here: https://api.leaderboardapi.com/swagger

Swagger

GET https://api.leaderboardapi.com/swagger

Get the latest up-t-date open api specification for the leaderboard API.

Path Parameters

openapi: 3.0.0
info:
  title: Leaderboard API
  description: A simple leaderboard API that helps manage teams, games and players.
  version: 1.0.0
servers:
  - url: http://api.example.com/v1
    description: Optional server description, e.g. Main (production) server
  - url: http://staging-api.example.com
    description: Optional server description, e.g. Internal staging server for testing
paths:
  /liveness:
    get:
      description: Returns the readiness of the service
      operationId: ping
      x-eov-operation-id: ping
      x-eov-operation-handler: healthcheck
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: OK
        "401":
          $ref: "#/components/responses/401"
        "404":
          $ref: "#/components/responses/404"
        "500":
          $ref: "#/components/responses/500"
  

Client credentials

In order to generate valid client credentials, visit https://leaderboardapi.com/dashboard after you've signed up.

Sign up to Leaderboard API here

Liveness

GET https://api.leaderboardapi.com/liveness

Liveness probe endpoint to check if the API is online and live.

{ "message": "OK" }

Token

GET https://api.leaderboardapi.com/token

This endpoint allows you to get an authorization token

Headers

{ authToken: <your_auth_token_jwt> }

Team

GET https://api.leaderboardapi.com/team/:id

Get a team (by id) or get all teams that belong to your client-id (your client id is generated when you sign up and used to get a valid authorization token).

Path Parameters

Headers

{
  "teamName": "Greenbay Packers",
  "id": "001456732910846354678",
  "createdAt": "",
  "modifiedAt": ""
}

Leaderboard

POST https://api.leaderboardapi.com/leaderboard

Path Parameters

Team

POST https://api.leaderboardapi.com/team

Teams belong to leaderboards. You will need to create a leaderboard before creating teams.

Headers

Request Body

{
  "teamName": "A Team",
  "id": "001456732910846354678",
  "createdAt": "",
  "modifiedAt": ""
}

Team

PUT /v1/team/:id

Path Parameters

Headers

Request Body

Team

DELETE /v1/team/:id

Path Parameters

Headers

no response

Leaderboard

POST /v1/leaderboard

Create a new leaderboard

Headers

Request Body

{
  "name": "leaderboard name",
  "id": "123789345678",
  "createdAt": "",
  "modifiedAt": ""
}

Last updated