Follow

Overview

ArbiterGame Event Publication API

 

Overview

ArbiterGame offers an API that allows a third party consumer, with permission, to receive notification of newly created tournaments, games and updates to those tournaments and games for their member schools that are managed in ArbiterGame. The API will be real time, or at least close enough to real time to provide last minute changes to users.

 

Methodology

ArbiterGame pushes new and updated game data out to third-party consumers in real time in JSON format via REST-like web service calls to the consumer.

The following steps are required in order for the API to function:

 Third-party consumers must develop and host a web service based on the REST pattern. This web service can be hosted on any platform and at any URL as long as the end of the URI conforms to the following format and HTTP request specifications:

 

  • /ArbiterEvents (HTTP “Post”) – Called by ArbiterGame when adding new games or tournaments
    • Request data: JSON string that conforms to the “Games” schema outlined later in this document
    • Response data: JSON string that simply indicates success or failure of the API call.
  • /ArbiterEvents (HTTP “Put”) – Called by ArbiterGame when updating existing GameEvents, NonGameEvents, and tournaments. This includes cancellations.
    ArbiterSports does not have a gameID so the partner will need to attempt an insert/update for post and put.
    • Request data: JSON string that conforms to the “ArbiterGameData” schema as outlined later in this document
    • Response data: JSON string that indicates the success or failure of the API call as well as relevant error codes, messages and diagnostic data.
  • /ServiceStatus (HTTP “Get”) – Called by ArbiterGame before re-sending API calls that failed previously.
    • Request data: none
    • Response data: JSON string that indicates whether the service is available to accept requests. Ideally the code behind this request would verify database connections, etc. before replying. ArbiterGame will NOT attempt to send Event API calls unless a “Success” response is received.

Please see examples within the .NET SDK to show how the communication works.

 Each school whose game data is to be published must be configured with a web service URL in their ArbiterGame settings.

 

ArbiterSports has a rudimentary SDK that can help a third-party consumer kick start development of their service.

 

Error Handling and Retry ArbiterGame will temporarily store the data for any failed API call for which it does not receive a “Success” response. ArbiterGame is configured to resend failed API calls every 1 minutes for up to 72 hours.

ArbiterGame will call the ServiceStatus for any consumers with error games every 1 minute. Once a status of “Success” is received Arbiter will attempt to resend the games. Until a status of “Success” is received Arbiter will not attempt to send failed games.

 

Game Data Data sent by ArbiterGame will be provided in a normalized JSON format that includes IDs in addition to names / descriptions where relevant (teams, sites, sports, other statuses, etc.) in order to simplify maintenance of controlled item lists for third parties.

Data provided in version 1 of the API will include the following basic game information and will increase in detail over time as needed.

ArbiterGameData

 Tournaments

 TournamentID

 Title

 StartDate

 StartDateString

 EndDate

 EndDateString

 Teams

 TeamID

 Sites

 SiteID

 PublishTournament

 RequestingSchoolID

 LevelID

 LevelName

 GenderID

 GenderName

 SportID

 SportName

 GameEvents

 GameEvent

 ArbiterGameID -- Unique ID for each game

 Title – A common name for the game (e.g., Homecoming Game)

3

 

 

 GameEventTypeID (Game, Scrimmage, Exhibition, Practice, etc.)

 GameEventStatusID

 Teams (GameTeam)

 TeamID

 IsHomeTeam

 PublishGame

 TransportationLeaveTime

 TournamentID

 SiteID

 SubSiteID

 StartTime – Start time of the game

 StartTimeString – String representation of the start time

 EndTime – End time of the game

 EndTimeString – String representation of the end time

 Notes

 RequestingSchoolID

 NonGameEvents

 NonGameEvent

 ArbiterGameEventID (we need to decide if we’re going to store these with or separately from Games)

 NonGameEventTypeID (Concert, Meeting, Dance, etc.)

 NonGameEventStatusID

 TransportationLeaveTime

 SiteID

 SubSiteID

 StartTime

 EndTime

 Notes

 Sites

 Site

 SiteID – Unique ID for the site within Arbiter. This will allow third parties to build up their sites.

 SiteName

 SubsiteID

 SubsiteName

 SiteAddress1

 SiteAddress2

 SiteCity

 SiteState

 SitePostalCode

 Teams

 Team

 TeamID

 LevelID (because game may be a cross-level game, e.g. Home Varsity vs. Away JV)

 LevelName

4

 

 

 GenderID

 GenderName

 SportID

 SportName

 Squad (e.g. A team, B team, etc.)

 SchoolID

 GameEventTypes

 GameEventTypeID

 Description

 GameEventStatuses

 GameEventStatusID

 Description

 NonGameEventTypes

 NonGameEventTypeID

 Description

 NonGameEventStatuses

 NonGameEventStatusID

 Description

 

Example Game JSON String

