API Reference

add_game

Adds a new game and sends a create incident message to BOS.

POST /add_game/:create_message
  • create_message: Object of type create

start_game

Starts an existing game and sends an in_progress incident message to BOS.

POST /start_game/:in_progress_message

add_score

Add scores to a game.

POST /add_score/:result_message
  • result_message: Object of type result

finish_game

Finish a game

POST /finish_game/:finish_game_message
  • finish_game_message: Object of type finish

cancel_game

Cancel a game

POST /add_score/:cancel_game_message
  • cancel_game_message: Object of type canceled

delete_event

Delete an event according to the league and date.

DELETE /delete_event/:date/:league
  • date: The date of the event. Format is YYYY-MM-DD (UTC)

  • league: The name of the league

delete_game

Delete an event according to the league and date.

DELETE /delete_game/:game_id
  • game_id: The id of the game to be deleted.

get_all_data_by_date_range

Get all games data between a date range.

GET /get_all_data_by_date_range/:start_date/:end_date
  • start_date: The start of the date range. Format is YYYY-MM-DDTHH:MM:SS.000Z

  • end_date: The end of the date range. Format is YYYY-MM-DDTHH:MM:SS.000Z

get_all_games

Get all games.

GET /get_all_games/
  • Success - 200

    • List of all games

  • Failure - 400

get_all_sports

Get all sports.

GET /get_all_sports/
  • Success - 200

    • List of all sports

  • Failure - 400

get_games_by_league_and_date

Get all games data between a date range and for a league.

GET /get_games_by_league_and_date/:league/:start_date/:end_date
  • league: The sport league (event group).

  • start: The start of the date range. Format is YYYY-MM-DDTHH:MM:SS.000Z.

  • end: The end of the date range. Format is YYYY-MM-DDTHH:MM:SS.

get_games_by_league

Get all games for a league.

GET /get_games_by_league/:league
  • league: The league (event group).

get_leagues_by_sport

Get all leagues from a league.

GET /get_leagues_by_sport/:sport
  • sport: The id of the sport.

get_sports_and_leagues

Get all sports and leagues

GET /get_sports_and_leagues/
  • Success - 200

    • List of all sports

  • Failure

get_teams_by_league

Get all teams from a league.

GET /get_teams_by_league/:league
  • league: The id of the league.

get_league_data_by_name

Get all league information from its name.

GET /get_league_data_by_name/:leaguename
  • leaguename: The name of the league.

last_event_id_by_date_and_league

Get the event id of the last event on a date and for the league.

GET /last_event_id_by_date_and_league/:date/:league
  • date: Event date in the format YYYY-MM_DD

  • league: The name of the league.

last_event_id

Get the id of the last event.

GET /last_event_id/
  • Success - 200

    • The last event_id for all leagues

  • Failure - 400

last_game_id_by_date_and_league

Get the game id of the last game on a date and for the league.

GET /last_game_id_by_date_and_league/:date/:league
  • date: Game date in the format YYYY-MM_DD

  • league: The name of the league.

last_game_id

Get the game id of the last game for all sports.

GET /last_game_id
  • Success - 200

    • The last game id for all sports.

  • Failure - 400

last_game

Get the game details of all games sorted descending so the most recent (last) game is the first record

GET /last_game
  • Success - 200

    • All game records sorted descending.

  • Failure - 400

run_replay

Run a data replay for the selected sport and league(s)

GET /run_replay/:sport/:leagues/:start/:end
  • sport: The name of the sport

  • leagues: The name of the leagues. Pipe separated list, e.g "EPL|La Liga|Serie A

  • start: Start date in the format YYYY-MM_DD

  • end: End date in the format YYYY-MM_DD

Note: Replays can only be run for one sport at a time.

Last updated