No Subscription to this function
GET /baseball/get_season_team
Returns all teams which are of the seasons
Request URL
https://dsg-api.com/clients/{client_name}/baseball/get_season_team?season_id={season_id}&client={client_name}&authkey={client_authkey}
Parameters
authkey
string Required
client authentification key
client
string Required
unique client ID
ftype
string
changes feed type from XML to json (ftype=json)
season_id
int Required
season id to get teams from
Nodes
competition
Details about competition
area_id
unique identifier for area.
area_name
contains the area name.
competition_id
unique identifier for a competition.
format
competition format to filter out leagues or cups
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of the competition.
teamtype
determines the type of team/competition (male,female,male_youth,female_youth)
type
determines if a competition is between club teams (club) or national teams (international).
datasportsgroup
details about the API version, sport, language and generation timestamp
generated_utc
UTC timestamp when the API output was generated
lang
language of the API
sport
sport of the API
version
version of the API
method
details about the API function
method_id
unique ID of method.
name
name of method.
rounds
Details about round
current_gameweek
displays the gameweek of nearest match to today
end_date
end date, format 'yyyy-mm-dd'.
last_updated
When record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
name
name of round
round_id
unique identifier of round.
start_date
start date, format 'yyyy-mm-dd'.
type
Determines if the round contains a table or a cup structure (knock-out).
season
Details about season
end_date
end date, format 'yyyy-mm-dd'.
last_updated
when record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
logo
full path URL of logo for particular season
original_name
competition name during this season
season_id
unique identifier for season.
start_date
start date, format 'yyyy-mm-dd'.
title
title of season
team
basic team informations
gender
gender of the team ('male', 'male youth', 'female' or 'female youth')
last_updated
when record was last updated. Format YYYY-MM-DD HH:MM:SS in CET timezone.
original_team_name
original team name during the season
short_name
short name of the team.
status
The current status of the team ('active' or 'defunct')
team_id
Unique identifier for team
team_logo
full path URL of team logo
team_name
current team name
type
Determines the type of team ('national' or 'club')
Response Headers
200
Success
401
Unauthorized
429
Too Many Requests
Code Samples
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://dsg-api.com/clients/{client_name}/baseball/get_season_team?season_id={season_id}&client={client_name}&authkey={client_authkey}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "{User}:{Password}");
$content = curl_exec($ch);
curl_close($ch);
?>
curl GET -u "User:Password" "https://dsg-api.com/clients/{client_name}/baseball/get_season_team?season_id={season_id}&client={client_name}&authkey={client_authkey}"
response = requests.get("https://dsg-api.com/clients/{client_name}/baseball/get_season_team?season_id={season_id}&client={client_name}&authkey={client_authkey}", auth=("User", "Password"))
Response Example
200 Success
{"datasportsgroup":{"version":"1.0","sport":"baseball","lang":"","method":{"method_id":"55","name":"get_season_team"},"competition":{"competition_id":"921","name":"MLB","teamtype":"male","type":"club","format":"domestic_league","area_id":"203","area_name":"United States","last_updated":"2019-01-29 10:26:45","season":{"season_id":"15143","title":"2018","original_name":"MLB","start_date":"2018-03-29","end_date":"2018-11-02","logo":"https:\/\/www.dsg-images.com\/comps\/200x200\/921.png","last_updated":"2018-01-07 15:34:47","team":[{"team_id":"25504","team_name":"Arizona Diamondbacks","original_team_name":"Arizona Diamondbacks","short_name":"Diamondbacks","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25504.png","last_updated":"2016-06-08 23:03:13"},{"team_id":"25469","team_name":"Atlanta Braves","original_team_name":"Atlanta Braves","short_name":"Braves","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25469.png","last_updated":"2016-06-08 22:52:59"},{"team_id":"25454","team_name":"Baltimore Orioles","original_team_name":"Baltimore Orioles","short_name":"Orioles","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25454.png","last_updated":"2016-06-08 23:25:52"},{"team_id":"25455","team_name":"Boston Red Sox","original_team_name":"Boston Red Sox","short_name":"Red Sox","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25455.png","last_updated":"2016-06-08 23:25:35"},{"team_id":"25464","team_name":"Chicago Cubs","original_team_name":"Chicago Cubs","short_name":"Cubs","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25464.png","last_updated":"2016-06-08 23:25:15"},{"team_id":"25447","team_name":"Chicago White Sox","original_team_name":"Chicago White Sox","short_name":"White Sox","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25447.png","last_updated":"2016-06-08 23:28:59"},{"team_id":"25465","team_name":"Cincinnati Reds","original_team_name":"Cincinnati Reds","short_name":"Reds","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25465.png","last_updated":"2016-06-08 23:28:49"},{"team_id":"25448","team_name":"Cleveland Indians","original_team_name":"Cleveland Indians","short_name":"Indians","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25448.png","last_updated":"2016-06-08 23:29:11"},{"team_id":"25505","team_name":"Colorado Rockies","original_team_name":"Colorado Rockies","short_name":"Rockies","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25505.png","last_updated":"2016-06-08 23:29:28"},{"team_id":"25451","team_name":"Detroit Tigers","original_team_name":"Detroit Tigers","short_name":"Tigers","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25451.png","last_updated":"2016-06-08 23:24:49"},{"team_id":"25459","team_name":"Houston Astros","original_team_name":"Houston Astros","short_name":"Astros","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25459.png","last_updated":"2016-06-08 23:28:08"},{"team_id":"25452","team_name":"Kansas City Royals","original_team_name":"Kansas City Royals","short_name":"City Royals","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25452.png","last_updated":"2016-06-09 01:31:33"},{"team_id":"25460","team_name":"Los Angeles Angels","original_team_name":"Los Angeles Angels","short_name":"Angels","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25460.png","last_updated":"2016-06-08 23:26:33"},{"team_id":"25506","team_name":"Los Angeles Dodgers","original_team_name":"Los Angeles Dodgers","short_name":"Dodgers","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25506.png","last_updated":"2016-10-11 13:57:21"},{"team_id":"25470","team_name":"Miami Marlins","original_team_name":"Miami Marlins","short_name":"Marlins","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25470.png","last_updated":"2016-06-08 23:28:19"},{"team_id":"25466","team_name":"Milwaukee Brewers","original_team_name":"Milwaukee Brewers","short_name":"Brewers","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25466.png","last_updated":"2016-06-08 23:28:39"},{"team_id":"25453","team_name":"Minnesota Twins","original_team_name":"Minnesota Twins","short_name":"Twins","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25453.png","last_updated":"2016-06-08 23:28:27"},{"team_id":"25471","team_name":"New York Mets","original_team_name":"New York Mets","short_name":"Mets","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25471.png","last_updated":"2016-06-08 23:27:08"},{"team_id":"25456","team_name":"New York Yankees","original_team_name":"New York Yankees","short_name":"Yankees","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25456.png","last_updated":"2016-06-09 01:32:00"},{"team_id":"25461","team_name":"Oakland Athletics","original_team_name":"Oakland Athletics","short_name":"Athletics","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25461.png","last_updated":"2016-06-08 23:28:34"},{"team_id":"25472","team_name":"Philadelphia Phillies","original_team_name":"Philadelphia Phillies","short_name":"Phillies","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25472.png","last_updated":"2017-05-30 20:30:45"},{"team_id":"25467","team_name":"Pittsburgh Pirates","original_team_name":"Pittsburgh Pirates","short_name":"Pirates","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25467.png","last_updated":"2016-06-08 23:27:14"},{"team_id":"25507","team_name":"San Diego Padres","original_team_name":"San Diego Padres","short_name":"Padres","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25507.png","last_updated":"2016-06-08 22:53:06"},{"team_id":"25508","team_name":"San Francisco Giants","original_team_name":"San Francisco Giants","short_name":"Giants","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25508.png","last_updated":"2016-06-08 23:25:39"},{"team_id":"25462","team_name":"Seattle Mariners","original_team_name":"Seattle Mariners","short_name":"Mariners","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25462.png","last_updated":"2016-06-08 23:29:15"},{"team_id":"25468","team_name":"St. Louis Cardinals","original_team_name":"St. Louis Cardinals","short_name":"Cardinals","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25468.png","last_updated":"2016-06-08 23:27:59"},{"team_id":"25457","team_name":"Tampa Bay Rays","original_team_name":"Tampa Bay Rays","short_name":"Rays","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25457.png","last_updated":"2016-06-08 23:03:07"},{"team_id":"25463","team_name":"Texas Rangers","original_team_name":"Texas Rangers","short_name":"Rangers","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25463.png","last_updated":"2016-06-08 23:28:12"},{"team_id":"25458","team_name":"Toronto Blue Jays","original_team_name":"Toronto Blue Jays","short_name":"Blue Jays","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25458.png","last_updated":"2016-06-08 23:24:53"},{"team_id":"25503","team_name":"Washington Nationals","original_team_name":"Washington Nationals","short_name":"Nationals","type":"club","gender":"male","status":"active","team_logo":"https:\/\/www.dsg-images.com\/clubs\/200x200\/25503.png","last_updated":"2016-06-08 23:29:04"}]},"rounds":[{"round_id":"18320","name":"Wild Card Playoffs","start_date":"2018-10-03","end_date":"2018-10-04","current_gameweek":"","last_updated":"2018-10-04 08:23:08","team":[{"team_id":"25456","team_name":"New York Yankees","original_team_name":"New York Yankees","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-09 01:32:00"},{"team_id":"25461","team_name":"Oakland Athletics","original_team_name":"Oakland Athletics","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:28:34"},{"team_id":"25464","team_name":"Chicago Cubs","original_team_name":"Chicago Cubs","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:25:15"},{"team_id":"25505","team_name":"Colorado Rockies","original_team_name":"Colorado Rockies","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:29:28"}]},{"round_id":"18321","name":"Division Series","start_date":"2018-10-05","end_date":"2018-10-13","current_gameweek":"","last_updated":"2018-10-14 11:27:35","team":[{"team_id":"25448","team_name":"Cleveland Indians","original_team_name":"Cleveland Indians","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:29:11"},{"team_id":"25455","team_name":"Boston Red Sox","original_team_name":"Boston Red Sox","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:25:35"},{"team_id":"25456","team_name":"New York Yankees","original_team_name":"New York Yankees","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-09 01:32:00"},{"team_id":"25459","team_name":"Houston Astros","original_team_name":"Houston Astros","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:28:08"},{"team_id":"25466","team_name":"Milwaukee Brewers","original_team_name":"Milwaukee Brewers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:28:39"},{"team_id":"25469","team_name":"Atlanta Braves","original_team_name":"Atlanta Braves","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 22:52:59"},{"team_id":"25505","team_name":"Colorado Rockies","original_team_name":"Colorado Rockies","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:29:28"},{"team_id":"25506","team_name":"Los Angeles Dodgers","original_team_name":"Los Angeles Dodgers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-10-11 13:57:21"}]},{"round_id":"18322","name":"Championship Series","start_date":"2018-10-13","end_date":"2018-10-22","current_gameweek":"","last_updated":"2018-10-23 15:57:29","team":[{"team_id":"25455","team_name":"Boston Red Sox","original_team_name":"Boston Red Sox","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:25:35"},{"team_id":"25459","team_name":"Houston Astros","original_team_name":"Houston Astros","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:28:08"},{"team_id":"25466","team_name":"Milwaukee Brewers","original_team_name":"Milwaukee Brewers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:28:39"},{"team_id":"25506","team_name":"Los Angeles Dodgers","original_team_name":"Los Angeles Dodgers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-10-11 13:57:21"}]},{"round_id":"18323","name":"World Series","start_date":"2018-10-24","end_date":"2018-11-02","current_gameweek":"","last_updated":"2018-10-29 10:56:01","team":[{"team_id":"25455","team_name":"Boston Red Sox","original_team_name":"Boston Red Sox","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:25:35"},{"team_id":"25506","team_name":"Los Angeles Dodgers","original_team_name":"Los Angeles Dodgers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-10-11 13:57:21"}]},{"round_id":"27630","name":"Tiebreaking play-off","start_date":"2018-10-01","end_date":"2018-10-01","current_gameweek":"","last_updated":"2019-01-07 14:52:47","team":[{"team_id":"25464","team_name":"Chicago Cubs","original_team_name":"Chicago Cubs","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:25:15"},{"team_id":"25466","team_name":"Milwaukee Brewers","original_team_name":"Milwaukee Brewers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:28:39"},{"team_id":"25505","team_name":"Colorado Rockies","original_team_name":"Colorado Rockies","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-06-08 23:29:28"},{"team_id":"25506","team_name":"Los Angeles Dodgers","original_team_name":"Los Angeles Dodgers","type":"club","gender":"male","status":"active","team_logo":"","last_updated":"2016-10-11 13:57:21"}]}]}}}