Get competitions by league id
GET
/api/tennis/competition/{leagueId}Competitions within a tennis league, for the league id returned by Get all leagues. Feed a competition's id into Get matches by competition id to see its matches.
Path Params
leagueIdstringrequiredQuery Params
pageintegerperPageintegerTry Get competitions by league id with live data
Run this request in the Sportbex trial panel and see the real response.
curl -X GET 'http://xx.xx.xx.xx/api/tennis/competition/{leagueId}?page=1&perPage=10'Example response
The real API responds in this shape — but the values below are a fixed example and may be stale. This is here to show what the output looks like, not to reflect current data.
{
"page": 1,
"perPage": 10,
"data": [
{
"id": "tc-9101",
"name": "ATP Masters 1000",
"location": "Metro City"
},
{
"id": "tc-9102",
"name": "ATP 500",
"location": "Lakeside"
}
]
}