Back to API overview

Team

Team List

Definition

GET https://api-v2.swissunihockey.ch/api/teams

If mode is set to 'by_club', then the list needs a season and club_id parameter, and will return a list of teams for a given season and club id (see below).

League and Game Class

Returns a list of teams for a given league and game_class.

league
integer
identifier of the league to list, defaults to NLA.
game_class
integer
identifier of the game class to list, defaults to gentlement GF.

Season and Club

Definition

GET https://api-v2.swissunihockey.ch/api/teams

Returns a list of teams for a given season and club_id.

text
string
The name of the dropdown.
resource
array(object)
A list of header columns. Contains the text to display,
how it is aligned, and how wide it is.
entries
array(object)
Dropdown selections with set_in_content where saison_id is set, and a textual representation of a saison.
levels
array(string)
There is only one level, "Team".
highlight
boolean
Always false.

Returns a structure of type dropdown:

{
  "type": "dropdown",
  "text": "Team",
  "resource": "/teams",
  "entries": [
    {"text": "Team 1", "set_in_context": {"team_id": 35726}, "entries": [], "highlight": true}
  ],
  "levels": ["Team"],
  "highlight": false
}

Team Visitors

Definition

GET https://api-v2.swissunihockey.ch/api/teams/visitors

Returns a list with all teams and their average visitors numbers for a season.

The following parameters must be given:

season
text
Season
league
text
League or leagues the team has played in that season
game_class
integer
identifier of the game class to list, defaults to gentlemen GF.
league is required if you use this parameter.

Sample Response

These fields are returned:

rank
text
rank of the team regarding average number of visitors
team_name
text
name of the team
average_visitors
text
average number of visitors
percent_of_top
image
data uri containing base64 encoded png image

Team Details

Definition

GET https://api-v2.swissunihockey.ch/api/teams/:team_id

Returns the details for the team as an attribute list (type='table', subtype='attribute_list').

The following parameters must be given:

team_id
string
unique identifier for the team, obtained through other means

Sample Response

These fields are returned:

logo_url
image
logo of the team
teamname
text
name of the team
website_url
url
link to the web page of the team
portrait
object
team portrait
liga
text
league that the team plays in

Team Players

Definition

GET https://api-v2.swissunihockey.ch/api/teams/:team_id/players

Returns a list of players that play in the team and their statistics for the current season. (aka 'Kaderliste') The answer is formatted as a table object.

Sample Response

Team Statistics

Definition

GET https://api-v2.swissunihockey.ch/api/teams/:team_id/statistics

Displays a list of past achievements for a given team. Returned table contains:

season
text
Season
league
text
League or leagues the team has played in that season
playoff_out
text
Playoff or Playout qualifications the team has reached, if any
qualification
text
Qualification phase rank
cup
text
Cup participations and ranking

Sample Response