Get all supported teams

Returns a list of all valid teams supported by the API, optionally filtered by sport and/or league

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

EQULS API - Get Teams Endpoint

Overview

This endpoint retrieves a list of all valid teams supported by the EQULS API, optionally filtered by sport and/or league.

Details

  • URL: /v1/getTeams
  • Method: GET
  • Authentication: Required (API Key)

Request Parameters

  • apiKey: A required query parameter. It must be a valid 24-character hexadecimal API key for authentication.
  • sport: An optional query parameter to filter teams by a specific sport.
  • league: An optional query parameter to filter teams by a specific league.

Response

  • Success (200 OK):

    • Returns a JSON object containing an array of supported teams.
    • Example (all teams):
      {
        "teams": [
          {
            "name": "Boston Celtics",
            "sport": "basketball",
            "league": "NBA"
          },
          {
            "name": "Los Angeles Lakers",
            "sport": "basketball",
            "league": "NBA"
          }
        ]
      }
    • Example (filtered by sport):
      {
        "teams": [
          {
            "name": "Boston Celtics",
            "sport": "basketball",
            "league": "NBA"
          },
          {
            "name": "Golden State Warriors",
            "sport": "basketball",
            "league": "NBA"
          }
        ]
      }
    • Example (filtered by league):
      {
        "teams": [
          {
            "name": "Boston Celtics",
            "sport": "basketball",
            "league": "NBA"
          },
          {
            "name": "Los Angeles Lakers",
            "sport": "basketball",
            "league": "NBA"
          }
        ]
      }
  • Error (400 Bad Request):

    • Returned when an invalid sport parameter is provided or no teams are found for the specified criteria.
    • Example (invalid sport):
      {
        "error": "Invalid sport",
        "validSports": ["basketball", "football", "baseball", "hockey", "soccer"]
      }
    • Example (no teams found for league):
      {
        "error": "No teams found for the specified league",
        "league": "Invalid League"
      }
    • Example (no teams found for sport and league):
      {
        "error": "No teams found for the specified league",
        "sport": "basketball",
        "league": "Invalid League"
      }
  • Error (401 Unauthorized):

    • Returned when the API key is missing or invalid.
    • Example:
      {
        "error": "Invalid API key",
        "details": [
          {
            "code": "invalid_string",
            "message": "Must be a valid ObjectID string",
            "path": ["apiKey"]
          }
        ]
      }

Notes

  • The API key must be a valid 24-character hexadecimal string in the MongoDB ObjectID format.
  • When no parameters are provided, all teams from all sports and leagues are returned.
  • When only a sport parameter is provided, all teams for that sport are returned.
  • When only a league parameter is provided, all teams for that league are returned.
  • When both sport and league parameters are provided, teams matching both criteria are returned.
  • All responses include team name, sport, and league information.
  • The teams list is maintained in the configuration and may be updated as new teams are added to the platform.
Query Params
string

Filter teams by sport

string

Filter teams by league

string
required
^[0-9a-fA-F]{24}$

API key for authentication

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json