Sports
Various settings are Sport-dependent, for example not all sports will have a Line Judge
Official Type.
Associations
Official Types are Sport-specific, and Site(s) are associated with one or more Sports. Each League is Sport-specific.
getSports Index
The Index method returns an array of available Sports.
Definition
Examples
Result Format
[
{
"id": 1,
"name": "Ice Hockey",
"updated_on": "2011-11-17T04:49:23-08:00",
"created_on": "2006-11-29T00:58:07-08:00",
"class_name": "IceHockey",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 3,
"name": "Lacrosse",
"updated_on": "2011-12-18T16:24:56-08:00",
"created_on": "2006-12-07T18:22:25-08:00",
"class_name": "Lacrosse",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 4,
"name": "Baseball/Softball",
"updated_on": "2012-03-23T01:32:25-07:00",
"created_on": "2006-12-07T18:22:38-08:00",
"class_name": "Baseball",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 5,
"name": "Soccer",
"updated_on": "2012-07-17T22:43:03-07:00",
"created_on": "2006-12-07T18:22:54-08:00",
"class_name": "Soccer",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 6,
"name": "Cycling",
"updated_on": "2006-12-15T17:06:35-08:00",
"created_on": "2006-12-15T17:06:35-08:00",
"class_name": "Cycling",
"stat_enabled": null,
"tabular_scoring_plays": false
},
{
"id": 7,
"name": "Basketball",
"updated_on": "2012-07-03T22:22:09-07:00",
"created_on": "2006-12-20T15:11:13-08:00",
"class_name": "Basketball",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 9,
"name": "Track and Field",
"updated_on": "2006-12-28T12:32:21-08:00",
"created_on": "2006-12-28T12:32:21-08:00",
"class_name": "TrackAndField",
"stat_enabled": null,
"tabular_scoring_plays": false
},
{
"id": 10,
"name": "Tennis",
"updated_on": "2007-01-25T16:20:28-08:00",
"created_on": "2007-01-25T16:20:28-08:00",
"class_name": "Tennis",
"stat_enabled": null,
"tabular_scoring_plays": false
},
{
"id": 11,
"name": "Football",
"updated_on": "2011-08-03T22:00:45-07:00",
"created_on": "2007-04-04T16:41:25-07:00",
"class_name": "Football",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 12,
"name": "Volleyball",
"updated_on": "2011-08-18T13:25:07-07:00",
"created_on": "2007-10-12T11:34:32-07:00",
"class_name": "Volleyball",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 13,
"name": "Wrestling",
"updated_on": "2008-01-08T12:52:23-08:00",
"created_on": "2008-01-08T12:52:23-08:00",
"class_name": "Wrestling",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 16,
"name": "Rugby Union",
"updated_on": "2010-03-02T06:40:46-08:00",
"created_on": "2010-03-02T06:40:46-08:00",
"class_name": "RugbyUnion",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 18,
"name": "Golf",
"updated_on": "2011-03-15T07:12:07-07:00",
"created_on": "2011-03-15T07:12:07-07:00",
"class_name": "Golf",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 20,
"name": "Paintball",
"updated_on": "2012-04-28T16:57:19-07:00",
"created_on": "2012-04-28T16:57:19-07:00",
"class_name": "Paintball",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 21,
"name": "Cross Country",
"updated_on": "2012-05-11T08:01:00-07:00",
"created_on": "2012-05-11T08:01:00-07:00",
"class_name": "CrossCountry",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 22,
"name": "Swimming",
"updated_on": "2012-05-11T08:01:16-07:00",
"created_on": "2012-05-11T08:01:16-07:00",
"class_name": "Swimming",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 23,
"name": "Skiing",
"updated_on": "2012-05-23T12:21:27-07:00",
"created_on": "2012-05-23T12:21:27-07:00",
"class_name": "Skiing",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 24,
"name": "Basic",
"updated_on": "2012-08-14T13:08:29-07:00",
"created_on": "2012-08-14T13:08:29-07:00",
"class_name": "Basic",
"stat_enabled": true,
"tabular_scoring_plays": false
},
{
"id": 25,
"name": "Rugby wheel chair",
"updated_on": "2013-01-22T10:59:44-08:00",
"created_on": "2013-01-22T10:59:44-08:00",
"class_name": "Wheelchair",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 26,
"name": "Canadian Football",
"updated_on": "2014-06-27T10:15:32-07:00",
"created_on": "2014-06-27T10:15:32-07:00",
"class_name": "CanadianFootball",
"stat_enabled": true,
"tabular_scoring_plays": true
},
{
"id": 27,
"name": "Other",
"updated_on": "2015-08-19T19:41:54-07:00",
"created_on": "2015-08-19T19:41:54-07:00",
"class_name": "",
"stat_enabled": false,
"tabular_scoring_plays": false
},
{
"id": 28,
"name": "Water Polo",
"updated_on": "2015-10-22T13:41:01-07:00",
"created_on": "2015-10-22T13:41:01-07:00",
"class_name": "",
"stat_enabled": false,
"tabular_scoring_plays": false
}
]
Definition
Examples
Result Format
{
"id": 1,
"name": "Ice Hockey",
"updated_on": "2011-11-17T04:49:23-08:00",
"created_on": "2006-11-29T00:58:07-08:00",
"class_name": "IceHockey",
"stat_enabled": true,
"tabular_scoring_plays": true
}
Officials
Officials are the referees for a particular Game.
Associations
A Official belongs to a Game and is classified by Official Types. Official Type is germane to a given Sports.
getOfficials Index
Definition
Examples
Result Format
[
{
"id": 193702,
"name": "Joe the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T11:53:36-07:00",
"updated_at": "2016-04-08T11:53:36-07:00"
},
{
"id": 193703,
"name": "Jane the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T12:26:27-07:00",
"updated_at": "2016-04-08T12:26:27-07:00"
}
]
postOfficials Create
The Create method accepts a single Official (see attributes above) and creates a new record in SportsEngine.
Parameters
Body Params
Name of the official
ID of the game the official will be assigned to
ID representing the type of official to be created
Definition
Examples
Result Format
{
"id": 193703,
"name": "Jane the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T12:26:27-07:00",
"updated_at": "2016-04-08T12:26:27-07:00"
}
postOfficials Update
The Update method accepts a single Official (see attributes above) and updates the matching record in SportsEngine.
Parameters
Body Params
Definition
Examples
Result Format
{
"id": 193705,
"name": "Jill the Ref",
"official_type_id": 1,
"game_id": 13557134,
"created_at": "2016-04-08T13:33:40-07:00",
"updated_at": "2016-04-08T13:33:40-07:00"
}
getOfficial Types Show
Definition
Examples
Result Format
[
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 1,
"name": "Official",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 17,
"name": "Referee",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 18,
"name": "Linesman",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 19,
"name": "Assistant Referee",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2011-08-03T21:54:13-07:00",
"id": 34,
"name": "Other",
"sport_id": 1,
"updated_at": "2011-08-03T21:54:13-07:00"
},
{
"created_at": "2012-10-05T12:23:54-07:00",
"id": 54,
"name": "Official Scorer",
"sport_id": 1,
"updated_at": "2012-10-05T12:23:54-07:00"
},
{
"created_at": "2012-10-05T12:23:54-07:00",
"id": 55,
"name": "Score Keeper",
"sport_id": 1,
"updated_at": "2012-10-05T12:23:54-07:00"
}
]
Leagues
A League represents an association of Teams on a Site. A is an instance of a specific League, which represents a single Season.
Much like the League and the League Instances, a Team Instance is an instance of a specific team, usually for a single Season or Subseason. A Team Instance belongs to a Rosters Index or to a Team. A Team Instance can have many Photos, Videos, Games, and Subseasons.
A good way to find teams is to use the Team Finder endpoint. The Team Finder allows you to search for Teams based on the team_name
, site_name
, site_abbreviation
, and/or domain_name
.
A Season is the portion of one year in which the regulated Games of a Sport are in session.
A Subseason is a segmented portion of a Season. A Subseason could be named the "Regular Season", the "Playoffs," or the "State Tournament."
Associations
A League has multiple Divisions (which is the actual subgrouping of Teams). A League has many League Instances.
A Divison is a subgrouping of Teams that belong to a League. A Division has many Division Instances. A Division also has many Teams.
A Subseason belongs to a Season, and has many Team Instances and Games.
Hint
A League Instance can inform a League Instance Tree, which displays the structure of associated League Instance including dependent Subseasons, Division Instances Index, and Team Instances.
getLeagues Index
The Index method returns an array of Leagues matching the given parameters.
This endpoint requires at least one parameter, either a site_id
or a site_url
. An error is thrown if any of the parameters are invalid.
Parameters
Query Params
Id of site
Url of site
id
Integer
ID of league
name
String
Name of league
current_subseason_id
Integer
ID of the current subseason for the league. This could also be defined as the "default" subseason.
site_id
Integer
ID of the site that the league belongs to
sport_id
Integer
ID of the sport that the league plays
image_id
Integer
ID of an image
created_at
Timestamp
Timestamp when created
updated_at
Timestamp
Timestamp of last update
button_title
String
Title of league that shows up in navigation
primary_color
String
Primary color used in styling of league pages
secondary_color
String
Secondary color used in styling of league pages
gender
String
Gender of league
abbrev
String
Abbreviation of league. Used in various locations that have limited text.
score_ribbon
Boolean
Display score ribbon on league page
tweet_games
Boolean
Tweet games for league
game_sheet_label
String
League's label for game sheets. Possible values are "gamesheet" or "boxscore".
Definition
Examples
Result Format
[
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
},
{
"id": 27738,
"name": "Western League",
"current_subseason_id": 291622,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:48:01-07:00",
"updated_at": "2016-03-24T07:20:41-07:00",
"button_title": "Western",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "West",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
]
Path Params
Id of the League
Hint
This endpoint is useful when there are many leagues in a Site. However, since the League Index endpoint returns the full League document in the results array, the League Index endpoint is sufficient most of the time.
Definition
Examples
Result Format
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
getLeague Instances Index
Query Params
Id of League
Definition
Examples
Result Format
[
{
"id": 41683,
"season_id": 267440,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"league_id": 27737,
"season_name": "2016"
}
]
getLeague Instance Tree Show
The Show method returns the page node structure beneath the League Instance.
Parameters
Definition
Examples
Result Format
{
"node": {
"id": 2458062,
"node_type": "LeagueInstance",
"data": {
"created_at": "2016-03-22T12:46:58-07:00",
"id": 41683,
"league_id": 27737,
"season_id": 267440,
"updated_at": "2016-03-22T12:46:58-07:00"
},
"children": [
{
"node": {
"id": 2458064,
"node_type": "Subseason",
"data": {
"created_at": "2016-03-22T12:46:58-07:00",
"id": 291621,
"name": "Regular Season",
"position": 1,
"season_id": 267440,
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"updated_at": "2016-04-11T09:02:40-07:00",
"workers_completed": null,
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
},
"children": [
{
"node": {
"id": 2458074,
"node_type": "DivisionInstance",
"data": {
"created_at": "2016-03-22T12:52:51-07:00",
"division_id": 66180,
"id": 181552,
"max_standings_points": null,
"non_standing": false,
"updated_at": "2016-03-22T12:52:51-07:00",
"division": {
"abbrev": "Ocn",
"button_title": "Oceanic",
"created_at": "2016-03-22T12:52:51-07:00",
"id": 66180,
"image_id": null,
"league_id": 27737,
"name": "Oceanic Division",
"primary_color": "00AEEF",
"secondary_color": "666666",
"updated_at": "2016-03-22T14:25:05-07:00"
}
},
"children": [
{
"node": {
"id": 2458139,
"node_type": "TeamInstance",
"data": {
"abbrev": "Bos",
"affects_standings": true,
"button_title": "Boston",
"created_at": "2016-03-22T13:19:12-07:00",
"gender": "male",
"id": 1876243,
"image_id": null,
"management_team_id": null,
"name": "Boston Bears",
"opponent": null,
"parent_team_instance_id": null,
"primary_color": "000000",
"roster_id": 1837158,
"secondary_color": "000000",
"team_id": 1373611,
"updated_at": "2016-03-23T09:34:28-07:00",
"team": {
"abbrev": "Bos",
"android_whitelabel_url": null,
"button_title": "Boston",
"created_at": "2016-03-22T13:06:41-07:00",
"gender": "male",
"id": 1373611,
"image_id": null,
"ios_whitelabel_url": null,
"name": "Boston Bears",
"opponent": null,
"parent_team_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"sport_id": 1,
"updated_at": "2016-03-23T09:34:28-07:00"
}
},
"children": []
}
},
Divisions
While not accessible directly through the API, it is useful to understand the relationship between a Division and a Division Instance. A Division is a logical grouping of Teams in the League, and a Division Instance is the instance of that Division for the current Season.
id
Integer
Unique id assigned by NGIN
name
String
Division name
button_title
String
Button title for the division
abbrev
String
Division abbreviation
image_id
Integer
Image id for the division
primary_color
String
Primary color for the division
secondary_color
String
Secondary color for the division
created_at
Datetime
Timestamp of creation
updated_at
Datetime
Timestamp of last update
league_id
Integer
League id the division belongs to
Definition
Examples
Result Format
[
{
"id": 181552,
"created_at": "2016-03-22T12:52:51-07:00",
"updated_at": "2016-03-22T12:52:51-07:00",
"division_id": 66180,
"non_standing": false,
"max_standings_points": null
},
{
"id": 181553,
"created_at": "2016-03-22T12:54:23-07:00",
"updated_at": "2016-03-22T12:54:23-07:00",
"division_id": 66181,
"non_standing": false,
"max_standings_points": null
}
]
postDivision Instances Create
The Create method accepts a single Division Instance (see attributes above) and creates a new record in SportsEngine.
Parameters
Body Params
Needed if the division instance is not being created as part of an existing division
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN " -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458064,
"existing_or_new": "new",
"top_template_id": 23221,
"bottom_template_id": 23221,
"division": {
"name": "Test division",
"button_title": "Test",
"abbrev": "TD",
"primary_color": "FFFFFF",
"secondary_color": "000000"
}
}' "https://api.sportngin.com/division_instances"
Result Format
{
"id": 209310,
"created_at": "2016-09-30T12:00:52-07:00",
"updated_at": "2016-09-30T12:00:52-07:00",
"division_id": 66180,
"non_standing": false,
"max_standings_points": null
}
putDivision Instances Update
Path Params
Id of DivisionInstance to update
Definition
Examples
Result Format
{
"id": 181552,
"created_at": "2016-03-22T12:52:51-07:00",
"updated_at": "2016-09-30T11:40:25-07:00",
"division_id": 66180,
"non_standing": false,
"max_standings_points": "44.0"
}
deleteDivision Instances Delete
The Delete method permanently deletes the associated DivisionInstance record in SportsEngine. This method takes action upon initial invocation and cannot be reversed.
Parameters
Path Params
Id belonging to the division_instance of interest
Definition
Examples
Result Format
{
"id": 209258,
"created_at": "2016-09-28T14:38:04-07:00",
"updated_at": "2016-09-28T14:38:04-07:00",
"division_id": 77569,
"non_standing": false,
"max_standings_points": null
}
Teams
A Team can belong to a Division in a League, a league with no divisions, or exist as solo team league. A Team Instance is the instance of that Team for the current Season.
id
Integer
Unique id assigned by NGIN
name
String
Team name
button_title
String
Button title for the team
abbrev
String
Team abbreviation
image_id
Integer
Image id for the team
primary_color
String
Primary color for the team
secondary_color
String
Primary color for the team
gender
Enum
Gender for the team
created_at
DateTime
Timestamp of creation
updated_at
DateTime
Timestamp of last update
sport_id
Integer
Id of the sport which the team belongs to
opponent
Integer
Set to 1
if the team is in the system as an opponent in a solo team league. Default value = null
parent_team_id
Integer
Id of team that is above this team
ios_whitelabel_url
String
URL of the iTunes store item for the team's app, if applicable
android_whitelabel_url
String
URL of the Google Play store item for the team's app, if applicable
Query Params
Id of site the teams belong to
Id of leagues the teams belong to
Id of teams to be returned
Id of sport the teams belong to
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/teams?site_id=11953"
Result Format
[
{
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-19T10:52:59-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T09:47:22-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
]
Path Params
Id of the team
Definition
Examples
Result Format
{
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-19T10:52:59-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T09:47:22-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey",
"team_instances": [
{
"abbrev": "Bos",
"affects_standings": true,
"button_title": "Boston",
"created_at": "2016-03-22T13:19:12-07:00",
"gender": "male",
"id": 1876243,
"image_id": null,
"management_team_id": null,
"name": "Boston Bears",
"opponent": null,
"parent_team_instance_id": null,
"primary_color": "000000",
"roster_id": 1837158,
"secondary_color": "000000",
"team_id": 1373611,
"updated_at": "2016-03-23T09:34:28-07:00"
}
]
}
Path Params
Id of team to update
Definition
Examples
Result Format
{
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "BBB",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-07-07T10:16:51-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-06-02T09:24:42-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": 3646297,
"timezone": "America/Chicago",
"twitter_user_id": null,
"layout_theme_id": 53,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-05-02T13:29:58-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
},
{
"subseason_id": 302608,
"team_instance_id": 1979872
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
}
getTeam Instances Index
The Index method returns an array of Team Instances matching the given parameters. This endpoint requires at least one parameter: either subseason_id
or league_instance_id
.
A list of team instances belonging to the provided League or Subseason is returned. An error is thrown if any of the parameters are invalid.
Parameters
Query Params
Id of Subseason
Id of LeagueInstance
id
Integer
Id of TeamInstance
created_at
Timestamp
Timestamp when created
updated_at
Timestamp
Timestamp of last update
team_id
Integer
Id of team
affects_standings
Boolean
Determines if this TeamInstance affects standings for the league
name
String
Name of team
roster_id
Integer
Id of roster that belongs to this TeamInstance
opponent
Boolean
Determines if this TeamInstance is an opponent for a SoloTeamLeague
parent_team_instance_id
Integer
If opponent is true, this is the id of the TeamInstance that this TeamInstance is an opponent of
image_id
Integer
Id of Image
abbrev
String
Abbreviation of this TeamInstance
primary_color
String
Primary color used in styling of team pages
secondary_color
String
Secondary color used in styling of team pages
button_title
String
Abbreviation of team. Used in various locations that have limited text.
gender
String
Gender of team (male, female, co-ed)
team
Object
Object representing the team irrespective of season or subseason
thumbnails
Object
Object with relative links to large, medium, and small thumbnails (derived)
subseason_ids
Array
Ids of Subseasons that this TeamInstance belongs to
Definition
Examples
Result Format
[
{
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-15T11:02:33-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
},
]
Path Params
Id belonging to the team_instance of interest
id
Integer
Unique id assigned by NGIN
name
String
Name of the team
buttom_title
String
Version of team name that displays on buttons and links
abbrev
String
Abbreviation of the team name
image_id
Integer
ID of the team image
primary_color
String
Hex code of the team's primary color
secondary_color
String
Hex code of the team's secondary color
thumbnails
Array of Strings
derived field. thumbnails of the team logo
created_at
Datetime
Timestamp of creation date
Uploaded_at
Datetime
Timestamp of last update
thumbnails
Hash
A hash of the thumbnail urls. Keys: small, medium, and large
roster_id
Integer
id of the roster assigned by NGIN
team_id
Integer
id of the team assigned by NGIN
affects_standings
Boolean
Determines if this teams games affect overall league/division standings
team
Hash
team data
Definition
Examples
Result Format
{
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-15T11:02:33-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
postTeam Instances Create
The Create method accepts a single Team Instance (see attributes above) and creates a new record in SportsEngine. This endpoint requires at least one parameter: either subseason_id
or league_instance_id
.
Parameters
Path Params
Body Params
ID of the node beneath which the team will be placed
Denotes whether the new Team Instance will be created under a new or existing Team
Top template for team page if new team
Top template for team page if existing team
Bottom template for team page if new team
Bottom template for team page if existing team
ID of Team of which to create new instance of
Name of team if team does not already exist
Button title of team if team does not already exist
Abbreviation of team name if team does not already exist
Team primary color if team does not already exist
Team secondary color if team does not already exist
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458074,
"existing_or_new": "new",
"top_new_team_template_id": 23220,
"bottom_new_team_template_id": 23221,
"team":
{
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA"
}
}
' "https://api.sportngin.com/team_instances?subseason_id=291621"
Result Format
{
"id": 1930618,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"team_id": 1413546,
"affects_standings": true,
"name": "API TEST TEAM",
"roster_id": 1892176,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"button_title": "API TEAM",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1413546,
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"image_id": null,
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"gender": null,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T11:53:00-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1930618
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
postTeam Instances Create (no league)
The Create method accepts a single Team Instance (see attributes above) and creates a new record in SportsEngine. A Single Team (aka Solo Team) is not tied to a particular parent organization. To create a Team Instance independent of a league, the endpoint does not require a subseason_id
or a league_instance_id
.
Parameters
Body Params
ID of the node beneath which the team will be placed
Denotes whether the new Team Instance will be created under a new or existing Team
Top template for team page if new team
Top template for team page if existing team
Bottom template for team page if new team
Bottom template for team page if existing team
Sport ID for the team being created
Season name (eg: 2017-2018)
Subseason name (eg: Regular Season)
ID of Team of which to create new instance of
Name of team if team does not already exist
Button title of team if team does not already exist
Abbreviation of team name if team does not already exist
Team primary color if team does not already exist
Team secondary color if team does not already exist
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"parent_node_id": 2458074,
"existing_or_new": "new",
"top_new_team_template_id": 23220,
"bottom_new_team_template_id": 23221,
"season":
{
"name": "2017-18"
},
"subseason":
{
"name": "Regular Season"
},
"league":
{
"sport_id": 1
},
"team":
{
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA"
}
}
' "https://api.sportngin.com/team_instances"
Result Format
{
"id": 1930618,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"team_id": 1413546,
"affects_standings": true,
"name": "API TEST TEAM",
"roster_id": 1892176,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "ATT",
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"button_title": "API TEAM",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1413546,
"name": "API TEST TEAM",
"button_title": "API TEAM",
"abbrev": "ATT",
"image_id": null,
"primary_color": "FFFFFF",
"secondary_color": "AAAAAA",
"gender": null,
"created_at": "2016-04-22T09:00:25-07:00",
"updated_at": "2016-04-22T09:00:25-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": 199530,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-20T11:53:00-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": null,
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1930618
}
],
"league_name": null,
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
Path Params
Id of TeamInstance to update
Definition
Examples
Result Format
{
"id": 1876244,
"created_at": "2016-03-22T13:19:31-07:00",
"updated_at": "2016-09-30T11:21:58-07:00",
"team_id": 1373612,
"affects_standings": true,
"name": "Buffalo Bison",
"roster_id": 1837159,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Buff",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Buff",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373612,
"name": "Buffalo Bison",
"button_title": "Buffalo",
"abbrev": "Buff",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-09-29T07:59:17-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": 3646297,
"timezone": "America/Chicago",
"twitter_user_id": null,
"layout_theme_id": 53,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-05-02T13:29:58-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
deleteTeam Instances Delete
The Delete method permanently deletes the associated TeamInstance record in SportsEngine. This method takes action upon initial invocation and cannot be reversed.
Parameters
Path Params
Id belonging to the team_instance of interest
Definition
Examples
Result Format
{
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-15T11:02:33-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
Path Params
id
Integer
Unique id assigned by NGIN
name
String
Name of the season
stat_prefence
Hash
Information about stat preferences for the season
roster_enabled
Boolean
Whether or not team_instances for the season will have rosters
schedule_enabled
Boolean
Whether or not to display games for this season in the game schedule
statistics_enabld
Boolean
Whether or not to calculate statistics for the season
created_at
Datetime
Timestamp of creation date
updated_at
Datetime
Timestamp of last update
id
Integer
Unique id assigned by NGIN
season_id
Integer
id of the season assigned by NGIN
force_real_time_scoring
Boolean
Whether or not to require all scoring to be done with Sport NGIN Live
original_scorer_can_edit
Boolean
Whether or not the original scorer is able to edit the stats
required_roster_fields
Array
List of required fields for rosters
email_list
String
List of emails to send updates to
email_time
Datetime
Time of day to send email updates
game_defaults
Hash
Sport specific defaults for games in this season
created_on
Datetime
Timestamp of creation date
updated_on
Datetime
Timestamp of last update
Hint
Stat_Preference may return other sport specific fields.
Definition
Examples
Result Format
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-14T09:43:56-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
Path Params
Id of the subseason of interest.
id
Integer
Unique id assigned by NGIN
season_id
Integer
id of the season assigned by NGIN
name
String
name for the subseason
standing_type_id
Integer
id of the standings assigned by NGIN
qaulifiers
Integer
number of possible qaulifiers
qaulifier_limit
Integer
Upper limit of the number of qualifiers
standings_aggregation_level
String
Level the standings are build at
snl_scoring_enabled
Boolean
Weather or not Sport NGIN Live is enabled for the subseason
position
Integer
Order of the subseasons in a season
created_at
Datetime
Timestamp of creation date
Updated_at
Datetime
Timestamp of last update
1
Hockey - NHL Classic with FPP
Identical to NHL Classic, but with the addition of Fair Play Points (FPP).
1
2
Hockey - NHL Classic
Teams receive 2 points for a win and 1 for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
1
3
Baseball - MLB
Teams are ordered by games behind, then winning percentage, and then wins.
4
4
Soccer - Universal
Teams receive 3 points for a win and 1 point for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
5
5
Hockey - NHL Current
Teams receive 2 points for a win, 1 for a tie, and 1 for an overtime loss. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
1
6
Lacrosse - MLL
Teams are ordered by games behind, then winning percentage, and then wins.
3
7
Football - NFL
Teams are ordered by games behind, then winning percentage, and then wins.
11
8
Basketball - NBA
Teams are ordered by games behind, then winning percentage, and then wins.
7
9
Box Lacrosse
Teams are ordered by games behind, then winning percentage, and then wins.
3
10
Seeded Single Elimination Bracket
Teams are seeded and play games within a single-elimination bracket.
11
Rugby Union With Bonus Points
Teams receive 4 points for a win and 2 for a tie. The losing team receives 1 point if they lost by 7 or less, and both teams receive a point if they have 4 or more tries. Teams are ordered by points, then wins, then losses (ascending), and then by games p
16
12
Rugby Union Without Bonus Points
Teams receive 4 points for a win and 2 for a tie. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
16
13
Custom Points
Points for the winning, losing, and tying teams are assigned for each game independently. Teams are ordered by points, then wins, then losses (ascending), and then by games played (ascending).
14
Hockey - Pond Hockey
Teams receive 3 points for a win and 0 for a loss, no ties. Teams are ordered by points, then goals against, then goals for (ascending).
1
15
Ultimate
Ultimate Standings
19
16
Volleyball
Volleyball Standings
12
17
Lacrosse - NLL
Identical to Lacrosse - MLL, but with no tie game option
3
Definition
Examples
Result Format
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-14T09:36:29-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
Events
An Event has a name, description, location, date and time. Events are often created manually on a Calendar Page in Sitebuilder, but they can also be created through this API.
A Game holds all pertinent competition-related information for an Event in SportsEngine. This is easy to remember: Games are really just a type of Event, but not necessarily the other way around!
Associations
An Event belongs to a Content Node, and can have a Game, a Dib Item, or a Survey.
A Game is always paired with an Event, and belongs to Team Instances, Subseasons.
A Game can have Scoring Plays, Posts, Photos, Video, News Articles, Game Player Stats, and Game Team Stats.
Hint
Games News Articles Create is used to attach a News Articles to a Game.
getEvents Index
The Index method returns an array of Events matching the given parameters. At least one of the required parameters must be included in the request.
Parameters
Query Params
Comma separated list of ids for Subseasons.
ID of a Team.
Comma separated list of IDs for Teams.
Id of site events belong to
Comma separated list of IDs for PageNodes.
When selecting by team, only select events for the current subseason.
Start of date range for query.
End of date range for query.
Page of result set.
Size of result set.
Direction of sorting. Possible values are asc or desc.
Definition
Examples
Result Format
{
"events": [
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game_id": null,
"game": null,
"has_game": false,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
},
{
"id": 307398486,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T18:00:00-05:00",
"end_date_time": "2016-04-07T18:00:00-05:00",
"updated_on": "2016-04-07T11:56:17-07:00",
"created_on": "2016-04-07T11:56:17-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T23:00:00-07:00",
"utc_end_date_time": "2016-04-07T23:00:00-07:00",
"local_timezone": "US/Central",
"game_id": null,
"game": null,
"has_game": false,
"comment_element_id": 289424103,
"recurring_event_originator_id": null,
"full_location_url": ""
},
],
"more": true
}
Path Params
ID of Event
id
Integer
ID of Event
title
String
Title of Event
description
String
Description of Event
location
String
Location of Event
location_url
String
URL of Location
start_date_time
DateTime
Start of Event
end_date_time
DateTime
End of Event
updated_on
Timestamp
Timestamp when last updated
created_on
Timestamp
Timestamp when created
imported_event_flag
Boolean
Flag for an imported Event
all_day_event
Boolean
Flag for an "all day" Event
event_type
String
Type of Event
recur_interval
String
Interval for repeating. Possible values are none, day, week, month, or year.
recur_interval_value
Integer
Multiplier for recur_interval
recur_week_sunday
Boolean
Repeats on Sunday
recur_week_monday
Boolean
Repeats on Monday
recur_week_tuesday
Boolean
Repeats on Tuesday
recur_week_wednesday
Boolean
Repeats on Wednesday
recur_week_thursday
Boolean
Repeats on Thursday
recur_week_friday
Boolean
Repeats on Friday
recur_week_saturday
Boolean
Repeats on Saturday
recur_month_repeat_by
String
Used if recur_interval is month. Possible values are day_of_month or day_of_week.
recur_end_date
DateTime
Date when to stop repeating
action
String
Action for location_url. Recommended values are _self and _blank.
protocol
String
Protocol of location_url. Possible values are http://, https://, or mailto://.
background_schedule_import_id
Integer
ID of BackgroundScheduleImport
event_import_id
Integer
Used for MaxSolutions
content_node_id
Integer
ID of ContentNode
ical_feed_id
Integer
ID of IcalFeed
ical_feed_uid
String
UID for a singular event in an iCal feed
layout_template
String
Layout for content
utc_start_date_time
DateTime
start_date_time converted to UTC
utc_end_date_time
DateTime
end_date_time converted to UTC
local_timezone
String
Timezone of Event
game
Object
Game Object
has_game
Boolean
game_id
Integer
ID of Game
comment_element_id
Integer
ID of CommentElement
recurring_event_originator_id
Integer
full_location_url
String
Fully constructed location URL
permissions
Object
Update and delete permissions object
Definition
Examples
Result Format
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
}
postEvents Create
The Create method accepts a single Event (see attributes above) and creates a new record in SportsEngine.
Parameters
Body Params
Title of the Event
Start of Event
End of Event
Array of PageNode IDs to be attached to
Location of Event
URL of Location
Protocol of location_url. Possible values are http://, https://, or mailto://.
game, practice, etc
Interval for repeating. Possible values are none, day, week, month, or year.
Repeats on Sunday
Repeats on Monday
Repeats on Tuesday
Repeats on Wednesday
Repeats on Thursday
Repeats on Friday
Repeats on Saturday
Used if recur_interval is month. Possible values are day_of_month or day_of_week.
Date when to stop repeating
Definition
Examples
Result Format
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
}
putEvents Update
The Update method accepts a single Event (see attributes above) and updates the matching record in SportsEngine.
Parameters
Body Params
Title of the Event
Start of Event
End of Event
Array of PageNode IDs to be attached to
Location of Event
Url of Location
Protocol of location_url. Possible values are http://, https://, or mailto://.
Interval for repeating. Possible values are none, day, week, month, or year.
Repeat on Sunday
Repeat on Monday
Repeat on Tuesday
Repeat on Wednesday
Repeat on Thursday
Repeat on Friday
Repeat on Saturday
Used if recur_interval is month. Possible values are day_of_month or day_of_week.
Date when to stop repeating
Definition
Examples
curl -X PUT -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
"event": {
"title": "Boston Bears Updated Event",
"start_date_time": "2016-04-07T10:00:00-5:00"
}
}' "https://api.sportngin.com/events/306304983"
Result Format
{
"id": 306304983,
"title": "Boston Bears Updated Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-07T09:44:37-07:00",
"created_on": "2016-04-07T09:43:19-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288311109,
"recurring_event_originator_id": null,
"full_location_url": ""
}
deleteEvents Delete
The Delete method permanently deletes the associated Event record in SportsEngine. This method takes action upon initial invocation and cannot be reversed.
Parameters
Path Params
Id of Event
Definition
Examples
Result Format
{
"id": 306927600,
"title": "Boston Bears Event",
"description": null,
"location": "",
"location_url": "",
"start_date_time": "2016-04-07T10:00:00-05:00",
"end_date_time": "2016-04-07T10:00:00-05:00",
"updated_on": "2016-04-06T11:54:38-07:00",
"created_on": "2016-04-06T11:54:38-07:00",
"imported_event_flag": false,
"all_day_event": false,
"event_type": null,
"recur_interval": "none",
"recur_interval_value": null,
"recur_week_sunday": false,
"recur_week_monday": false,
"recur_week_tuesday": false,
"recur_week_wednesday": false,
"recur_week_thursday": false,
"recur_week_friday": false,
"recur_week_saturday": false,
"recur_month_repeat_by": null,
"recur_end_date": null,
"action": "_self",
"protocol": "",
"background_schedule_import_id": null,
"event_import_id": null,
"content_node_id": null,
"ical_feed_id": null,
"ical_uid": null,
"layout_template": "two_panel",
"utc_start_date_time": "2016-04-07T15:00:00-07:00",
"utc_end_date_time": "2016-04-07T15:00:00-07:00",
"local_timezone": "US/Central",
"game": null,
"has_game": false,
"game_id": null,
"comment_element_id": 288944370,
"recurring_event_originator_id": null,
"full_location_url": ""
}
getGames Index
The Index method returns an array of Games matching the given parameters. This endpoint requires page
, and either subseason_id
, division_instance_id
, or team_instance_id
.
Optional parameters include: before
(inclusive, formatted mm-dd-yyyy), after
(inclusive, formattted mm-dd-yyyy), today
, and filters
.
Parameters
Query Params
Page of results to display
Number of results to display per page
Definition
Examples
curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/games?subseason_id=291621&page=1"
Result Format
[
{
"id": 13557129,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307388787,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:11:20-07:00",
"updated_at": "2016-04-07T11:11:27-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352836,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289413351,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557129?subseason=291621",
"start_date_time": "2016-04-28T13:15:00-05:00",
"end_date_time": "2016-04-28T13:15:00-05:00",
"location": "Joe Louis Arena",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central"
},
{
"id": 13557134,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307389556,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:12:41-07:00",
"updated_at": "2016-04-07T11:17:20-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352841,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289414128,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557134?subseason=291621",
"start_date_time": "2016-04-28T14:15:00-05:00",
"end_date_time": "2016-04-28T14:15:00-05:00",
"location": "TD Garden",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central"
}
]
Path Params
id
Integer
Unique ID assigned by NGIN
sport_id
Integer
ID of the game's sport
status
String
The status of the game (unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, delayed)
subseason_id
Integer
ID of subseason assigned by NGIN
team_1_id
Integer
ID of Team 1 instance: set as home by default
team_2_id
Integer
ID of Team 2 instance: set as away by default
start_date_time
Datetime
Timestamp of the start time of the game
end_date_time
Datetime
Timestamp of the end time of the game: derived from start time if not passed
home_team_id
Integer
ID of the home teaminstance: can be used in place of team#_id once game exists
away_team_id
Integer
ID of the away teaminstance: can be used in place of team#_id once game exists
team_1_is_home
Boolean
Defaults to true: false will set team_2 as home
location
String
Description of the location of the game
location_url_protocol
String
HTTP protocol of the location_url
location_url
String
URL for the location (excludes http protocol)
description
String
Description of the game
referee_signoff
String
Text that represents an Official signing off on the game
notes
String
Extra notes and information for the game
submitted_on
Timestamp
Timestamp when the game is first saved in completed status
properties
Object
Additional properties for the game
image_id
Integer
ID of Image
game_id
Integer
ID of Game for other team
embed_code
String
Custom code that goes on the game show page
officials
Array
Officials for the game
extra_game_details
Object
Extra information about the game
affects_standings
Boolean
Whether or not the game affects the teams' standings
created_at
Timestamp
Timestamp of creation date
updated_at
Timestamp
Timestamp of last update
time_remaining
Time
Derived field. Remaining time of a game
currernt_period
Integer
Derived field. Current period of a game
score_by_time_interval
Array
Derived field. Scores by game periods
home_team_name
String
Name of the home team
home_team_abbrev
String
Abbreviation of the home team
home_team_button_title
String
Button title of the home team
home_team_logo
String
Image url of the home team
home_team_logo_large_square
String
URL of large square image of the home team
home_team_score_api
Integer
Read only - use the Quick Score API to update final game scores
away_team_name
String
Name of the away team
away_team_abbrev
String
Abbreviation of the away team
away_team_button_title
String
Button title of the away team
away_team_logo
String
Image url of the away team
away_team_logo_large_square
String
Url of large square image of the away team
away_team_score_api
Integer
Read only - use the Quick Score API to update final game scores
scoring_type
String
Possible values are quick, tabular, live, unscored
live_scoring_locked
Boolean
Can't live score if locked
division_override
Boolean
Force division game
field_of_play_enabled
Boolean
Display field on game show page
game_stats_updated_at
Timestamp
Timestamp when the game stats were last updated
team_1_division_id
Integer
Scope available teams on a TBD game for team_1
team_2_division_id
Integer
Scope available teams on a TBD game for team_2
comment_element_id
Integer
Id of CommentElement
total_interval_count
Integer
Number of periods or quarters
game_show_url
String
Url to the game page
overtime_game
Boolean
Determines if this game went into overtime
half_point_scorable
Boolean
Determines if half-points are allowed when scoring
local_timezone
String
Timezone of the Game
live_scoring_url
String
Url to live-score the game
id
Integer
Unique id assigned by NGIN
name
String
Name of the official
official_type_id
Integer
id of the type of official
created_at
Datetime
Timestamp of creation date
updated_at
Datetime
Timestamp of last update
id
Integer
Unique id assigned by NGIN
ext_game_id
String
User specified game id number
weather_conditions
String
Description of the weather conditions for the game
wind_speed
Integer
Wind speed for the game
wind_speed_units
String
Units the wind speed is measured in
wind_direction
String
Direction the wind was blowing during the game
temperature
Integer
Temperature during the game
temperature_units
String
Units the temperature is measured in
attendance
Integer
Number of spectators attending the game
sellout
Boolean
Whether or not the game sold out
night_game
Boolean
Whether or not the game was played at night
neutral_field
Boolean
Whether or not the game was played on a neutral field
natural_surface
Boolean
Whether or not the game was played on a natural surface
created_at
Datetime
Timestamp of creation date
updated_at
Datetime
Timestamp of last update
Definition
Examples
Result Format
{
"id": 13557134,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307389556,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:12:41-07:00",
"updated_at": "2016-04-07T11:17:20-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352841,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289414128,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557134?subseason=291621",
"start_date_time": "2016-04-28T14:15:00-05:00",
"end_date_time": "2016-04-28T14:15:00-05:00",
"location": "TD Garden",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central",
"permissions": {
"score": true
},
"live_scoring_url": "https://live.sportngin.com/live/ice_hockey/13557134?auth_token=CM9Vq15fC7JxyEwgmxs3"
}
postGames Create
The Create method accepts a single Game (see attributes above) and creates a new record in SportsEngine.
Parameters
Body Params
Id of a TeamInstance
Id of a TeamInstance
Id of a Subseason
Id of a Sport
Location of Event
Possible values are unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, or delayed.
Start date and time of game
End date and time of game
Used to determine home team
Url of Location
Protocol of location_url. Possible values are http://, https://, or mailto://.
Timezone of Location
The Game affects the league standings
Possible values are live, tabular, quick, or unscored.
Notes about the Game
Attributes of Event for Game
ExtraGameDetails of Game
Officials of Game
QuickScore of Game
Properties of Game
Definition
Examples
curl -X POST -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{
"game": {
"team_1_id": "1876243",
"team_2_id": "1876249",
"subseason_id": "291621",
"sport_id": "1",
"status": "scheduled",
"start_date_time": "2016-04-28T14:15:00-05:00",
"team_1_is_home": "true",
"location": "Joe Louis Arena"
}
}' "https://api.sportngin.com/games"
Result Format
{
"id": 13557134,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307389556,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:12:41-07:00",
"updated_at": "2016-04-07T11:12:42-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352841,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289414128,
"total_interval_count": 3,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557134?subseason=291621",
"start_date_time": "2016-04-28T14:15:00-05:00",
"end_date_time": "2016-04-28T14:15:00-05:00",
"location": "Joe Louis Arena",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central"
}
putGames Update
The Update method accepts a single Game (see attributes above) and updates the matching record in SportsEngine.
Parameters
Path Params
ID of Game
Body Params
ID of a TeamInstance
ID of a TeamInstance
ID of a Subseason
ID of a Sport
Location of Event
Possible values are unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, or delayed.
Start date and time of game
End date and time of game
Used to determine home team
URL of Location
Protocol of location_url. Possible values are http://, https://, or mailto://.
Timezone of Location
The Game affects the league standings
Possible values are live, tabular, quick, or unscored.
Notes about the Game
Attributes of Event for Game
ExtraGameDetails of Game
Officials of Game
QuickScore of Game
Properties of Game
Definition
Examples
Result Format
{
"id": 13557134,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307389556,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:12:41-07:00",
"updated_at": "2016-04-07T11:17:20-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352841,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289414128,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557134?subseason=291621",
"start_date_time": "2016-04-28T14:15:00-05:00",
"end_date_time": "2016-04-28T14:15:00-05:00",
"location": "TD Garden",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central"
}
deleteGames Delete
The Delete method permanently deletes the associated Game record in SportsEngine. This method takes action upon initial invocation and cannot be reversed.
Parameters
Path Params
Definition
Examples
Result Format
{
"id": 13557134,
"team_1_id": 1876243,
"team_1_is_home": true,
"team_2_id": 1876249,
"team_2_name": null,
"subseason_id": 291621,
"event_id": 307389556,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": null,
"submitted_on": null,
"created_at": "2016-04-07T11:12:41-07:00",
"updated_at": "2016-04-07T11:17:20-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"original_scorer_id": null,
"last_editor_id": null,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": null,
"quick_score_id": null,
"extra_game_details_id": 11352841,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1876243,
"away_team_id": 1876249,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Detroit Cyclists",
"away_team_abbrev": "Det",
"away_team_button_title": "Detroit",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 289414128,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/13557134?subseason=291621",
"start_date_time": "2016-04-28T14:15:00-05:00",
"end_date_time": "2016-04-28T14:15:00-05:00",
"location": "TD Garden",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "US/Central",
"permissions": {
"score": true
},
"live_scoring_url": "https://live.sportngin.com/live/ice_hockey/13557134?auth_token=CM9Vq15fC7JxyEwgmxs3"
}
Schedule Imports
The Schedule Import tool allows users to upload a file of Events and automatically assign them to Team and General pages rather than having to manually enter the information. The Team and Page assignments are defined by creating Mapping Codes.
getSchedule Imports Index
The Index method returns an array of Schedule Import Statuses matching the given parameters. The Status records represent the status of previously started imports.
Parameters
Query Params
site_id
Integer
The id of the site events will be created for.
mass_repalce
Boolean
1 to replace previously uploaded events
ignore_previous
Boolean
1 to ignore events prior to today's date(if mass replace is 1).
commenting_enabled
Boolean
1 if comments should be enable d on created games.
repalce_own_events_only
Boolean
1 to replace only events that were updated by the current user.
file
File
A schedule uploaded file in a specific format.
import_type
String
Defaults to standard Sport Ngin Template. Set to "max" if MaxSolutions, Schedulewerks (Puck Systems), or Diamond Scheduler file format is being used.
Definition
Examples
Result Format
[
{
"commenting_enabled": false,
"content_type": "text/csv",
"created_at": "2016-04-14T12:33:32-07:00",
"filename": "schedule.csv",
"finished_at": "2016-04-14T12:33:33-07:00",
"id": 146350,
"ignore_previous_games": null,
"import_type": "tst",
"mass_replace": false,
"replace_own_events_only": null,
"site_id": 11953,
"size": 174,
"started_at": "2016-04-14T12:33:32-07:00",
"status": "complete",
"status_percentage": 0,
"total_number_of_records": 21,
"user_id": 3156422,
"status_message": "File Import Completing, please wait..."
},
{
"commenting_enabled": false,
"content_type": "text/csv",
"created_at": "2016-04-14T12:29:17-07:00",
"filename": "schedule.csv",
"finished_at": "2016-04-14T12:29:19-07:00",
"id": 146349,
"ignore_previous_games": null,
"import_type": "tst",
"mass_replace": false,
"replace_own_events_only": null,
"site_id": 11953,
"size": 174,
"started_at": "2016-04-14T12:29:19-07:00",
"status": "complete",
"status_percentage": 0,
"total_number_of_records": 21,
"user_id": 3156422,
"status_message": "File Import Completing, please wait..."
}
]
getSchedule Imports Progress
This specialized Progress method returns a single Schedule Import Progress for a given id
.
Parameters
Path Params
Progress has the HTTP method of GET and requires the parameter of id.
Definition
Examples
Result Format
{
"filename": "schedule.csv",
"status": "complete",
"status_percentage": 0,
"total_number_of_records": 21,
"status_message": "File Import Completing, please wait..."
}
postSchedule Imports Create
The Create method accepts a single File, and begins processing the file to create new Event records in SportsEngine.
The import process is asynchronous. You can check on the progress of your import using either the Schedule Imports Index or Schedule Imports Progress endpoints.
Parameters
Body Params
The id of the site events will be created for
1 to replace previously uploaded events
1 to ignore events prior to today's date (if mass replace is 1)
1 if comments should be enabled on created games.
1 to replace only events that were uploaded by the current user.
A schedule upload file in a specific format.
Defaults to standard SportsEngine Template. Set to "max" if MaxSolutions, Schedulewerks (Puck Systems), or Diamond Scheduler file format is being used.
Definition
Examples
curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Cache-Control: no-cache" -H "Postman-Token: 1a297390-c29c-d224-3e98-387fa187021f" -H "Content-Type: multipart/form-data" -F "site_id=11953" -F "mass_replace=0" -F "ignore_previous_games=0" -F "commenting_enabled=0" -F "replace_own_events_only=0" -F "file=@[object Object]" "https://api.stage.ngin-staging.com/schedule_imports"
Result Format
{
"commenting_enabled": false,
"content_type": "text/csv",
"created_at": "2016-04-14T12:33:32-07:00",
"filename": "schedule.csv",
"finished_at": null,
"id": 146350,
"ignore_previous_games": null,
"import_type": "tst",
"mass_replace": false,
"replace_own_events_only": null,
"site_id": 11953,
"size": 174,
"started_at": null,
"status": null,
"status_percentage": 0,
"total_number_of_records": null,
"user_id": 3156422,
"status_message": "Schedule upload in progress, please wait..."
}
getMapping Codes Index
Query Params
Definition
Examples
Result Format
[
{
"page_node_id": 2394451,
"node_id": 645748,
"node_type": "Page",
"page_title": "Home"
},
{
"page_node_id": 2394452,
"node_id": 645749,
"node_type": "Page",
"page_title": "Other Home Pages"
},
{
"page_node_id": 2394453,
"node_id": 645750,
"node_type": "Page",
"page_title": "DIY Home"
},
{
"page_node_id": 2394456,
"node_id": 645752,
"node_type": "Page",
"page_title": "Starter Home"
},
{
"page_node_id": 2394458,
"node_id": 645754,
"node_type": "Page",
"page_title": "Pro Home"
},
{
"page_node_id": 2394465,
"node_id": 645758,
"node_type": "Page",
"page_title": "Hockey League"
},
{
"page_node_id": 2458063,
"node_id": 27737,
"node_type": "League",
"page_title": "Eastern League (All Seasons)"
},
{
"page_node_id": 2458062,
"node_id": 41683,
"node_type": "LeagueInstance",
"page_title": "Eastern League"
},
{
"page_node_id": 2458064,
"node_id": 291621,
"node_type": "Subseason",
"page_title": "Regular Season"
},
{
"created_on": "2016-04-11T13:24:48-07:00",
"id": 454038,
"mapping_code": "map1234",
"page_node_id": 2458074,
"updated_on": "2016-04-11T13:24:48-07:00",
"node_id": 181552,
"node_type": "DivisionInstance",
"page_title": "Oceanic Division",
"subseason_name": "Regular Season",
"season_name": "2016"
},
{
"page_node_id": 2458139,
"node_id": 1876243,
"node_type": "TeamInstance",
"page_title": "Boston Bears",
"subseason_name": "Regular Season",
"season_name": "2016"
},
{
"page_node_id": 2458140,
"node_id": 1876244,
"node_type": "TeamInstance",
"page_title": "Buffalo Bison",
"subseason_name": "Regular Season",
"season_name": "2016"
},
{
"page_node_id": 2458145,
"node_id": 1876249,
"node_type": "TeamInstance",
"page_title": "Detroit Cyclists",
"subseason_name": "Regular Season",
"season_name": "2016"
},
]
Definition
Examples
Result Format
{
"created_on": "2016-04-11T13:27:36-07:00",
"id": 457677,
"mapping_code": "map1234",
"page_node_id": 2458074,
"site_id": 11953,
"subseason_id": 291621,
"team_instance_id": null,
"updated_on": "2016-04-11T13:27:36-07:00"
}
putMapping Codes Update
The Update method accepts a single Mapping Code (see attributes above) and updates the matching record in SportsEngine.
Parameters
Path Params
Definition
Examples
Result Format
{
"created_on": "2016-04-11T13:27:36-07:00",
"id": 457677,
"mapping_code": "map9876",
"page_node_id": 2458074,
"site_id": 11953,
"subseason_id": 291621,
"team_instance_id": null,
"updated_on": "2016-04-11T13:34:43-07:00"
}
deleteMapping Codes Delete
The Delete method permanently deletes the matching Mapping Code record in SportsEngine. This method takes action upon initial invocation and cannot be reversed.
Parameters
Path Params
Delete uses the HTTP method of DELETE and requires the parameter of id.
Definition
Examples
Result Format
{
"created_on": "2016-04-11T13:27:36-07:00",
"id": 457677,
"mapping_code": "map9876",
"page_node_id": 2458074,
"site_id": 11953,
"subseason_id": 291621,
"team_instance_id": null,
"updated_on": "2016-04-11T13:34:43-07:00"
}
Quick Scores
Quick Score is a method by which users can quickly update the status and final scores of a Game, but without having to alter stats, or enter scores by period.
postQuick Scores Create
The Create method accepts a Quick Score (see attributes above) and creates a new record in SportsEngine associated to the given Game.
Parameters
Body Params
Game Status (scheduled, in_progress, complete, etc.)
The score including the game_id
home_team_score
Integer
Game score for home team
away_team_score
Integer
Game score for away team
game_status_game_id
String
Status for game, possible values are: scheduled, in_progress, completed. See example below for details on replacing the "game_id" of the attribute with an actual game id.
Definition
Examples
curl -X POST -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{
"game_status_13557134": "in_progress",
"quick_score":
{
"13557134":
{
"home_team_score": 2,
"away_team_score": 4
}
}
}' "https://api.sportngin.com/quick_scores"
Result Format
{
"success": true
}
postQuick Scores Update
The Update method accepts a single Quick Score (see attributes above) and overwrites the existing score with the new score.
Parameters
Body Params
Game Status (scheduled, in_progress, complete, etc.)
The score including the game_id
Hint
Game Status: this parameter has the game id embedded in the parameter. An example is: game_status_1234567=in_progress
Home/Away Team Score: these two parameters must have the game id embedded between the first set of brackets, the home/away in the second set of brackets then the score value assigned to the parameter. An example is: quick_score[1234567][home_team_score]=1
Definition
Examples
curl -X POST -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{
"game_status_13557134": "in_progress",
"quick_score":
{
"13557134":
{
"home_team_score": 3,
"away_team_score": 4
}
}
}' "https://api.sportngin.com/quick_scores"
Result Format
{
"success": true
}
Standings
Standings provides access to the League standings information for a Team or Division.
The attributes for standings will vary depending on the Sport and Standings type selected for that Subseason. Typically all standings will include games_played
, win_count
, loss_count
, and tie_count
. Other Sport/Standings specific information will be included where appropriate.
Standings data is returned in order of Teams' standings from best to worst within the Division.
A Bracket is a tree diagram that represents a series of Games to be played during a Tournament.
For Bracket standing type, Games that are in the same Brackets are grouped together in an array.
Associations
A Bracket belongs to a Division Instance and/or a Subseason. A Bracket has many Bracket Nodes by Round
, Bracket Rounds
, and Bracket Nodes
. A Bracket can be associated with Standings.
Hint
Brackets are named as such because it appears to be a large set of interconnected punctuational bracket marks as traditionally drawn on a sheet of paper.
getBrackets Index
Query Params
ID of subseason the brackets belong to
Definition
Examples
Result Format
[
{
"id": 10843,
"owner_id": 192056,
"owner_type": "DivisionInstance",
"created_at": "2016-05-02T10:04:12-07:00",
"updated_at": "2016-05-02T10:04:12-07:00",
"round_labels": {},
"hide_seed_number": null,
"owner_name": "Oceanic Division"
},
{
"id": 10844,
"owner_id": 192057,
"owner_type": "DivisionInstance",
"created_at": "2016-05-02T10:04:49-07:00",
"updated_at": "2016-05-02T10:04:49-07:00",
"round_labels": {},
"hide_seed_number": null,
"owner_name": "Cooke Division"
}
]
Path Params
ID of the bracket to be returned
Query Params
Definition
Examples
Result Format
[
[
{
"id": 79741,
"bracket_id": 10843,
"round": 1,
"position": 1,
"parent_id": 79739,
"game_id": 14089241,
"top_seed": 1,
"bottom_seed": 8,
"game": {
"id": 14089241,
"team_1_id": 1979872,
"team_1_is_home": true,
"team_2_id": 1979879,
"team_2_name": null,
"subseason_id": 302608,
"event_id": 319256773,
"status": "scheduled",
"affects_standings": 1,
"referee_signoff": null,
"notes": "",
"submitted_on": null,
"created_at": "2016-05-02T10:04:14-07:00",
"updated_at": "2016-05-02T10:05:35-07:00",
"properties": {
"added_periods": null,
"my_num_non_overtime_periods": null,
"my_num_periods": null,
"overtime_intervals": 2,
"overtime_length": "5",
"quick_score_overtime": false,
"quick_score_shootout": false,
"regulation_time_intervals": [
"20",
"20",
"20"
],
"shootout_enabled": false,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
]
},
"enable_live_webcast": true,
"image_id": null,
"sport_id": 1,
"game_id": null,
"embed_code": "",
"quick_score_id": null,
"extra_game_details_id": 11884787,
"scoring_type": "unscored",
"live_scoring_locked": null,
"division_override": null,
"field_of_play_enabled": false,
"game_stats_updated_at": null,
"team_1_division_id": null,
"team_2_division_id": null,
"home_team_id": 1979872,
"away_team_id": 1979879,
"home_team_name": "Boston Bears",
"home_team_abbrev": "Bos",
"home_team_button_title": "Boston",
"away_team_name": "Toronto Trees",
"away_team_abbrev": "Tor",
"away_team_button_title": "Toronto",
"home_team_logo": null,
"away_team_logo": null,
"home_team_logo_large_square": null,
"away_team_logo_large_square": null,
"current_period": 0,
"time_remaining": null,
"score_by_time_interval": [
"scheduled"
],
"home_team_score_api": 0,
"away_team_score_api": 0,
"comment_element_id": 301487794,
"total_interval_count": 0,
"game_show_url": "http://apidemo.sportngin.com/game/show/14089241?subseason=302608",
"start_date_time": "2016-06-30T10:00:00-05:00",
"end_date_time": "2016-06-30T10:00:00-05:00",
"location": "",
"overtime_game": false,
"half_point_scorable": false,
"local_timezone": "America/Chicago"
}
},
]
getStandings Index
The Index method returns an array of Events matching the given parameters, including at least one of division_instance_id
and team_instance_id
.
Parameters
Query Params
Definition
Examples
Result Format
[
{
"id": 32402,
"games_played": 0,
"win_count": 0,
"loss_count": 0,
"tie_count": 0,
"overtime_loss": 0,
"goals_for": 0,
"goals_against": 0,
"points": 0,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-22T13:19:12-07:00",
"team_instance_id": 1876243,
"subseason_id": 291621,
"secondary_record": "0-0-0-0",
"shootout_loss": 0,
"sort_override": 0,
"team_instance": {
"id": 1876243,
"created_at": "2016-03-22T13:19:12-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"team_id": 1373611,
"affects_standings": true,
"name": "Boston Bears",
"roster_id": 1837158,
"opponent": null,
"parent_team_instance_id": null,
"image_id": null,
"abbrev": "Bos",
"primary_color": "000000",
"secondary_color": "000000",
"button_title": "Boston",
"gender": "male",
"management_team_id": null,
"team": {
"id": 1373611,
"name": "Boston Bears",
"button_title": "Boston",
"abbrev": "Bos",
"image_id": null,
"primary_color": "000000",
"secondary_color": "000000",
"gender": "male",
"created_at": "2016-03-22T13:06:41-07:00",
"updated_at": "2016-03-23T09:34:28-07:00",
"sport_id": 1,
"opponent": null,
"parent_team_id": null,
"ios_whitelabel_url": null,
"android_whitelabel_url": null,
"sites": [
{
"id": 11953,
"domain_id": 1149,
"domain_name": "sportngin.com",
"subdomain": "apidemo",
"product_id": 14,
"name": "Sport Ngin API Demo Site",
"short_name": "Sport Ngin API Demo Site",
"created_on": "2016-02-24T06:32:26-08:00",
"updated_on": "2016-04-08T10:04:54-07:00",
"created_by_user_id": 3156422,
"updated_by_user_id": null,
"timezone": "US/Central",
"twitter_user_id": null,
"layout_theme_id": 51,
"secure_subdomain": "apidemo",
"address_id": 4447713,
"membership_privacy": "open",
"membership_grace_period": 1,
"boss_billing_account_id": null,
"boss_organization_id": 27743
}
],
"leagues": [
{
"id": 27737,
"name": "Eastern League",
"current_subseason_id": 291621,
"site_id": 11953,
"sport_id": 1,
"image_id": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-24T07:20:49-07:00",
"button_title": "Eastern",
"primary_color": "00AEEF",
"secondary_color": "666666",
"gender": "male",
"abbrev": "East",
"score_ribbon": false,
"tweet_games": null,
"game_sheet_label": "gamesheet"
}
],
"thumbnails": {},
"thumbnails_ssl": {},
"current_subseason_ids": [
291621
],
"seasons": [
{
"id": 267440,
"name": "2016",
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"solo_team_league_id": null,
"has_metadata": null,
"show_shared_schedule": false,
"stat_preference": {
"id": 292407,
"updated_on": "2016-03-22T12:46:58-07:00",
"created_on": "2016-03-22T12:46:58-07:00",
"game_defaults": {
"auto_navigate_to_play_details": true,
"field_of_play_enabled": false,
"game_misconduct_time": 0,
"ice_hockey_goalie_order_by": null,
"ice_hockey_goalie_order_by_secondary": null,
"ice_hockey_goalie_order_dir": null,
"ice_hockey_goalie_order_dir_secondary": null,
"ice_hockey_goalie_stat_qualify_by": null,
"ice_hockey_goalie_stat_qualify_val": null,
"ice_hockey_skater_order_by": null,
"ice_hockey_skater_order_by_secondary": null,
"ice_hockey_skater_order_dir": null,
"ice_hockey_skater_order_dir_secondary": null,
"ice_hockey_skater_stat_qualify_by": null,
"ice_hockey_skater_stat_qualify_val": null,
"ice_hockey_team_scoring_order_by": "pts",
"ice_hockey_team_scoring_order_by_secondary": null,
"ice_hockey_team_scoring_order_dir": "desc",
"ice_hockey_team_scoring_order_dir_secondary": null,
"ice_hockey_team_scoring_stat_qualify_by": null,
"ice_hockey_team_scoring_stat_qualify_val": null,
"ice_hockey_team_stats_order_by": null,
"ice_hockey_team_stats_order_by_secondary": null,
"ice_hockey_team_stats_order_dir": null,
"ice_hockey_team_stats_order_dir_secondary": null,
"ice_hockey_team_stats_stat_qualify_by": null,
"ice_hockey_team_stats_stat_qualify_val": null,
"intermission_length": 1,
"major_adjustment_time": 0,
"major_penalty_time": 5,
"match_penalty_time": 5,
"max_goal_differential": 0,
"max_player_major_penalties": 2,
"max_player_penalties": 5,
"max_team_penalties": 15,
"minor_adjustment_time": 0,
"minor_penalty_time": 2,
"misconduct_time": 10,
"overtime_intervals": 2,
"overtime_length": "5",
"post_live_updates": true,
"regulation_time_intervals": null,
"shootout_enabled": false,
"stop_run_time": true,
"time_interval_name": "period",
"time_intervals": [
"20",
"20",
"20"
],
"timeout_time": 1,
"timeouts": 1,
"track_goal_types": true,
"track_player_sog": true,
"warmup_length": 5
},
"season_id": 267440,
"original_scorer_can_edit": null,
"force_real_time_scoring": false,
"stat_tool_id": 1848623,
"stats_can_be_unlinked": null,
"scoring_methods": "--- \n- live\n- mass\n- tabular\n- quick\n",
"can_edit_final": "league_owner",
"traded_player_stats": null,
"game_sheet_auto_summary_enabled": true,
"visible_stats": "league_xor_division"
},
"subseasons": [
{
"id": 291621,
"name": "Regular Season",
"season_id": 267440,
"position": 1,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-04-14T09:43:56-07:00",
"snl_scoring_enabled": true,
"statistic_grouping_id": 417884,
"workers_completed": null,
"standing_preference": {
"id": 110425,
"standing_tool_id": 1848627,
"standing_type_id": 5,
"standings_aggregation_level": "league",
"qualifiers": null,
"qualifier_limit": null,
"created_at": "2016-03-22T12:46:58-07:00",
"updated_at": "2016-03-22T12:46:58-07:00",
"winning_team_custom_points": null,
"losing_team_custom_points": null,
"tied_team_custom_points": null,
"label_mapping": {},
"extended_fields": [
"win_count",
"loss_count",
"tie_count",
"points"
],
"order_rule": 1,
"overtime_win_custom_points": null,
"overtime_loss_custom_points": null,
"overtime_wins_include_in_wins": true,
"overtime_losses_include_in_losses": true,
"legacy_custom_points": false
},
"live_scoring_stat_configuration": {
"show_plus_minus": null,
"fair_play_points": false
}
}
]
}
],
"subseason_team_instance_mapping": [
{
"subseason_id": 291621,
"team_instance_id": 1876243
}
],
"league_name": "Eastern League",
"site_name": "Sport Ngin API Demo Site",
"sport_name": "Ice Hockey"
},
"thumbnails": {},
"subseason_ids": [
291621
]
}
},
]
Rosters
A Roster is a group of Roster Players who play together on a Team Instance in a given Season.
Retrieving an array of the members on the current Roster can be achieved by calling the Rosters Show method, however the Roster Players Index method may be used to retrieve an array of Roster Players as well.
Associations
A Roster belongs to a Team Instance (a Team by Season) and contains an array of Roster Players.
getRosters Index
Query Params
Ids of team instances for which rosters will be displayed
Id of team for which roster will be displayed along with each rosters'
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/rosters?team_instance_ids=1876243"
Result Format
[
{
"id": 1837158,
"updated_on": "2016-04-14T09:43:56-07:00",
"created_on": "2016-03-22T13:19:12-07:00",
"static_group_id": 1055410,
"opponent": null,
"name": null,
"survey_id": null,
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League"
}
]
getRosters Show
The Show method returns an array of Roster Players matching the given parameters. A Roster belongs to a Team Instance, which is identified with the required parameter team_instance_id
.
Optionally, the Show method can return an array of Roster Players for a Game by passing the game_id
parameter.
Parameters
Path Params
Id of a Roster
Query Params
Id of a Game
Id of a TeamInstance
id
Integer
Id of Roster
updated_on
Timestamp
Timestamp of last update
created_on
Timestamp
Timestamp when created
static_group_id
Integer
Id of StaticGroup
opponent
Boolean
Determines if the team is an opponent for a SoloTeamLeague
name
String
Name of an unattached roster created using the rostering tool
survey_id
Integer
Id of Survey that an unattached roster belongs to
team_name
String
Name of the team that a roster belongs to (derived)
division_name
String
Name of the division that a roster belongs to (derived)
league_name
String
Name of the league that a roster belongs to (derived)
permissions
Object
Permissions of the current user for this roster
Definition
Examples
curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/rosters/1837158"
Result Format
{
"id": 1837158,
"updated_on": "2016-04-14T09:43:56-07:00",
"created_on": "2016-03-22T13:19:12-07:00",
"static_group_id": 1055410,
"opponent": null,
"name": null,
"survey_id": null,
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"roster_players": [
{
"id": 11575453,
"roster_id": 1837158,
"jersey_number": "1",
"updated_on": "2016-04-11T09:02:39-07:00",
"created_on": "2016-03-23T10:07:46-07:00",
"content_node_id": 20168056,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Christopher",
"last_name": "Breen",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 2,
"name": "Defense",
"abbreviation": "D",
"sport_id": 1,
"position": 2,
"updated_on": "2007-03-07T13:39:44-08:00",
"created_on": null,
"ar_association_key_name": 11575453
}
],
"persona_id": 18922209,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575453",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
{
"id": 11575454,
"roster_id": 1837158,
"jersey_number": "2",
"updated_on": "2016-03-28T12:02:15-07:00",
"created_on": "2016-03-23T10:07:47-07:00",
"content_node_id": 20168057,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Craig",
"last_name": "Cunningham",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 1,
"name": "Forward",
"abbreviation": "F",
"sport_id": 1,
"position": 1,
"updated_on": "2007-03-07T13:39:32-08:00",
"created_on": null,
"ar_association_key_name": 11575454
}
],
"persona_id": 18922316,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575454",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
{
"id": 11575455,
"roster_id": 1837158,
"jersey_number": "3",
"updated_on": "2016-03-28T12:02:37-07:00",
"created_on": "2016-03-23T10:07:48-07:00",
"content_node_id": 20168058,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Justin",
"last_name": "Florek",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 1,
"name": "Forward",
"abbreviation": "F",
"sport_id": 1,
"position": 1,
"updated_on": "2007-03-07T13:39:32-08:00",
"created_on": null,
"ar_association_key_name": 11575454
}
],
"persona_id": 18922324,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575455",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
{
"id": 11575456,
"roster_id": 1837158,
"jersey_number": "4",
"updated_on": "2016-03-28T12:02:46-07:00",
"created_on": "2016-03-23T10:07:52-07:00",
"content_node_id": 20168060,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Alexander",
"last_name": "Khokhlachev",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 1,
"name": "Forward",
"abbreviation": "F",
"sport_id": 1,
"position": 1,
"updated_on": "2007-03-07T13:39:32-08:00",
"created_on": null,
"ar_association_key_name": 11575454
}
],
"persona_id": 18922330,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575456",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
{
"id": 11575457,
"roster_id": 1837158,
"jersey_number": "5",
"updated_on": "2016-03-28T12:02:55-07:00",
"created_on": "2016-03-23T10:07:54-07:00",
"content_node_id": 20168062,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Torey",
"last_name": "Krug",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 2,
"name": "Defense",
"abbreviation": "D",
"sport_id": 1,
"position": 2,
"updated_on": "2007-03-07T13:39:44-08:00",
"created_on": null,
"ar_association_key_name": 11575453
}
],
"persona_id": 18922338,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575457",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
{
"id": 11575458,
"roster_id": 1837158,
"jersey_number": "6",
"updated_on": "2016-04-11T08:18:28-07:00",
"created_on": "2016-03-23T10:07:56-07:00",
"content_node_id": 20168063,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Tuukka",
"last_name": "Rask",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 3,
"name": "Goalie",
"abbreviation": "G",
"sport_id": 1,
"position": 3,
"updated_on": "2007-03-07T13:39:55-08:00",
"created_on": null,
"ar_association_key_name": 11575458
}
],
"persona_id": 18922347,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575458",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
}
],
"permissions": {
"create": true,
"delete": true
}
}
getRoster Players Index
Query Params
For pagination; states which page from the set to return.
Definition
Examples
Result Format
{
"per_page": 100,
"current_page": 1,
"page_count": 1,
"roster_players": [
{
"id": 11575453,
"roster_id": 1837158,
"jersey_number": "1",
"updated_on": "2016-04-11T09:02:39-07:00",
"created_on": "2016-03-23T10:07:46-07:00",
"content_node_id": 20168056,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Christopher",
"last_name": "Breen",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 2,
"name": "Defense",
"abbreviation": "D",
"sport_id": 1,
"position": 2,
"updated_on": "2007-03-07T13:39:44-08:00",
"created_on": null,
"ar_association_key_name": 11575453
}
],
"persona_id": 18922209,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575453",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
{
"id": 11575454,
"roster_id": 1837158,
"jersey_number": "2",
"updated_on": "2016-03-28T12:02:15-07:00",
"created_on": "2016-03-23T10:07:47-07:00",
"content_node_id": 20168057,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Craig",
"last_name": "Cunningham",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 1,
"name": "Forward",
"abbreviation": "F",
"sport_id": 1,
"position": 1,
"updated_on": "2007-03-07T13:39:32-08:00",
"created_on": null,
"ar_association_key_name": 11575454
}
],
"persona_id": 18922316,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11575454",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
},
Path Params
Id of roster player to be displayed
id
Integer
Id of RosterPlayer
roster_id
Integer
Id of Roster
jersey_number
String
Number on the player's jersey
updated_on
Timestamp
Timestamp of last update
created_on
Timestamp
Timestamp when created
content_node_id
Integer
Id of ContentNode
image_id
Integer
Id of Image
active_status
Boolean
Boolean representation of the status field (derived)
info
Array
Metadata related to player
first_name
String
First name of player
last_name
String
Last name of the player
roster_type
String
Type of player. This can be "player" or "coach".
title
String
Coach's title
list_position
Integer
Used to order players within the roster
inactive_info
Object
Object with metadata related to an inactive player
status
String
Status of player. Can be "active", "disabled" or "suspended".
positions
Array
Positions assigned to player
thumbnails
Object
Object with relative links to large, medium, and small thumbnails (derived)
url_string
String
Site specific url that the player can be viewed on
team_name
String
Name of the team that a player belongs to (derived)
division_name
String
Name of the division that a player belongs to (derived)
league_name
String
Name of the league that a player belongs to (derived)
player_image_thumbnails
Array
Array of urls pointing to thumbnails of player image (derived)
effective_status
String
Status with extra logic to determine if the player is suspended. (derived)
invite_status
String
Status of OrphanInvite
invite_id
Integer
Id of OphanInvite
Definition
Examples
Result Format
{
"id": 11958954,
"roster_id": 1837158,
"jersey_number": "8",
"updated_on": "2016-04-14T12:06:07-07:00",
"created_on": "2016-04-14T12:00:57-07:00",
"content_node_id": 20712240,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Joe",
"last_name": "Sakik",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 1,
"name": "Forward",
"abbreviation": "F",
"sport_id": 1,
"position": 1,
"updated_on": "2007-03-07T13:39:32-08:00",
"created_on": null
}
],
"persona_id": 19415664,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11958954",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
}
postRoster Players Create
The Create method accepts a single Roster Player (see attributes above) and creates a new record in SportsEngine.
A Roster Player can be created in one of two ways. The first by passing the roster_id
, first_name
, and last_name
in the path or the body. The second by passing the roster_id
and persona_id
. As an added option for the second method, the survey_result_id
from the player's registration can be passed as a third parameter. This will link the survey_result
to the new roster_player
. The site_id
to which the survey belongs is required when linking the newly created Roster Player back to a Survey Result.
Parameters
Path Params
Id of roster player to be displayed
First name of player
Last name of player
Id of persona to be rostered. If using persona_id, only the roster_id is required along with it
Id of the survey result to tie the new roster play back to
Id of the site to which the survey belongs
Body Params
Number of player's jersey
Ids of the positions of the player
Metadata related to the player
Email of player
Base-64 representation of photo
Date of birth of the player
Gender of the player
id
Integer
Id of RosterPlayer
roster_id
Integer
Id of Roster
jersey_number
String
Number on the player's jersey
updated_on
Timestamp
Timestamp of last update
created_on
Timestamp
Timestamp when created
content_node_id
Integer
Id of ContentNode
image_id
Integer
Id of Image
active_status
Boolean
Boolean representation of the status field (derived)
info
Array
Metadata related to player
first_name
String
First name of player
last_name
String
Last name of the player
roster_type
String
Type of player. This can be "player" or "coach".
title
String
Coach's title
list_position
Integer
Used to order players within the roster
inactive_info
Object
Object with metadata related to an inactive player
status
String
Status of player. Can be "active", "disabled" or "suspended".
positions
Array
Positions assigned to player
thumbnails
Object
Object with relative links to large, medium, and small thumbnails (derived)
url_string
String
Site specific url that the player can be viewed on
team_name
String
Name of the team that a player belongs to (derived)
division_name
String
Name of the division that a player belongs to (derived)
league_name
String
Name of the league that a player belongs to (derived)
player_image_thumbnails
Array
Array of urls pointing to thumbnails of player image (derived)
effective_status
String
Status with extra logic to determine if the player is suspended. (derived)
invite_status
String
Status of OrphanInvite
invite_id
Integer
Id of OphanInvite
Definition
Examples
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "NGIN-API-VERSION: 0.1" -d '{
"roster_id": "1837158",
"first_name": "Teemu",
"last_name": "Selane",
"jersey_number": "8",
"roster_player": {
"position_ids": "1"
}
}' "https://api.sportngin.com/roster_players"
Result Format
{
"active_status": true,
"content_node_id": 20712240,
"created_on": "2016-04-14T12:00:57-07:00",
"first_name": "Teemu",
"id": 11958954,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "8",
"last_name": "Selane",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-04-14T12:00:57-07:00",
"positions": [
{
"abbreviation": "F",
"created_on": null,
"id": 1,
"name": "Forward",
"position": 1,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:32-08:00"
}
],
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
}
putRoster Players Update
The Update method accepts a single Roster Player (see attributes above) and updates the matching record in SportsEngine.
Parameters
Path Params
Definition
Examples
Result Format
{
"id": 11958954,
"roster_id": 1837158,
"jersey_number": "8",
"updated_on": "2016-04-14T12:06:07-07:00",
"created_on": "2016-04-14T12:00:57-07:00",
"content_node_id": 20712240,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Joe",
"last_name": "Sakik",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [
{
"id": 1,
"name": "Forward",
"abbreviation": "F",
"sport_id": 1,
"position": 1,
"updated_on": "2007-03-07T13:39:32-08:00",
"created_on": null
}
],
"persona_id": 19415664,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11958954",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "uninvited",
"invite_id": null
}
deleteRoster Players Delete
The Delete method permanently deletes the matching Roster Player record in SportsEngine. This method takes action upon initial invocation and cannot be reversed.
Parameters
Path Params
Id of roster_player to delete
Definition
Examples
Result Format
{
"id": 11958882,
"roster_id": 1837158,
"jersey_number": "8",
"updated_on": "2016-04-14T11:59:18-07:00",
"created_on": "2016-04-14T11:59:18-07:00",
"content_node_id": 20712139,
"image_id": null,
"active_status": true,
"info": [],
"first_name": "Teemu",
"last_name": "ane",
"roster_type": "player",
"title": null,
"list_position": 1,
"inactive_info": {},
"status": "active",
"positions": [],
"persona_id": null,
"thumbnails": {},
"url_string": "http://apidemo.sportngin.com/roster_players/11958882",
"team_name": "Boston Bears",
"division_name": "Oceanic Division",
"league_name": "Eastern League",
"player_image_thumbnails": [],
"effective_status": "active",
"invite_status": "accepted",
"invite_id": null
}
Game Players
Game Players are the participants in a given Game. A Game Player has Positions, a jersey_number
, roster_player_id
, team_id
, and a game_id
. Positions represent the various types of participants in a Sport.
Associations
A Game Player belongs to a Game and a Roster Player.
getGame Players Index
Query Params
Team Instance ID
Definition
Examples
Result Format
[
{
"created_at": "2016-04-11T09:02:35-07:00",
"game_id": 13557134,
"id": 8754667,
"jersey_number": "1",
"roster_player_id": 11575453,
"updated_at": "2016-04-11T09:02:35-07:00",
"positions": [
{
"abbreviation": "D",
"created_on": null,
"id": 2,
"name": "Defense",
"position": 2,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:44-08:00"
}
],
"roster_player": {
"active_status": true,
"content_node_id": 20168056,
"created_on": "2016-03-23T10:07:46-07:00",
"first_name": "Christopher",
"id": 11575453,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "1",
"last_name": "Breen",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-04-11T09:02:39-07:00"
}
},
{
"created_at": "2016-04-11T08:18:27-07:00",
"game_id": 13557134,
"id": 8754539,
"jersey_number": "6",
"roster_player_id": 11575458,
"updated_at": "2016-04-11T08:54:19-07:00",
"positions": [
{
"abbreviation": "G",
"created_on": null,
"id": 3,
"name": "Goalie",
"position": 3,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:55-08:00"
}
],
"roster_player": {
"active_status": true,
"content_node_id": 20168063,
"created_on": "2016-03-23T10:07:56-07:00",
"first_name": "Tuukka",
"id": 11575458,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "6",
"last_name": "Rask",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-04-11T08:18:28-07:00"
}
}
]
getGame Players Show
Path Params
id
Integer
Unique ID assigned by NGIN
home_team_id
Integer
ID of the home team_instance
away_team_id
Integer
ID of the away team_instance
roster_player_id
Integer
ID of the roster player
positions
Integer
jersey_number
Integer
position_id
Integer
roster_player
Integer
Definition
Examples
Result Format
{
"created_at": "2016-04-11T08:18:27-07:00",
"game_id": 13557134,
"id": 8754539,
"jersey_number": "6",
"roster_player_id": 11575458,
"updated_at": "2016-04-11T08:18:27-07:00",
"positions": [],
"roster_player": {
"active_status": true,
"content_node_id": 20168063,
"created_on": "2016-03-23T10:07:56-07:00",
"first_name": "Tuukka",
"id": 11575458,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "6",
"last_name": "Rask",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-04-11T08:18:28-07:00"
}
}
postGame Players Create
The Create method accepts a single Game Player (see attributes above) and creates a new record in SportsEngine. Game Players have required parameters of roster_player_id
, game_id
, team_instance_id
, and jersey_number
.
Parameters
Body Params
Definition
Examples
Result Format
{
"created_at": "2016-04-11T08:18:27-07:00",
"game_id": 13557134,
"id": 8754539,
"jersey_number": "6",
"roster_player_id": 11575458,
"updated_at": "2016-04-11T08:18:27-07:00",
"positions": [],
"roster_player": {
"active_status": true,
"content_node_id": 20168063,
"created_on": "2016-03-23T10:07:56-07:00",
"first_name": "Tuukka",
"id": 11575458,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "6",
"last_name": "Rask",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-03-28T12:03:05-07:00"
}
}
putGame Players Update
The Update method accepts a single Game Player (see attributes above) and updates the matching record in SportsEngine. Game Players have required parameters of roster_player_id
, game_id
, team_instance_id
, and jersey_number
.
Parameters
Body Params
Definition
Examples
Result Format
{
"created_at": "2016-04-11T08:18:27-07:00",
"game_id": 13557134,
"id": 8754539,
"jersey_number": "123",
"roster_player_id": 11575458,
"updated_at": "2016-04-11T08:26:00-07:00",
"positions": [],
"roster_player": {
"active_status": true,
"content_node_id": 20168063,
"created_on": "2016-03-23T10:07:56-07:00",
"first_name": "Tuukka",
"id": 11575458,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "6",
"last_name": "Rask",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-04-11T08:18:28-07:00"
}
}
deleteGame Players Delete
The Delete method permanently deletes the associated Game Player record in SportsEngine for a given game_id
and roster_player_id
.. This method takes action upon initial invocation and cannot be reversed.
Body Params
Definition
Examples
Result Format
{
"created_at": "2016-04-11T09:09:07-07:00",
"game_id": 13529186,
"id": 8738357,
"jersey_number": "2",
"roster_player_id": 11575454,
"updated_at": "2016-04-11T09:09:07-07:00"
}
postGame Players Assign Position ID
The Assign Position ID method is triggered for a given id
(Game Player ID) by passing an array of position_id
Parameters
Body Params
Definition
Examples
Result Format
{
"created_at": "2016-04-11T08:18:27-07:00",
"game_id": 13557134,
"id": 8754539,
"jersey_number": "6",
"roster_player_id": 11575458,
"updated_at": "2016-04-11T08:54:19-07:00",
"positions": [
{
"abbreviation": "G",
"created_on": null,
"id": 3,
"name": "Goalie",
"position": 3,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:55-08:00"
}
],
"roster_player": {
"active_status": true,
"content_node_id": 20168063,
"created_on": "2016-03-23T10:07:56-07:00",
"first_name": "Tuukka",
"id": 11575458,
"image_id": null,
"inactive_info": {},
"info": [],
"jersey_number": "6",
"last_name": "Rask",
"list_position": 1,
"roster_id": 1837158,
"roster_type": "player",
"status": "active",
"title": null,
"updated_on": "2016-04-11T08:18:28-07:00"
}
}
getPositions Index
Query Params
Id of the sport the position belongs to
Index uses the HTTP method of GET and has the required parameter of sport_id.
id
Integer
Id of position
name
String
Name of position
abbreviation
String
Abbreviation of position
sport_id
Integer
Id of Sport
position
Integer
Number used to sort
updated_on
Timestamp
Timestamp of last update
created_on
Timestamp
Timestamp when created
You can get your team's sport_id from your League
Definition
Examples
Result Format
[
{
"abbreviation": "F",
"created_on": null,
"id": 1,
"name": "Forward",
"position": 1,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:32-08:00"
},
{
"abbreviation": "D",
"created_on": null,
"id": 2,
"name": "Defense",
"position": 2,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:44-08:00"
},
{
"abbreviation": "G",
"created_on": null,
"id": 3,
"name": "Goalie",
"position": 3,
"sport_id": 1,
"updated_on": "2007-03-07T13:39:55-08:00"
}
]
Plays
Plays are actions in a Game recorded by Sport NGIN Live. A Play is composed of an array of Play Actions. Play Actions are the divided components of a Play. _Play is a representation of the actual play model defined in Sport NGIN Live._
Query Params
initial_screen
String
play_index
Integer
order of the play
away_team_score
Integer
current score of the away team
created_at
Datetime
Completed
Boolean
whether the play is completed
ending_yard_line
String
updated_at
Datetime
time_interval
Integer
current period
id
String
id of the play
down_string
String
user_id
Integer
starting_yard_line
String
play_by_play_string_to_s
String
the description of the play
play_type
String
home_team_score
Integer
current score of the home team
ball_on_string
String
game_id
Integer
special_tags
Array
tags for the play
clock_time_string
String
pos_team_id
Integer
distance
String
Definition
Examples
Result Format
[
{
"clock_time": "20:00",
"clock_time_string": "0:00",
"completed": true,
"created_at": "2016-04-20T16:41:27Z",
"game_id": 13557129,
"id": "5717b137951b911302000c0b",
"initial_screen": "play_screen",
"min": 20,
"nullified": null,
"off_team_id": 1876249,
"play_actions": [
{
"away_team_goalie": "11576555",
"away_team_score": 0,
"away_team_timeouts": null,
"clock_time": "20:00",
"created_at": "2016-04-20T16:41:27Z",
"def_team_id": 1876243,
"diffs": {},
"game_id": 13557129,
"home_team_goalie": "11575458",
"home_team_score": 0,
"home_team_timeouts": null,
"id": "5717b137951b911302000c0a",
"location": null,
"loser_id": null,
"min": 20,
"ngin_sport_id": 1,
"off_team_id": 1876249,
"participants_winner": null,
"play_action_index": 0,
"play_action_type": "faceoff",
"play_id": "5717b137951b911302000c0b",
"play_token": "984917e3-b1bb-4bec-a07e-d0511f408f2f",
"screen": "play_screen",
"sec": 0,
"starts_new_play": false,
"subseason_id": 291621,
"time_interval": 1,
"token": "c8d58d4e-9bd4-4830-a823-ab799aa889f4",
"type": "faceoff",
"updated_at": "2016-04-20T16:41:31Z",
"user_id": 3156422,
"winner_id": null,
"x_coord": 49.77,
"y_coord": 50.81
},
{
"away_team_goalie": "11576555",
"away_team_score": 0,
"away_team_timeouts": null,
"clock_time": "20:00",
"created_at": "2016-04-20T16:41:30Z",
"def_team_id": null,
"diffs": {
"def_team_id": {
"o": 1876243
},
"off_team_id": {
"o": 1876249
}
},
"game_id": 13557129,
"home_team_goalie": "11575458",
"home_team_score": 0,
"home_team_timeouts": null,
"id": "5717b13ae407147a390006a4",
"min": 20,
"ngin_sport_id": 1,
"off_team_id": null,
"play_action_index": 1,
"play_action_type": "next_play",
"play_id": "5717b137951b911302000c0b",
"play_token": "984917e3-b1bb-4bec-a07e-d0511f408f2f",
"screen": "next_play_screen",
"sec": 0,
"starts_new_play": true,
"subseason_id": 291621,
"time_interval": 1,
"token": "576871ce-3a9a-4ba6-b50b-ef03fb8a1542",
"type": "next_play",
"updated_at": "2016-04-20T16:41:30Z",
"user_id": 3156422
}
],
"play_by_play_string": "Faceoff Won ",
"play_index": 1,
"play_type": "Faceoff",
"position": null,
"primary_player_id": "",
"sec": 0,
"special_tags": [],
"sport_id": null,
"time_interval": 1,
"updated_at": "2016-04-20T16:41:30Z",
"user_id": 3156422
},
],
"sport_id": null,
"time_interval": 3,
"token": "989e0584-d12a-4798-9bd7-7f7cfbbd266d",
"updated_at": "2016-04-20T16:45:00Z",
"user_id": 3156422
}
]
Path Params
Game id
initial_screen
String
play_index
Integer
order of the play
away_team_score
Integer
current score of the away team
created_at
Datetime
Completed
Boolean
whether the play is completed
ending_yard_line
String
updated_at
Datetime
time_interval
Integer
current period
id
String
id of the play
down_string
String
user_id
Integer
starting_yard_line
String
play_by_play_string_to_s
String
the description of the play
play_type
String
home_team_score
Integer
current score of the home team
ball_on_string
String
game_id
Integer
special_tags
Array
tags for the play
clock_time_string
String
pos_team_id
Integer
distance
String
Definition
Examples
Result Format
{
"plays":[
{
"clock_time": "20:00",
"clock_time_string": "0:00",
"completed": true,
"created_at": "2016-04-20T16:41:27Z",
"game_id": 13557129,
"id": "5717b137951b911302000c0b",
"initial_screen": "play_screen",
"min": 20,
"nullified": null,
"off_team_id": 1876249,
"play_actions": [
{
"away_team_goalie": "11576555",
"away_team_score": 0,
"away_team_timeouts": null,
"clock_time": "20:00",
"created_at": "2016-04-20T16:41:27Z",
"def_team_id": 1876243,
"diffs": {},
"game_id": 13557129,
"home_team_goalie": "11575458",
"home_team_score": 0,
"home_team_timeouts": null,
"id": "5717b137951b911302000c0a",
"location": null,
"loser_id": null,
"min": 20,
"ngin_sport_id": 1,
"off_team_id": 1876249,
"participants_winner": null,
"play_action_index": 0,
"play_action_type": "faceoff",
"play_id": "5717b137951b911302000c0b",
"play_token": "984917e3-b1bb-4bec-a07e-d0511f408f2f",
"screen": "play_screen",
"sec": 0,
"starts_new_play": false,
"subseason_id": 291621,
"time_interval": 1,
"token": "c8d58d4e-9bd4-4830-a823-ab799aa889f4",
"type": "faceoff",
"updated_at": "2016-04-20T16:41:31Z",
"user_id": 3156422,
"winner_id": null,
"x_coord": 49.77,
"y_coord": 50.81
},
{
"away_team_goalie": "11576555",
"away_team_score": 0,
"away_team_timeouts": null,
"clock_time": "20:00",
"created_at": "2016-04-20T16:41:30Z",
"def_team_id": null,
"diffs": {
"def_team_id": {
"o": 1876243
},
"off_team_id": {
"o": 1876249
}
},
"game_id": 13557129,
"home_team_goalie": "11575458",
"home_team_score": 0,
"home_team_timeouts": null,
"id": "5717b13ae407147a390006a4",
"min": 20,
"ngin_sport_id": 1,
"off_team_id": null,
"play_action_index": 1,
"play_action_type": "next_play",
"play_id": "5717b137951b911302000c0b",
"play_token": "984917e3-b1bb-4bec-a07e-d0511f408f2f",
"screen": "next_play_screen",
"sec": 0,
"starts_new_play": true,
"subseason_id": 291621,
"time_interval": 1,
"token": "576871ce-3a9a-4ba6-b50b-ef03fb8a1542",
"type": "next_play",
"updated_at": "2016-04-20T16:41:30Z",
"user_id": 3156422
}
],
"play_by_play_string": "Faceoff Won ",
"play_index": 1,
"play_type": "Faceoff",
"position": null,
"primary_player_id": "",
"sec": 0,
"special_tags": [],
"sport_id": null,
"time_interval": 1,
"updated_at": "2016-04-20T16:41:30Z",
"user_id": 3156422
},
"sport_id": null,
"time_interval": 3,
"token": "989e0584-d12a-4798-9bd7-7f7cfbbd266d",
"updated_at": "2016-04-20T16:45:00Z",
"user_id": 3156422
}
]
}
getPlay Actions Index
Query Params
ID of the play of interest
initial_screen
String
play_index
Integer
order of the play
away_team_score
Integer
current score of the away team
created_at
Datetime
completed
Boolean
whether the play is completed
ending_yard_line
String
updated_at
Datetime
time_interval
Integer
current period
id
String
id of the play
down_string
String
user_id
Integer
starting_yard_line
String
play_by_play_string_to_s
String
the description of the play
play_type
String
home_team_score
Integer
current score of the home team
ball_on_string
String
game_id
Integer
specia_tags
Array
tags for the play
clock_time_string
String
pos_team_id
Integer
distance
String
Definition
Examples
Result Format
[
{
"away_team_goalie": "11576555",
"away_team_score": 0,
"away_team_timeouts": null,
"clock_time": "20:00",
"created_at": "2016-04-20T16:41:27Z",
"def_team_id": 1876243,
"diffs": {},
"game_id": 13557129,
"home_team_goalie": "11575458",
"home_team_score": 0,
"home_team_timeouts": null,
"id": "5717b137951b911302000c0a",
"location": null,
"loser_id": null,
"min": 20,
"ngin_sport_id": 1,
"off_team_id": 1876249,
"participants_winner": null,
"play_action_index": 0,
"play_action_type": "faceoff",
"play_id": "5717b137951b911302000c0b",
"play_token": "984917e3-b1bb-4bec-a07e-d0511f408f2f",
"screen": "play_screen",
"sec": 0,
"sport_id": 1,
"starts_new_play": false,
"stat_values": [
{
"created_at": null,
"id": "5717b137951b911302000c0c",
"key": "hksfow",
"module_name": "ice_hockey_skater",
"player_id": null,
"stat": "hksfow",
"team_id": 1876249,
"team_value": 1,
"updated_at": null,
"value": 1
},
{
"created_at": null,
"id": "5717b137951b911302000c0d",
"key": "hksfol",
"module_name": "ice_hockey_skater",
"player_id": null,
"stat": "hksfol",
"team_id": 1876243,
"team_value": 1,
"updated_at": null,
"value": 1
}
],
"subseason_id": 291621,
"time_interval": 1,
"token": "c8d58d4e-9bd4-4830-a823-ab799aa889f4",
"type": "faceoff",
"updated_at": "2016-04-20T16:41:31Z",
"user_id": 3156422,
"winner_id": null,
"x_coord": 49.77,
"y_coord": 50.81
},
{
"away_team_goalie": "11576555",
"away_team_score": 0,
"away_team_timeouts": null,
"clock_time": "20:00",
"created_at": "2016-04-20T16:41:30Z",
"def_team_id": null,
"diffs": {
"def_team_id": {
"o": 1876243
},
"off_team_id": {
"o": 1876249
}
},
"game_id": 13557129,
"home_team_goalie": "11575458",
"home_team_score": 0,
"home_team_timeouts": null,
"id": "5717b13ae407147a390006a4",
"min": 20,
"ngin_sport_id": 1,
"off_team_id": null,
"play_action_index": 1,
"play_action_type": "next_play",
"play_id": "5717b137951b911302000c0b",
"play_token": "984917e3-b1bb-4bec-a07e-d0511f408f2f",
"screen": "next_play_screen",
"sec": 0,
"sport_id": 1,
"starts_new_play": true,
"subseason_id": 291621,
"time_interval": 1,
"token": "576871ce-3a9a-4ba6-b50b-ef03fb8a1542",
"type": "next_play",
"updated_at": "2016-04-20T16:41:30Z",
"user_id": 3156422
}
]
postPlay Actions Create
The Create method accepts a single Play Action (see attributes above) and creates a new record in SportsEngine associated with the given Game.
Parameters
postPlay Actions Update
The Update method accepts a single Play Action (see attributes above) and updates the matching record in SportsEngine.