Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Backend API

Noah Piraino edited this page Jan 7, 2019 · 1 revision

Backend API

The StrangeScout scouting system includes a fully featured REST API to interact with the database.

Indexes

Events:

/api/events

A GET request will return a JSON formatted array of all available events.

Teams:

/api/teams

A GET request will return a JSON formatted array of all available teams.

Event's Teams:

/api/event/<event>/teams

A GET request will return a JSON formatted array of all available teams from a specified event.

Event's Matches:

/api/event/<event>/matches

A GET request will return a JSON formatted array of all available matches from a specified event.

Match's Teams:

/api/event/<event>/match/<match>/teams

A GET request will return a JSON formatted array of all available teams from a specified match at a specified event.

Team's Matches:

/api/event/<event>/team/<team>/matches

A GET request will return a JSON formatted array of all available matches of a specified team at a specified event.

Team's Events:

/api/team/<team>/events

A GET request will return a JSON formatted array of all available events of a specified team.

Queries

A Note on Formats: All of the following queries return a CSV file by default. This is useful for importing into spreadsheet software and allows for better viewing on mobile devices, but is not optimal for parsing in a program. Data can be returned in a JSON formatted string by setting the Accept header to application/json.

Full Data Dump:

/api/dump

A GET request will return a CSV file of all records.

Full Event:

/api/event/<event>

A GET request will return a CSV file of all records from the specified event.

Full Team:

/api/team/<team>

A GET request will return a CSV file of all records of the specified team.

Full Match:

/api/event/<event>/match/<match>

A GET request will return a CSV file of all records of the specified match from the specified event.

Team at Event:

/api/event/<event>/team/<team>

A GET request will return a CSV file of all records of the specified team from the specified event.

Individual Run:

/api/event/<event>/team/<team>/match/<match> or /api/event/<event>/match/<match>/team/<team>

A GET request will return a CSV file of a single team from the specified match from the specified event.