Skip to content

Service Query FAQ

Matthew Pfister edited this page Apr 17, 2020 · 5 revisions

Querying the Data

Throughout our API there are endpoints that are queryable, meaning you can pass in query parameters to filter down to a specific subset of data that you need. For the specific fields you can query in a specific endpoint, check out that endpoint's documentation. That being said there are a few things that need to be touched upon when dealing with query parameters in this API:

  1. All references to data objects will be queried by their id. For example, if you want to search for matches that a given player has won you will query the matches endpoint with the id of that player.

  2. When you want the CLAUSE to your query to use a logical OR with a specific field, place a pipe after the name. For example, let's say that we want all matches that were in a specific season OR were a season point. Then that query would look like: ?season=12345678-1234-1234-1234-123456789011&seasonPoint|=true.

  3. When you want to give a range of values to match against you can supply the values as a comma separated list with brackets prefixed to it. For example, if we wanted to get all seasons a subset of players were in then the query would look like: ?players=[]12345678-1234-1234-1234-123456789011,87654321-4321-4321-4321-110987654321. Additionally, combining this rule with the previous rule, you can search fo all seasons that contained any players in a provided list like so: ?players|=[]12345678-1234-1234-1234-123456789011,87654321-4321-4321-4321-110987654321

Clone this wiki locally