This page contains all the information to the use the STHS dynamic website API.
Main Parameter | Secondary Parameters | Information | Example |
---|---|---|---|
CoachesAvailable | None | API.php?CoachesAvailable | |
CoachesFarm | None | API.php?CoachesFarm | |
CoachesHistory | Year = Mandatory (Integer) Playoff = Optional (Empty parameter) | API.php?CoachesHistory&Year=2019 | |
CoachesPro | None | API.php?CoachesPro | |
DraftPick | Team = Optional (Integer) | API.php?DraftPick API.php?DraftPick&Team=10 | |
EntryDraftProjection | None | API.php?EntryDraftProjection | |
FinanceFarm | None | API.php?FinanceFarm | |
FinanceFarmHistory | Year = Mandatory (Integer) Playoff = Optional (Empty parameter) | API.php?FinanceFarmHistory&Year=2019 | |
FinancePro | None | API.php?FinancePro | |
FinanceProHistory | Year = Mandatory (Integer) Playoff = Optional (Empty parameter) | API.php?FinanceProHistory&Year=2019 API.php?FinanceProHistory&Year=2019&Playoff | |
GoalerRoster | UniqueID = Optional (Integer) Team = Optional (Integer) Type = Optional (Integer) Playoff = Optional (Empty parameter) FreeAgentYear = Optional AvailableForTrade = Optional Injury = Optional (Empty parameter) Expansion = Optional (Empty parameter) Retire = Optional (Empty parameter) Max = Optional (Integer) | You can't used UniqueID and Team together You can’t used Retire, FreeAgentYear, AvailableForTrade, Injury and Expansion together. Type Parameter : 0 = Both, 1 = Pro; 2 = Farm | API.php?GoalerRoster API.php?GoalerRoster&UniqueID=10 API.php?GoalerRoster&Retire API.php?GoalerRoster&Max=10 |
GoalerStatFarm | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?GoalerStatFarm API.php?GoalerStatFarm&UniqueID=10 API.php?GoalerStatFarm&Team=10 | |
GoalerStatPro | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?GoalerStatPro API.php?GoalerStatPro&UniqueID=10 API.php?GoalerStatPro&Team=10 | |
PlayerInfo | Team = Optional (Integer) Type = Optional (Integer) FreeAgentYear = Optional (Integer) AvailableForTrade = Optional (Empty parameter) Expansion = Optional (Empty parameter) Retire = Optional (Empty parameter) Max = Optional (Integer) | You can’t used FreeAgentYear, AvailableForTrade and Expansion together. Type Parameter : 0 = Both, 1 = Pro; 2 = Farm | API.php?PlayerInfo API.php?PlayerInfo&Team=10 API.php?PlayerInfo&FreeAgentYear=1 |
PlayerRoster | UniqueID = Optional (Integer) Team = Optional (Integer) Type = Optional (Integer) Playoff = Optional (Empty parameter) FreeAgentYear = Optional (Integer) AvailableForTrade = Optional (Empty parameter) Injury = Optional (Empty parameter) Expansion = Optional (Empty parameter) Retire = Optional (Empty parameter) Max = Optional (Integer) | You can't used UniqueID and Team together You can’t used Retire, FreeAgentYear, AvailableForTrade, Injury and Expansion together. Type Parameter : 0 = Both, 1 = Pro; 2 = Farm | API.php?PlayerRoster API.php?UniqueID=10 API.php?PlayerRoster&Injury API.php?PlayerRoster&AvailableForTrade&Team=10 |
PlayerStatFarm | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?PlayerStatFarm API.php?PlayerStatFarm&UniqueID=10 API.php?PlayerStatFarm&Team=10 | |
PlayerStatPro | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?PlayerStatPro API.php?PlayerStatPro&UniqueID=10 API.php?PlayerStatPro&Team=10 | |
PowerRankingFarm | None | API.php?PowerRankingFarm | |
PowerRankingPro | None | API.php?PowerRankingPro | |
Prospect | Team = Optional (Integer) Max = Optional (Integer) | API.php?Prospect API.php?Prospect&Team=10 | |
ScheduleFarm | Team = Optional (Integer) | API.php?ScheduleFarm API.php?ScheduleFarm&Team=10 | |
SchedulePro | Team = Optional (Integer) | API.php?SchedulePro API.php?SchedulePro&Team=10 | |
StandingFarm | Conference = Optional (Integer; 1 or 2) Division = Optional (Integer; 1 to 6) | API.php?StandingFarm API.php?StandingFarm&Conference=2 API.php?StandingFarm&Division=2 | |
StandingPro | Conference = Optional (Integer; 1 or 2) Division = Optional (Integer; 1 to 6) | API.php?StandingPro API.php?StandingPro&Conference=1 API.php?StandingPro&Division=4 | |
PlayoffFarm | None | API.php?PlayoffFarm | |
PlayoffPro | None | API.php?PlayoffPro | |
TeamStatFarm | Team = Optional (Integer) | API.php?TeamStatFarm API.php?TeamStatFarm&Team=10 | |
TeamStatPro | Team = Optional (Integer) | API.php?TeamStatPro API.php?TeamStatPro&Team=10 | |
TeamFarmLines | Team = Optional (Integer) | Only return data for next game. | API.php?TeamFarmLines API.php?TeamFarmLines &Team=10 |
TeamProLines | Team = Optional (Integer) | Only return data for next game. | API.php?TeamProLines API.php?TeamProLines&Team=10 |
TeamTransaction | Team = Mandatory (Integer) Max = Optional (Integer) | API.php?TeamTransaction&Team=10&Max=100 | |
TodayGame | None | Today Games Only | API.php?TodayGame |
TodayGameFarm | None | Today Farm Game Only | API.php?TodayGameFarm |
TodayGamePro | None | Today Pro Game Only | API.php?TodayGamePro |
TradeHistory | Max = Optional (Integer) | API.php?TradeHistory | |
Transaction | Type = Optional (Integer) Max = Optional (Integer) | Type Parameter : 0 = Other, 1 = Trade, 2 = Injury, 3 = Waiver, 4 = SendToPro, 5 = SendToFarm, 6 = Suspension, 7 = RosterLineError, 8 = Information, 9 = Players, 10 = Team, 11 = OptionChange | API.php?Transaction API.php?Transaction&Type=2 API.php?Transaction&Max=500 |
Waiver | None | API.php?Waiver | |
WaiverOrder | None | API.php?WaiverOrder | |
BoxscorePro | GameNumber = Mandatory (Integer) Year = Optional (Integer) | 'Output Games HTML to SQLite Database' option must activate for this option to return data. | API.php?BoxscorePro&GameNumber=10&br />API.php?BoxscorePro&GameNumber=10&Year=2 |
BoxscoreFarm | GameNumber = Mandatory (Integer) Year = Optional (Integer) | 'Output Games HTML to SQLite Database' option must activate for this option to return data. | API.php?BoxscoreFarm&GameNumber=10 API.php?BoxscoreFarm&GameNumber=10&Year=2 |
From CareerStat / History Database | |||
---|---|---|---|
Main Parameter | Secondary Parameters | Information | Example |
DraftPickHistory | Year = Mandatory (Integer) Team = Optional (Integer) | API.php?DraftPickHistory&Year=2019 API.php?DraftPickHistory&Year=2019&Team=10 | |
GoalerRosterHistory | Year = Mandatory (Integer) UniqueID = Optional (Integer) Team = Optional (Integer) Type = Optional (Integer) Retire = Optional (Empty parameter) AvailableForTrade = Optional (Empty parameter) Injury = Optional (Empty parameter) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can’t used Retire, AvailableForTrade and Injury together. Type Parameter : 0 = Both, 1 = Pro; 2 = Farm | API.php?GoalerRosterHistory&Year=2019 API.php?GoalerRosterHistory&Year=2019&Team=10 API.php?GoalerRosterHistory&Year=2019&UniqueID=10 API.php?GoalerRosterHistory&Year=2019&AvailableForTrade |
GoalerStatFarmHistory | Year = Mandatory (Integer) UniqueID = Optional (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?GoalerStatFarmHistory&Year=2019 API.php?GoalerStatFarmHistory&Year=2019&UniqueID=10 API.php?GoalerStatFarmHistory&Year=2019&Team=10 | |
GoalerStatProHistory | Year = Mandatory (Integer) UniqueID = Optional (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?GoalerStatProHistory&Year=2019 API.php?GoalerStatProHistory&Year=2019&UniqueID=10 API.php?GoalerStatProHistory&Year=2019&Team=10 | |
GoalerStatFarmHistoryAllSeasonMerge | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?GoalerStatFarmHistoryAllSeasonMerge API.php?GoalerStatFarmHistoryAllSeasonMerge&Team=10 API.php?GoalerStatFarmHistoryAllSeasonMerge&UniqueID=10 |
GoalerStatProHistoryAllSeasonMerge | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?GoalerStatProHistoryAllSeasonMerge API.php?GoalerStatProHistoryAllSeasonMerge&Team=10 API.php?GoalerStatProHistoryAllSeasonMerge&UniqueID=10 |
GoalerStatFarmHistoryAllSeasonPerYear | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?GoalerStatFarmHistoryAllSeasonPerYear API.php?GoalerStatFarmHistoryAllSeasonPerYear&Team=10 API.php?GoalerStatFarmHistoryAllSeasonPerYear&UniqueID=10 |
GoalerStatProHistoryAllSeasonPerYear | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer)) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?GoalerStatProHistoryAllSeasonPerYear API.php?GoalerStatProHistoryAllSeasonPerYear&Team=10 API.php?GoalerStatProHistoryAllSeasonPerYear&UniqueID=10 |
PlayerInfoHistory | Year = Mandatory (Integer) Team = Optional (Integer) Type = Optional (Integer) AvailableForTrade = Optional Retire = Optional Max = Optional (Integer) Playoff = Optional (Empty parameter) | Type Parameter : 0 = Both, 1 = Pro; 2 = Farm | API.php?PlayerInfoHistory&Year=2019 API.php?PlayerInfoHistory&Year=2019&Team=10 API.php?PlayerInfoHistory&Year=2019&Team=10&Type=1 |
PlayerRosterHistory | Year = Mandatory (Integer) UniqueID = Optional (Integer) Team = Optional (Integer) Type = Optional (Integer) Playoff = Optional (Empty parameter) Retire = Optional (Empty parameter) AvailableForTrade = Optional (Empty parameter) Injury = Optional (Empty parameter) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can’t used Retire, AvailableForTrade and Injury together. Type Parameter : 0 = Both, 1 = Pro; 2 = Farm | API.php?PlayerRosterHistory&Year=2019 API.php?PlayerRosterHistory&Year=2019&Team=10 API.php?PlayerRosterHistory&Year=2019&UniqueID=10 API.php?PlayerRosterHistory&Year=2019&Type=2 |
PlayerStatFarmHistory | Year = Mandatory (Integer) UniqueID = Optional (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?PlayerStatFarmHistory&Year=2019 API.php?PlayerStatFarmHistory&Year=2019&UniqueID=10 API.php?PlayerStatFarmHistory&Year=2019&Team=10 | |
PlayerStatProHistory | Year = Mandatory (Integer) UniqueID = Optional (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) Max = Optional (Integer)) MinGP = Optional (Integer) | API.php?PlayerStatProHistory&Year=2019 API.php?PlayerStatProHistory&Year=2019&UniqueID=10 API.php?PlayerStatProHistory&Year=2019&Team=10 | |
PlayerStatFarmHistoryAllSeasonMerge | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?PlayerStatFarmHistoryAllSeasonMerge API.php?PlayerStatFarmHistoryAllSeasonMerge&Team=10 API.php?PlayerStatFarmHistoryAllSeasonMerge&UniqueID=10 |
PlayerStatProHistoryAllSeasonMerge | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?PlayerStatProHistoryAllSeasonMerge API.php?PlayerStatProHistoryAllSeasonMerge&Team=10 API.php?PlayerStatProHistoryAllSeasonMerge&UniqueID=10 |
PlayerStatFarmHistoryAllSeasonPerYear | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?PlayerStatFarmHistoryAllSeasonPerYear API.php?PlayerStatFarmHistoryAllSeasonPerYear&Team=10 API.php?PlayerStatFarmHistoryAllSeasonPerYear&UniqueID=10 |
PlayerStatProHistoryAllSeasonPerYear | UniqueID = Optional (Integer) Team = Optional (Integer) Max = Optional (Integer)) Playoff = Optional (Empty parameter) | You can't used UniqueID and Team together. | API.php?PlayerStatProHistoryAllSeasonPerYear API.php?PlayerStatProHistoryAllSeasonPerYear&Team=10 API.php?PlayerStatProHistoryAllSeasonPerYear&UniqueID=10 |
ProspectHistory | Year = Mandatory (Integer) Team = Optional (Integer) Max = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?ProspectHistory API.php?ProspectHistory&Team=10 | |
ScheduleFarmHistory | Year = Mandatory (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?ScheduleFarmHistory&Year=2019 API.php?ScheduleFarmHistory&Year=2019&Team=10 | |
ScheduleProHistory | Year = Mandatory (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?ScheduleProHistory&Year=2019 API.php?ScheduleProHistory&Year=2019&Team=10 | |
StandingFarmHistory | Year = Mandatory (Integer) Conference = Optional (Integer; 1 or 2) Division = Optional (Integer; 1 to 6) Playoff = Optional (Empty parameter) | API.php?StandingFarmHistory&Year=2019 API.php?StandingFarmHistory&Year=2019&Conference=2 API.php?StandingFarmHistory&Year=2019&Division=2 | |
StandingProHistory | Year = Mandatory (Integer) Conference = Optional (Integer; 1 or 2) Division = Optional (Integer; 1 to 6) Playoff = Optional (Empty parameter) | API.php?StandingProHistory&Year=2019 API.php?StandingProHistory&Year=2019&Conference=1 API.php?StandingProHistory&Year=2019&Division=4 | |
TeamStatFarmHistory | Year = Mandatory (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?TeamStatFarmHistory&Year=2019 API.php?TeamStatFarmHistory&Year=2019&Team=10 | |
TeamStatFarmHistoryAllSeasonMerge | Team = Optional (Integer) ReturnOnlyTeamData = Optional (Empty parameter) Playoff = Optional (Empty parameter) | The ReturnOnlyTeamData parameter required the Team parameter to be fill. | API.php?TeamStatFarmHistoryAllSeasonMerge API.php?TeamStatFarmHistoryAllSeasonMerge&Team=10 API.php?TeamStatFarmHistoryAllSeasonMerge&Team=10&ReturnOnlyTeamData |
TeamStatFarmHistoryAllSeasonPerYear | Team = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?TeamStatFarmHistoryAllSeasonPerYear API.php?TeamStatFarmHistoryAllSeasonPerYear&Team=10 | |
TeamStatProHistory | Year = Mandatory (Integer) Team = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?TeamStatProHistory&Year=2019 API.php?TeamStatProHistory&Year=2019&Team=10 | |
TeamStatProHistoryAllSeasonMerge | Team = Optional (Integer) ReturnOnlyTeamData = Optional (Empty parameter) Playoff = Optional (Empty parameter) | The ReturnOnlyTeamData parameter required the Team parameter to be fill. | API.php?TeamStatProHistoryAllSeasonMerge API.php?TeamStatProHistoryAllSeasonMerge&Team=10 API.php?TeamStatProHistoryAllSeasonMerge&Team=10&ReturnOnlyTeamData |
TeamStatProHistoryAllSeasonPerYear | Team = Optional (Integer) Playoff = Optional (Empty parameter) | API.php?TeamStatProHistoryAllSeasonPerYear API.php?TeamStatProHistoryAllSeasonPerYear&Team=10 | |
CupWinner | None | API.php?CupWinner |
Note about the Secondary Parameter
- Team : Request a specific team information.
- Playoff : When looking up History Database, by default the value is False.
- Max : If this parameter is enter, the API will return a maximum of value requested.
- Year : Year when looking up History Database.
- FreeAgentYear : Request the year the players will be free agents. For example, 0 will return the current free agents, 1 will return the next free agents, 2 will return the free agents in 2 years, etc.
- AvailableForTrade : Only show the players available for trade.
- Expansion : Only show the players available for an expansion draft.
- Injury : Only show the injured players.
- Retire : Only show the players mark as retired.
- MinGP : Only show players who played a minimum of GP of the value requested.
PowerShell Code Example
PowerShell Code Example #1 :Invoke-RestMethod -uri "https://demo.sths.ca/API.php?CoachesPro"
PowerShell Code Example #2 :
Invoke-RestMethod -uri "https://demo.sths.ca/API.php" -Method Post -Body @{CoachesPro=''}
PowerShell Code Example #3 :
Invoke-RestMethod -uri "https://demo.sths.ca/API.php?StandingPro&Conference=1"
PowerShell Code Example #4 :
Invoke-RestMethod -uri "https://demo.sths.ca/API.php" -Method Post -Body @{StandingPro='';Conference='1'}
PowerShell Two Lines Code Example to Export API Data to CSV File:
$Data = Invoke-RestMethod -uri "https://demo.sths.ca/API.php" -Method Post -Body @{StandingPro=''}
$Data | Export-Csv Data.csv -NoTypeInformation
Scroll