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.

How should I query for specific data objects?

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.

How do I add a logical OR to my query CLAUSE?

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.

How do I query an endpoint by a list of values?

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