{ \"Tournaments\":[], \"Sites\":[ { \"SiteID\":883368, \"SiteName\":\"Centennial Park\", \"SubSiteID\":435413, \"SubSiteName\":\"Centennial Park\", \"SiteAddress1\":\"5415 W. 3100 So.\", \"SiteAddress2\":\"\", \"SiteCity\":\"Salt Lake City\", \"SiteState\":\"UT\", \"SitePostalCode\":\"84120\" } ], \"Teams\":[], \"Schools\":[], \"GameEvents\":[ { \"ArbiterGameID\":23806196, \"Title\":null, \"GameEventTypeID\":0, \"GameEventStatusID\":1, 5

 

\"Teams\":[], \"TournamentID\":7515, \"SiteID\":883368, \"SubSiteID\":435413, \"StartTime\":\"\\/Date(1424458800000)\\/\", \"StartTimeString\":\"2/20/2015 12:00:00 PM\", \"EndTime\":\"\\/Date(1424460600000)\\/\", \"EndTimeString\":\"2/20/2015 12:30:00 PM\", \"Notes\":null, \"RequestingSchoolID\":39532 } ], \"NonGameEvents\":null, \"GameEventTypes\":[ { \"GameEventTypeID\":0, \"Description\":\"Other\" } ], \"GameEventStatuses\":[ { \"GameEventStatusID\":1, \"Description\":\"Normal\" } ], \"NonGameEventTypes\":null, \"NonGameEventStatuses\":null }

 

Example Tournament JSON String

{ \"Tournaments\":[ { \"TournamentID\":7515, \"Title\":\"Really Rocking Ruckus\", \"StartDate\":\"\\/Date(1424444400000)\\/\", \"StartDateString\":\"2/20/2015 8:00:00 AM\", \"EndDate\":\"\\/Date(1424581200000)\\/\", \"EndDateString\":\"2/21/2015 10:00:00 PM\", \"Teams\":[ { \"TeamID\":3561726 } 6

 

], \"Sites\":[], \"PublishTournament\":true, \"RequestingSchoolID\":39532, \"LevelID\":1, \"LevelName\":\"Varsity\", \"GenderID\":1, \"GenderName\":\"Boys\", \"SportID\":2, \"SportName\":\"Basketball\" } ], \"Sites\":[], \"Teams\":[ { \"TeamID\":3561726, \"LevelID\":1, \"LevelName\":\"Varsity\", \"GenderID\":1, \"GenderName\":\"Boys\", \"SportID\":2, \"SportName\":\"Basketball\", \"Squad\":\"\", \"SchoolID\":39552 } ], \"Schools\":[ { \"SchoolID\":39552, \"SchoolName\":\"TEST - Cross Creek\", \"Address\":\"150 North State Street, La Verkin, UT 84070\" } ], \"GameEvents\":[], \"NonGameEvents\":null, \"GameEventTypes\":null, \"GameEventStatuses\":null, \"NonGameEventTypes\":null, \"NonGameEventStatuses\":null } 7

 

Sample APIResult JSON string

{

"ActionName": "GameEvents - PUT",

"Success": false,

"InputValue": "{\"Tournaments\":[],\"Sites\":[{\"SiteID\":883368,\"SiteName\":\"Centennial Park\",\"SubSiteID\":435413,\"SubSiteName\":\"Centennial Park\",\"SiteAddress1\":\"5415 W. 3100 So.\",\"SiteAddress2\":\"\",\"SiteCity\":\"Salt Lake City\",\"SiteState\":\"UT\",\"SitePostalCode\":\"84120\"}],\"Teams\":[],\"Schools\":[],\"GameEvents\":[{\"ArbiterGameID\":23806196,\"Title\":null,\"GameEventTypeID\":0,\"GameEventStatusID\":1,\"Teams\":[],\"TournamentID\":7515,\"SiteID\":883368,\"SubSiteID\":435413,\"StartTime\":\"\\/Date(1424458800000)\\/\",\"StartTimeString\":\"2/20/2015 12:00:00 PM\",\"EndTime\":\"\\/Date(1424460600000)\\/\",\"EndTimeString\":\"2/20/2015 12:30:00 PM\",\"Notes\":null,\"RequestingSchoolID\":39532}],\"NonGameEvents\":null,\"GameEventTypes\":[{\"GameEventTypeID\":0,\"Description\":\"Other\"}],\"GameEventStatuses\":[{\"GameEventStatusID\":1,\"Description\":\"Normal\"}],\"NonGameEventTypes\":null,\"NonGameEventStatuses\":null}",

"ReserializedInputValue": "{\"Tournaments\":[],\"Sites\":[{\"SiteID\":883368,\"SiteName\":\"Centennial Park\",\"SubSiteID\":435413,\"SubSiteName\":\"Centennial Park\",\"SiteAddress1\":\"5415 W. 3100 So.\",\"SiteAddress2\":\"\",\"SiteCity\":\"Salt Lake City\",\"SiteState\":\"UT\",\"SitePostalCode\":\"84120\"}],\"Teams\":[],\"Schools\":[],\"GameEvents\":[{\"ArbiterGameID\":23806196,\"Title\":null,\"GameEventTypeID\":0,\"GameEventStatusID\":1,\"Teams\":[],\"TournamentID\":7515,\"SiteID\":883368,\"SubSiteID\":435413,\"StartTime\":\"\\/Date(1424458800000)\\/\",\"StartTimeString\":\"2/20/2015 12:00:00 PM\",\"EndTime\":\"\\/Date(1424460600000)\\/\",\"EndTimeString\":\"2/20/2015 12:30:00 PM\",\"Notes\":null,\"RequestingSchoolID\":39532}],\"NonGameEvents\":null,\"GameEventTypes\":[{\"GameEventTypeID\":0,\"Description\":\"Other\"}],\"GameEventStatuses\":[{\"GameEventStatusID\":1,\"Description\":\"Normal\"}],\"NonGameEventTypes\":null,\"NonGameEventStatuses\":null}",

"ErrorCode": 1,

"ErrorMessage": "DB Connection is unavailable"

}

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments