Documentation / Teams
List teams
GET /v1/teamsTeams, by name, country, or the league or season they played in.
GET
https://api.icehockeyapi.com/v1/teamshttps://api.icehockeyapi.com/v1/teams?league_id=lg_6t11wec7&q=New&per_page=3curl "https://api.icehockeyapi.com/v1/teams?league_id=lg_6t11wec7&q=New&per_page=3" \ -H "X-API-Key: YOUR_KEY"
200 OKExample answer from the data, 12 Oct
{
"data": [
{
"id": "tm_vxt1q0ha",
"name": "New Jersey Devils",
"short_name": "NJD",
"country": "North America"
},
{
"id": "tm_k715zbf3",
"name": "New York Americans",
"short_name": "NYA",
"country": "North America"
},
{
"id": "tm_zy5w8596",
"name": "New York Islanders",
"short_name": "NYI",
"country": "North America"
}
],
"meta": {
"count": 3,
"next_cursor": "eyJvIjozLCJuIjozfQ",
"page": 1,
"per_page": 3,
"total": 4,
"total_pages": 2,
"next_page": 2,
"prev_page": null,
"plan": "Complete"
}
}Run works once the API is live; the code above works now.
Parameters
| Name | In | Type | What it does |
|---|---|---|---|
league_id | query | id | A league, from /v1/leagues. |
season_id | query | id | A season, from /v1/leagues/{league_id}/seasons. |
country | query | string | A country. |
q | query | string | Part of the team name |
page | query | int | The page, from 1. |
per_page | query | int | Records a page, default 50, at most 200. |
cursor | query | string | meta.next_cursor from the previous answer. |
Returns
| Field | Type |
|---|---|
id | string |
name | string |
short_name | string |
country | string |