{"_id":"570423c5ecfca80e00998fa3","category":"56e857b6c59c4a0e00d5d052","user":"56548c568975c70d002ea4b4","body":"","hidden":false,"isReference":true,"link_external":false,"title":"Sports","type":"basic","project":"5641217e0ee5370d00da636d","sync_unique":"","api":{"params":[],"results":{"codes":[]},"settings":"","url":"","auth":"required"},"createdAt":"2016-04-05T20:44:53.458Z","githubsync":"","link_url":"","order":0,"updates":[],"version":"56cca51eca43550b002813fa","__v":4,"excerpt":"Various settings are Sport-dependent, for example not all sports will have a `Line Judge` [Official Type](https://sportnginv2.readme.io/docs/official-types-show).\n\n###Associations\n[Official Types](https://sportnginv2.readme.io/docs/official-types-show) are Sport-specific, and Site(s) are associated with one or more Sports.  Each League is Sport-specific.","parentDoc":null,"slug":"sports","childrenPages":[]}

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.


{"_id":"56f41aa50f1f970e006e24b0","hidden":false,"slug":"sports-index","title":"Sports Index","updates":[],"user":"56e71f9edee212320019e731","category":"56e857b6c59c4a0e00d5d052","githubsync":"","order":1,"parentDoc":null,"project":"5641217e0ee5370d00da636d","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"1-0\": \"name\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Sport name\",\n    \"0-2\": \"Sport id assigned by NGIN\",\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","api":{"params":[],"results":{"codes":[{"code":"[\n    {\n        \"id\": 1,\n        \"name\": \"Ice Hockey\",\n        \"updated_on\": \"2011-11-17T04:49:23-08:00\",\n        \"created_on\": \"2006-11-29T00:58:07-08:00\",\n        \"class_name\": \"IceHockey\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": true\n    },\n    {\n        \"id\": 3,\n        \"name\": \"Lacrosse\",\n        \"updated_on\": \"2011-12-18T16:24:56-08:00\",\n        \"created_on\": \"2006-12-07T18:22:25-08:00\",\n        \"class_name\": \"Lacrosse\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": true\n    },\n    {\n        \"id\": 4,\n        \"name\": \"Baseball/Softball\",\n        \"updated_on\": \"2012-03-23T01:32:25-07:00\",\n        \"created_on\": \"2006-12-07T18:22:38-08:00\",\n        \"class_name\": \"Baseball\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 5,\n        \"name\": \"Soccer\",\n        \"updated_on\": \"2012-07-17T22:43:03-07:00\",\n        \"created_on\": \"2006-12-07T18:22:54-08:00\",\n        \"class_name\": \"Soccer\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": true\n    },\n    {\n        \"id\": 6,\n        \"name\": \"Cycling\",\n        \"updated_on\": \"2006-12-15T17:06:35-08:00\",\n        \"created_on\": \"2006-12-15T17:06:35-08:00\",\n        \"class_name\": \"Cycling\",\n        \"stat_enabled\": null,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 7,\n        \"name\": \"Basketball\",\n        \"updated_on\": \"2012-07-03T22:22:09-07:00\",\n        \"created_on\": \"2006-12-20T15:11:13-08:00\",\n        \"class_name\": \"Basketball\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 9,\n        \"name\": \"Track and Field\",\n        \"updated_on\": \"2006-12-28T12:32:21-08:00\",\n        \"created_on\": \"2006-12-28T12:32:21-08:00\",\n        \"class_name\": \"TrackAndField\",\n        \"stat_enabled\": null,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 10,\n        \"name\": \"Tennis\",\n        \"updated_on\": \"2007-01-25T16:20:28-08:00\",\n        \"created_on\": \"2007-01-25T16:20:28-08:00\",\n        \"class_name\": \"Tennis\",\n        \"stat_enabled\": null,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 11,\n        \"name\": \"Football\",\n        \"updated_on\": \"2011-08-03T22:00:45-07:00\",\n        \"created_on\": \"2007-04-04T16:41:25-07:00\",\n        \"class_name\": \"Football\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": true\n    },\n    {\n        \"id\": 12,\n        \"name\": \"Volleyball\",\n        \"updated_on\": \"2011-08-18T13:25:07-07:00\",\n        \"created_on\": \"2007-10-12T11:34:32-07:00\",\n        \"class_name\": \"Volleyball\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 13,\n        \"name\": \"Wrestling\",\n        \"updated_on\": \"2008-01-08T12:52:23-08:00\",\n        \"created_on\": \"2008-01-08T12:52:23-08:00\",\n        \"class_name\": \"Wrestling\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 16,\n        \"name\": \"Rugby Union\",\n        \"updated_on\": \"2010-03-02T06:40:46-08:00\",\n        \"created_on\": \"2010-03-02T06:40:46-08:00\",\n        \"class_name\": \"RugbyUnion\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 18,\n        \"name\": \"Golf\",\n        \"updated_on\": \"2011-03-15T07:12:07-07:00\",\n        \"created_on\": \"2011-03-15T07:12:07-07:00\",\n        \"class_name\": \"Golf\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 20,\n        \"name\": \"Paintball\",\n        \"updated_on\": \"2012-04-28T16:57:19-07:00\",\n        \"created_on\": \"2012-04-28T16:57:19-07:00\",\n        \"class_name\": \"Paintball\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 21,\n        \"name\": \"Cross Country\",\n        \"updated_on\": \"2012-05-11T08:01:00-07:00\",\n        \"created_on\": \"2012-05-11T08:01:00-07:00\",\n        \"class_name\": \"CrossCountry\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 22,\n        \"name\": \"Swimming\",\n        \"updated_on\": \"2012-05-11T08:01:16-07:00\",\n        \"created_on\": \"2012-05-11T08:01:16-07:00\",\n        \"class_name\": \"Swimming\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 23,\n        \"name\": \"Skiing\",\n        \"updated_on\": \"2012-05-23T12:21:27-07:00\",\n        \"created_on\": \"2012-05-23T12:21:27-07:00\",\n        \"class_name\": \"Skiing\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 24,\n        \"name\": \"Basic\",\n        \"updated_on\": \"2012-08-14T13:08:29-07:00\",\n        \"created_on\": \"2012-08-14T13:08:29-07:00\",\n        \"class_name\": \"Basic\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 25,\n        \"name\": \"Rugby wheel chair\",\n        \"updated_on\": \"2013-01-22T10:59:44-08:00\",\n        \"created_on\": \"2013-01-22T10:59:44-08:00\",\n        \"class_name\": \"Wheelchair\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 26,\n        \"name\": \"Canadian Football\",\n        \"updated_on\": \"2014-06-27T10:15:32-07:00\",\n        \"created_on\": \"2014-06-27T10:15:32-07:00\",\n        \"class_name\": \"CanadianFootball\",\n        \"stat_enabled\": true,\n        \"tabular_scoring_plays\": true\n    },\n    {\n        \"id\": 27,\n        \"name\": \"Other\",\n        \"updated_on\": \"2015-08-19T19:41:54-07:00\",\n        \"created_on\": \"2015-08-19T19:41:54-07:00\",\n        \"class_name\": \"\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    },\n    {\n        \"id\": 28,\n        \"name\": \"Water Polo\",\n        \"updated_on\": \"2015-10-22T13:41:01-07:00\",\n        \"created_on\": \"2015-10-22T13:41:01-07:00\",\n        \"class_name\": \"\",\n        \"stat_enabled\": false,\n        \"tabular_scoring_plays\": false\n    }\n]","name":"","status":200,"language":"json"}]},"settings":"","url":"/sports","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/sports\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sports\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/sports\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"createdAt":"2016-03-24T16:49:41.469Z","excerpt":"The Index method returns an array of available Sports.","isReference":true,"__v":7,"link_url":"","sync_unique":"","type":"get","version":"56cca51eca43550b002813fa","link_external":false,"childrenPages":[]}

getSports Index

The Index method returns an array of available Sports.


Attributes

Attribute
Type
Notes

id

Integer

Sport id assigned by NGIN

name

String

Sport name

Definition

https://api.sportngin.com/sports

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/sports"

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
    }
]


{"_id":"57110c3f999cb92b00a1fa88","__v":0,"excerpt":"The Show method returns a single Sport for a given `id`.\n\n###Parameters","isReference":true,"type":"get","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"1-0\": \"name\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Sport name\",\n    \"0-2\": \"Sport id assigned by NGIN\",\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","category":"56e857b6c59c4a0e00d5d052","link_external":false,"parentDoc":null,"slug":"sports-show","updates":[],"version":"56cca51eca43550b002813fa","api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/sports/1\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sports/1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/sports/1\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"_id":"57110c3f999cb92b00a1fa89","default":"","desc":"Id of the sport to display","name":"id","ref":"","required":true,"type":"int","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 1,\n    \"name\": \"Ice Hockey\",\n    \"updated_on\": \"2011-11-17T04:49:23-08:00\",\n    \"created_on\": \"2006-11-29T00:58:07-08:00\",\n    \"class_name\": \"IceHockey\",\n    \"stat_enabled\": true,\n    \"tabular_scoring_plays\": true\n}","name":""}]},"settings":"","url":"/sports/:id","auth":"required"},"createdAt":"2016-04-15T15:43:59.246Z","editedParams":true,"title":"Sports Show","user":"56548c568975c70d002ea4b4","sync_unique":"","editedParams2":true,"githubsync":"","hidden":false,"link_url":"","order":2,"project":"5641217e0ee5370d00da636d","childrenPages":[]}

getSports Show

The Show method returns a single Sport for a given id.

Parameters


Path Params

id:
required
integer

Id of the sport to display

Attributes

Attribute
Type
Notes

id

Integer

Sport id assigned by NGIN

name

String

Sport name

Definition

https://api.sportngin.com/sports/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/sports/1"

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":"57014b649433720e00080da2","title":"Officials","user":"56cbf1419f4ae20b00644fde","version":"56cca51eca43550b002813fa","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]}},"hidden":false,"link_external":false,"order":3,"slug":"officials","project":"5641217e0ee5370d00da636d","type":"basic","body":"","githubsync":"","isReference":true,"link_url":"","updates":[],"sync_unique":"","__v":9,"category":"56e857b6c59c4a0e00d5d052","createdAt":"2016-04-03T16:57:08.662Z","excerpt":"Officials are the referees for a particular [Game](https://sportnginv2.readme.io/docs/games-show).\n\n###Associations\nA Official belongs to a [Game](https://sportnginv2.readme.io/docs/games-show) and is classified by [Official Types](https://sportnginv2.readme.io/docs/official-types-show).  [Official Type](https://sportnginv2.readme.io/docs/official-types-show) is germane to a given [Sports](https://sportnginv2.readme.io/docs/sports).","parentDoc":null,"childrenPages":[]}

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.


{"_id":"56f1a788da0c573400bacd0e","updates":[],"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attributes\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"game_id\",\n    \"0-1\": \"Integer\",\n    \"1-0\": \"initial_state\",\n    \"1-1\": \"Integer\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]","category":"56e857b6c59c4a0e00d5d052","excerpt":"The Index method returns an array of Officials matching the given parameters.\n\n###Parameters","isReference":true,"sync_unique":"","title":"Officials Index","version":"56cca51eca43550b002813fa","__v":0,"api":{"settings":"","url":"/officials","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/officials?game_id=13557134\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/officials?game_id=13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/officials?game_id=13557134\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","desc":"","name":"game_id","ref":"","required":true,"type":"int","in":"query","_id":"56f1a788da0c573400bacd0f"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"id\": 193702,\n        \"name\": \"Joe the Ref\",\n        \"official_type_id\": 1,\n        \"game_id\": 13557134,\n        \"created_at\": \"2016-04-08T11:53:36-07:00\",\n        \"updated_at\": \"2016-04-08T11:53:36-07:00\"\n    },\n    {\n        \"id\": 193703,\n        \"name\": \"Jane the Ref\",\n        \"official_type_id\": 1,\n        \"game_id\": 13557134,\n        \"created_at\": \"2016-04-08T12:26:27-07:00\",\n        \"updated_at\": \"2016-04-08T12:26:27-07:00\"\n    }\n]","name":""}]}},"githubsync":"","hidden":false,"link_url":"","project":"5641217e0ee5370d00da636d","createdAt":"2016-03-22T20:14:00.250Z","slug":"officials-index","type":"get","user":"56e71f9edee212320019e731","editedParams":true,"editedParams2":true,"link_external":false,"order":4,"parentDoc":null,"childrenPages":[]}

getOfficials Index

The Index method returns an array of Officials matching the given parameters.

Parameters


Query Params

game_id:
required
integer

Attributes

Attributes
Type

game_id

Integer

initial_state

Integer

Definition

https://api.sportngin.com/officials

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/officials?game_id=13557134"

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"
    }
]


{"_id":"56f1a8223eb62a34003ea01a","project":"5641217e0ee5370d00da636d","createdAt":"2016-03-22T20:16:34.087Z","order":5,"isReference":true,"link_external":false,"slug":"officials-create","version":"56cca51eca43550b002813fa","excerpt":"The Create method accepts a single Official (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","githubsync":"","hidden":false,"link_url":"","title":"Officials Create","type":"post","updates":[],"editedParams2":true,"body":"","category":"56e857b6c59c4a0e00d5d052","editedParams":true,"parentDoc":null,"sync_unique":"","user":"56e71f9edee212320019e731","__v":2,"api":{"params":[{"name":"name","in":"body","_id":"56f1a8223eb62a34003ea01b","ref":"","required":true,"desc":"Name of the official","default":"","type":"string"},{"desc":"ID of the game the official will be assigned to","default":"","type":"int","name":"game_id","in":"body","_id":"570806d8eec9610e003ebddd","ref":"","required":true},{"ref":"","required":false,"desc":"ID representing the type of official to be created","default":"","type":"int","name":"official_type_id","in":"body","_id":"570806d8eec9610e003ebdde"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 193703,\n    \"name\": \"Jane the Ref\",\n    \"official_type_id\": 1,\n    \"game_id\": 13557134,\n    \"created_at\": \"2016-04-08T12:26:27-07:00\",\n    \"updated_at\": \"2016-04-08T12:26:27-07:00\"\n}","name":""}]},"settings":"","url":"/officials","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"official\":{\n        \"name\": \"Jane the Ref\",\n        \"official_type_id\": 1,\n        \"game_id\": 13557134\n    }\n}' \"https://api.sportngin.com/officials\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/officials\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"official\\\":{\\n        \\\"name\\\": \\\"Jane the Ref\\\",\\n        \\\"official_type_id\\\": 1,\\n        \\\"game_id\\\": 13557134\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"official\\\":{\\n        \\\"name\\\": \\\"Jane the Ref\\\",\\n        \\\"official_type_id\\\": 1,\\n        \\\"game_id\\\": 13557134\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/officials\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post"},"childrenPages":[]}

postOfficials Create

The Create method accepts a single Official (see attributes above) and creates a new record in SportsEngine.

Parameters


Body Params

name:
required
string

Name of the official

game_id:
required
integer

ID of the game the official will be assigned to

official_type_id:
integer

ID representing the type of official to be created

Definition

https://api.sportngin.com/officials

Examples

curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
    "official":{
        "name": "Jane the Ref",
        "official_type_id": 1,
        "game_id": 13557134
    }
}' "https://api.sportngin.com/officials"

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"
}


{"_id":"56f1a99161376720009412ab","isReference":true,"project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","api":{"params":[{"type":"int","in":"body","_id":"56f1a99161376720009412ac","default":"","desc":"","name":"current_user","ref":"","required":true}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 193705,\n    \"name\": \"Jill the Ref\",\n    \"official_type_id\": 1,\n    \"game_id\": 13557134,\n    \"created_at\": \"2016-04-08T13:33:40-07:00\",\n    \"updated_at\": \"2016-04-08T13:33:40-07:00\"\n}","name":"","status":200}]},"settings":"","url":"/officials","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"id\": \"193703\",\n    \"official\":{\n        \"name\": \"Jill the Ref\",\n        \"official_type_id\": 1,\n        \"game_id\": 13557134\n    }\n}' \"https://api.sportngin.com/officials\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/officials\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"id\\\": \\\"193703\\\",\\n    \\\"official\\\":{\\n        \\\"name\\\": \\\"Jill the Ref\\\",\\n        \\\"official_type_id\\\": 1,\\n        \\\"game_id\\\": 13557134\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"id\\\": \\\"193703\\\",\\n    \\\"official\\\":{\\n        \\\"name\\\": \\\"Jill the Ref\\\",\\n        \\\"official_type_id\\\": 1,\\n        \\\"game_id\\\": 13557134\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/officials\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post"},"category":"56e857b6c59c4a0e00d5d052","editedParams2":true,"hidden":false,"parentDoc":null,"sync_unique":"","title":"Officials Update","body":"","editedParams":true,"githubsync":"","order":6,"link_external":false,"link_url":"","slug":"officials-update","type":"post","__v":0,"createdAt":"2016-03-22T20:22:41.830Z","excerpt":"The Update method accepts a single Official (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","updates":[],"version":"56cca51eca43550b002813fa","childrenPages":[]}

postOfficials Update

The Update method accepts a single Official (see attributes above) and updates the matching record in SportsEngine.

Parameters


Body Params

current_user:
required
integer

Definition

https://api.sportngin.com/officials

Examples

curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
    "id": "193703",
    "official":{
        "name": "Jill the Ref",
        "official_type_id": 1,
        "game_id": 13557134
    }
}' "https://api.sportngin.com/officials"

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"
}


{"_id":"56f1a6184476fb2200795e5b","project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","editedParams":true,"editedParams2":true,"link_url":"","__v":4,"category":"56e857b6c59c4a0e00d5d052","createdAt":"2016-03-22T20:07:52.496Z","hidden":false,"title":"Official Types Show","type":"get","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attributes\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Unique id assign by NGIN\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Name of the official type\",\n    \"2-0\": \"sport_id\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"ID of the sport assigned by NGIN\",\n    \"3-0\": \"created_at\",\n    \"3-1\": \"Datetime\",\n    \"3-2\": \"Timestamp of creation date\",\n    \"4-0\": \"updated_at\",\n    \"4-1\": \"Datetime\",\n    \"4-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]","githubsync":"","isReference":true,"sync_unique":"","parentDoc":null,"slug":"official-types-show","updates":[],"api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/official_types/?sport_id=1\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/official_types/?sport_id=1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/official_types/?sport_id=1\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"type":"int","in":"query","_id":"56fd51fed393740e0080f29c","default":"","desc":"","name":"sport_id","ref":"","required":true}],"results":{"codes":[{"language":"json","code":"[\n    {\n        \"created_at\": \"2011-08-03T21:54:13-07:00\",\n        \"id\": 1,\n        \"name\": \"Official\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n    },\n    {\n        \"created_at\": \"2011-08-03T21:54:13-07:00\",\n        \"id\": 17,\n        \"name\": \"Referee\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n    },\n    {\n        \"created_at\": \"2011-08-03T21:54:13-07:00\",\n        \"id\": 18,\n        \"name\": \"Linesman\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n    },\n    {\n        \"created_at\": \"2011-08-03T21:54:13-07:00\",\n        \"id\": 19,\n        \"name\": \"Assistant Referee\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n    },\n    {\n        \"created_at\": \"2011-08-03T21:54:13-07:00\",\n        \"id\": 34,\n        \"name\": \"Other\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2011-08-03T21:54:13-07:00\"\n    },\n    {\n        \"created_at\": \"2012-10-05T12:23:54-07:00\",\n        \"id\": 54,\n        \"name\": \"Official Scorer\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2012-10-05T12:23:54-07:00\"\n    },\n    {\n        \"created_at\": \"2012-10-05T12:23:54-07:00\",\n        \"id\": 55,\n        \"name\": \"Score Keeper\",\n        \"sport_id\": 1,\n        \"updated_at\": \"2012-10-05T12:23:54-07:00\"\n    }\n]","name":"","status":200}]},"settings":"","url":"/official_types","auth":"required"},"excerpt":"The Show method returns an array of Official Types for a given `sport_id`.\n\n###Parameters","link_external":false,"order":8,"childrenPages":[]}

getOfficial Types Show

The Show method returns an array of Official Types for a given sport_id.

Parameters


Query Params

sport_id:
required
integer

Attributes

Attributes
Type
Notes

id

Integer

Unique id assign by NGIN

name

String

Name of the official type

sport_id

Integer

ID of the sport assigned by NGIN

created_at

Datetime

Timestamp of creation date

updated_at

Datetime

Timestamp of last update

Definition

https://api.sportngin.com/official_types

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/official_types/?sport_id=1"

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"
    }
]


{"_id":"570142c5a565e20e00157415","order":0,"type":"basic","version":"56cca51eca43550b002813fa","isReference":true,"slug":"leagues","updates":[],"hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"","auth":"required","params":[]},"category":"56e03709f97d422900d63922","githubsync":"","link_external":false,"parentDoc":null,"sync_unique":"","__v":17,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"A [League Instance](ref:league-instances-index) can inform a [League Instance Tree](ref:league-instance-tree-show), which displays the structure of associated [League Instance](ref:league-instances-index) including dependent [Subseasons](ref:subseasons), [Division Instances Index](doc:division-instances-create), and [Team Instances](ref:team_instances-index).\"\n}\n[/block]","createdAt":"2016-04-03T16:20:21.433Z","excerpt":"A League represents an association of [Teams](https://sportnginv2.readme.io/docs/teams-show) on a [Site](https://sportnginsite.readme.io/docs/sites).  A  is an instance of a specific League, which represents a single [Season](https://sportnginv2.readme.io/docs/seasons-show).\n\nMuch like the League and the [League Instances](https://sportnginv2.readme.io/docs/league-instances-index), a [Team Instance](https://sportnginv2.readme.io/docs/team_instances-show) is an instance of a specific team, usually for a single [Season](https://sportnginv2.readme.io/docs/seasons-show) or [Subseason](https://sportnginv2.readme.io/docs/subseasons-show).  A [Team Instance](https://sportnginv2.readme.io/docs/team_instances-show) belongs to a [Rosters Index](https://sportnginv2.readme.io/docs/rosters) or to a [Team](https://sportnginv2.readme.io/docs/teams-show). A [Team Instance](https://sportnginv2.readme.io/docs/team_instances-show) can have many [Photos](https://sportnginsite.readme.io/docs/photo), [Videos](https://sportnginsite.readme.io/docs/video), [Games](https://sportnginv2.readme.io/docs/games-show), and [Subseasons](https://sportnginv2.readme.io/docs/subseasons-show).\n\nA good way to find teams is to use the [Team Finder](https://sportnginv2.readme.io/docs/team-finder-index) endpoint.  The [Team Finder](https://sportnginv2.readme.io/docs/team-finder-index) allows you to search for [Teams](https://sportnginv2.readme.io/docs/teams-show) based on the `team_name`, `site_name`, `site_abbreviation`, and/or `domain_name`.\n\nA [Season](https://sportnginv2.readme.io/docs/seasons-show) is the portion of one year in which the regulated Games of a Sport are in session.\n\nA [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) is a segmented portion of a [Season](https://sportnginv2.readme.io/docs/seasons-show). A [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) could be named the \"Regular Season\", the \"Playoffs,\" or the \"State Tournament.\"\n\n###Associations\nA League has multiple [Divisions](doc:divisions) (which is the actual subgrouping of [Teams](https://sportnginv2.readme.io/docs/teams-show)).  A League has many [League Instances](https://sportnginv2.readme.io/docs/league-instances-index).\n\nA [Divison](doc:divisons-create) is a subgrouping of [Teams](https://sportnginv2.readme.io/docs/teams-index) that belong to a [League](https://sportnginv2.readme.io/docs/leagues). A Division has many [Division Instances](doc:division-instances-index).  A [Division](doc:divisions) also has many [Teams](https://sportnginv2.readme.io/docs/teams-show).\n\nA [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) belongs to a [Season](https://sportnginv2.readme.io/docs/seasons-show), and has many [Team Instances](https://sportnginv2.readme.io/docs/team_instances-show) and [Games](https://sportnginv2.readme.io/docs/games-show).","link_url":"","project":"5641217e0ee5370d00da636d","title":"Leagues","user":"56cbf1419f4ae20b00644fde","childrenPages":[]}

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.

{"_id":"56e037fe5fc52e320024d851","title":"Leagues Index","user":"56548c568975c70d002ea4b4","api":{"examples":{"codes":[{"language":"curl","code":"curl --header \"Authorization: Bearer ACCESS_TOKEN\" --header \"Accept: application/json\" --header \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/leagues?site_id=11953\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/leagues?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/leagues?site_id=11953\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"site_id","ref":"","required":true,"type":"int","in":"query","_id":"56cf355f5267d70b00494c3a","default":"","desc":"Id of site"},{"name":"site_url","in":"query","_id":"56cf355f5267d70b00494c39","ref":"","required":false,"desc":"Url of site","default":"","type":"string"}],"results":{"codes":[{"code":"[\n    {\n        \"id\": 27737,\n        \"name\": \"Eastern League\",\n        \"current_subseason_id\": 291621,\n        \"site_id\": 11953,\n        \"sport_id\": 1,\n        \"image_id\": null,\n        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n        \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n        \"button_title\": \"Eastern\",\n        \"primary_color\": \"00AEEF\",\n        \"secondary_color\": \"666666\",\n        \"gender\": \"male\",\n        \"abbrev\": \"East\",\n        \"score_ribbon\": false,\n        \"tweet_games\": null,\n        \"game_sheet_label\": \"gamesheet\"\n    },\n    {\n        \"id\": 27738,\n        \"name\": \"Western League\",\n        \"current_subseason_id\": 291622,\n        \"site_id\": 11953,\n        \"sport_id\": 1,\n        \"image_id\": null,\n        \"created_at\": \"2016-03-22T12:48:01-07:00\",\n        \"updated_at\": \"2016-03-24T07:20:41-07:00\",\n        \"button_title\": \"Western\",\n        \"primary_color\": \"00AEEF\",\n        \"secondary_color\": \"666666\",\n        \"gender\": \"male\",\n        \"abbrev\": \"West\",\n        \"score_ribbon\": false,\n        \"tweet_games\": null,\n        \"game_sheet_label\": \"gamesheet\"\n    }\n]","language":"json","status":200,"name":""},{"code":"{\n\t   \"errors\": \"Site not found\"\n}","status":404,"language":"text"}]},"settings":"","url":"/leagues","auth":"required"},"createdAt":"2016-03-09T14:49:34.513Z","editedParams2":true,"excerpt":"The Index method returns an array of Leagues matching the given parameters.\n\nThis 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.\n\n###Parameters","slug":"leagues-index","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"name\",\n    \"2-0\": \"current_subseason_id\",\n    \"3-0\": \"site_id\",\n    \"4-0\": \"sport_id\",\n    \"5-0\": \"image_id\",\n    \"6-0\": \"created_at\",\n    \"7-0\": \"updated_at\",\n    \"8-0\": \"button_title\",\n    \"9-0\": \"primary_color\",\n    \"10-0\": \"secondary_color\",\n    \"11-0\": \"gender\",\n    \"12-0\": \"abbrev\",\n    \"13-0\": \"score_ribbon\",\n    \"14-0\": \"tweet_games\",\n    \"15-0\": \"game_sheet_label\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"String\",\n    \"2-1\": \"Integer\",\n    \"3-1\": \"Integer\",\n    \"4-1\": \"Integer\",\n    \"5-1\": \"Integer\",\n    \"6-1\": \"Timestamp\",\n    \"7-1\": \"Timestamp\",\n    \"8-1\": \"String\",\n    \"9-1\": \"String\",\n    \"10-1\": \"String\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"Boolean\",\n    \"14-1\": \"Boolean\",\n    \"15-1\": \"String\",\n    \"0-2\": \"ID of league\",\n    \"1-2\": \"Name of league\",\n    \"2-2\": \"ID of the current subseason for the league. This could also be defined as the \\\"default\\\" subseason.\",\n    \"3-2\": \"ID of the site that the league belongs to\",\n    \"4-2\": \"ID of the sport that the league plays\",\n    \"5-2\": \"ID of an image\",\n    \"6-2\": \"Timestamp when created\",\n    \"7-2\": \"Timestamp of last update\",\n    \"8-2\": \"Title of league that shows up in navigation\",\n    \"9-2\": \"Primary color used in styling of league pages\",\n    \"10-2\": \"Secondary color used in styling of league pages\",\n    \"11-2\": \"Gender of league\",\n    \"12-2\": \"Abbreviation of league. Used in various locations that have limited text.\",\n    \"13-2\": \"Display score ribbon on league page\",\n    \"14-2\": \"Tweet games for league\",\n    \"15-2\": \"League's label for game sheets. Possible values are \\\"gamesheet\\\" or \\\"boxscore\\\".\"\n  },\n  \"cols\": 3,\n  \"rows\": 16\n}\n[/block]","order":1,"type":"get","updates":[],"__v":0,"githubsync":"","hidden":false,"link_url":"","sync_unique":"","parentDoc":null,"project":"5641217e0ee5370d00da636d","version":"56cca51eca43550b002813fa","category":"56e03709f97d422900d63922","editedParams":true,"isReference":true,"link_external":false,"childrenPages":[]}

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

site_id:
required
integer

Id of site

site_url:
string

Url of site

Attributes

Name
Type
Description

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

https://api.sportngin.com/leagues

Examples

curl --header "Authorization: Bearer ACCESS_TOKEN" --header "Accept: application/json" --header "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/leagues?site_id=11953"

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"
    }
]


{"_id":"56cf47d2336aa60b0086a224","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/leagues/27737\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/leagues/27737\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/leagues/27737\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"_id":"56cf47d2336aa60b0086a225","default":"","desc":"Id of the League","name":"id","ref":"","required":true,"type":"int","in":"path"}],"results":{"codes":[{"name":"","code":"{\n    \"id\": 27737,\n    \"name\": \"Eastern League\",\n    \"current_subseason_id\": 291621,\n    \"site_id\": 11953,\n    \"sport_id\": 1,\n    \"image_id\": null,\n    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n    \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n    \"button_title\": \"Eastern\",\n    \"primary_color\": \"00AEEF\",\n    \"secondary_color\": \"666666\",\n    \"gender\": \"male\",\n    \"abbrev\": \"East\",\n    \"score_ribbon\": false,\n    \"tweet_games\": null,\n    \"game_sheet_label\": \"gamesheet\"\n}","language":"json","status":200}]},"settings":"","url":"/leagues/:id"},"createdAt":"2016-02-25T18:28:34.751Z","link_external":false,"project":"5641217e0ee5370d00da636d","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"This endpoint is useful when there are many leagues in a [Site](ref:sites).  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.\"\n}\n[/block]","editedParams2":true,"githubsync":"","hidden":false,"order":2,"sync_unique":"","updates":[],"isReference":true,"link_url":"","type":"get","user":"569e96c56b4a2c0d007e9153","__v":0,"category":"56e03709f97d422900d63922","editedParams":true,"excerpt":"The Show method returns a single League for a given `id`.\n\n###Parameters","parentDoc":null,"slug":"leagues-show","title":"Leagues Show","version":"56cca51eca43550b002813fa","childrenPages":[]}

getLeagues Show

The Show method returns a single League for a given id.

Parameters


Path Params

id:
required
integer

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

https://api.sportngin.com/leagues/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/leagues/27737"

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":"56e1978e108d6a1700599138","api":{"examples":{"codes":[{"code":"curl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/league_instances?league_id=27737\"","language":"curl"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/league_instances?league_id=27737\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/league_instances?league_id=27737\")\n  .get()\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"get","params":[{"name":"league_id","in":"query","_id":"56e197da686c7d200086070b","ref":"","required":true,"desc":"Id of League","default":"","type":"int"}],"results":{"codes":[{"code":"[\n    {\n        \"id\": 41683,\n        \"season_id\": 267440,\n        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n        \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n        \"league_id\": 27737,\n        \"season_name\": \"2016\"\n    }\n]","language":"json","status":200,"name":""},{"name":"","code":"{\n  \"errors\": \"The parameter league_id is required\"\n}","language":"json","status":412}]},"settings":"","url":"/league_instances","auth":"required"},"editedParams":true,"link_external":false,"order":3,"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"season_id\",\n    \"2-0\": \"created_at\",\n    \"3-0\": \"updated_at\",\n    \"4-0\": \"league_id\",\n    \"5-0\": \"season_name\",\n    \"5-1\": \"String\",\n    \"4-1\": \"Integer\",\n    \"1-1\": \"Integer\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"ID of LeagueInstance\",\n    \"1-2\": \"ID of Season\",\n    \"4-2\": \"ID of League\",\n    \"5-2\": \"Name of Season (derived)\",\n    \"3-1\": \"Timestamp\",\n    \"2-1\": \"Timestamp\",\n    \"2-2\": \"Timestamp when created\",\n    \"3-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]","editedParams2":true,"excerpt":"The Index method returns an array of League Instances matching the given parameters.\n\n###Parameters","sync_unique":"","user":"569e96c56b4a2c0d007e9153","__v":1,"createdAt":"2016-03-10T15:49:34.919Z","isReference":true,"parentDoc":null,"title":"League Instances Index","updates":[],"version":"56cca51eca43550b002813fa","category":"56e03709f97d422900d63922","githubsync":"","hidden":false,"link_url":"","project":"5641217e0ee5370d00da636d","slug":"league-instances-index","type":"get","childrenPages":[]}

getLeague Instances Index

The Index method returns an array of League Instances matching the given parameters.

Parameters


Query Params

league_id:
required
integer

Id of League

Attributes

Name
Type
Description

id

Integer

ID of LeagueInstance

season_id

Integer

ID of Season

created_at

Timestamp

Timestamp when created

updated_at

Timestamp

Timestamp of last update

league_id

Integer

ID of League

season_name

String

Name of Season (derived)

Definition

https://api.sportngin.com/league_instances

Examples

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/league_instances?league_id=27737"

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"
    }
]


{"_id":"56e1a7db71e22d2b009801e5","type":"get","updates":[],"api":{"settings":"","url":"/league_instance_tree/:id","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/league_instance_tree/41683\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/league_instance_tree/41683\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/league_instance_tree/41683\")\n  .get()\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"in":"path","_id":"56e1a7db71e22d2b009801e6","ref":"","required":true,"desc":"Id of LeagueInstance","default":"","type":"int","name":"id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"node\": {\n        \"id\": 2458062,\n        \"node_type\": \"LeagueInstance\",\n        \"data\": {\n            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n            \"id\": 41683,\n            \"league_id\": 27737,\n            \"season_id\": 267440,\n            \"updated_at\": \"2016-03-22T12:46:58-07:00\"\n        },\n        \"children\": [\n            {\n                \"node\": {\n                    \"id\": 2458064,\n                    \"node_type\": \"Subseason\",\n                    \"data\": {\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"id\": 291621,\n                        \"name\": \"Regular Season\",\n                        \"position\": 1,\n                        \"season_id\": 267440,\n                        \"snl_scoring_enabled\": true,\n                        \"statistic_grouping_id\": 417884,\n                        \"updated_at\": \"2016-04-11T09:02:40-07:00\",\n                        \"workers_completed\": null,\n                        \"live_scoring_stat_configuration\": {\n                            \"show_plus_minus\": null,\n                            \"fair_play_points\": false\n                        }\n                    },\n                    \"children\": [\n                        {\n                            \"node\": {\n                                \"id\": 2458074,\n                                \"node_type\": \"DivisionInstance\",\n                                \"data\": {\n                                    \"created_at\": \"2016-03-22T12:52:51-07:00\",\n                                    \"division_id\": 66180,\n                                    \"id\": 181552,\n                                    \"max_standings_points\": null,\n                                    \"non_standing\": false,\n                                    \"updated_at\": \"2016-03-22T12:52:51-07:00\",\n                                    \"division\": {\n                                        \"abbrev\": \"Ocn\",\n                                        \"button_title\": \"Oceanic\",\n                                        \"created_at\": \"2016-03-22T12:52:51-07:00\",\n                                        \"id\": 66180,\n                                        \"image_id\": null,\n                                        \"league_id\": 27737,\n                                        \"name\": \"Oceanic Division\",\n                                        \"primary_color\": \"00AEEF\",\n                                        \"secondary_color\": \"666666\",\n                                        \"updated_at\": \"2016-03-22T14:25:05-07:00\"\n                                    }\n                                },\n                                \"children\": [\n                                    {\n                                        \"node\": {\n                                            \"id\": 2458139,\n                                            \"node_type\": \"TeamInstance\",\n                                            \"data\": {\n                                                \"abbrev\": \"Bos\",\n                                                \"affects_standings\": true,\n                                                \"button_title\": \"Boston\",\n                                                \"created_at\": \"2016-03-22T13:19:12-07:00\",\n                                                \"gender\": \"male\",\n                                                \"id\": 1876243,\n                                                \"image_id\": null,\n                                                \"management_team_id\": null,\n                                                \"name\": \"Boston Bears\",\n                                                \"opponent\": null,\n                                                \"parent_team_instance_id\": null,\n                                                \"primary_color\": \"000000\",\n                                                \"roster_id\": 1837158,\n                                                \"secondary_color\": \"000000\",\n                                                \"team_id\": 1373611,\n                                                \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n                                                \"team\": {\n                                                    \"abbrev\": \"Bos\",\n                                                    \"android_whitelabel_url\": null,\n                                                    \"button_title\": \"Boston\",\n                                                    \"created_at\": \"2016-03-22T13:06:41-07:00\",\n                                                    \"gender\": \"male\",\n                                                    \"id\": 1373611,\n                                                    \"image_id\": null,\n                                                    \"ios_whitelabel_url\": null,\n                                                    \"name\": \"Boston Bears\",\n                                                    \"opponent\": null,\n                                                    \"parent_team_id\": null,\n                                                    \"primary_color\": \"000000\",\n                                                    \"secondary_color\": \"000000\",\n                                                    \"sport_id\": 1,\n                                                    \"updated_at\": \"2016-03-23T09:34:28-07:00\"\n                                                }\n                                            },\n                                            \"children\": []\n                                        }\n                                    },\n                                  ...","name":""}]}},"editedParams":true,"hidden":false,"order":4,"parentDoc":null,"category":"56e03709f97d422900d63922","excerpt":"The Show method returns the page node structure beneath the [League Instance](https://sportnginv2.readme.io/docs/league-instances-index).\n\n###Parameters","link_url":"","title":"League Instance Tree Show","user":"569e96c56b4a2c0d007e9153","editedParams2":true,"githubsync":"","isReference":true,"createdAt":"2016-03-10T16:59:07.252Z","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"league-instance-tree-show","sync_unique":"","__v":0,"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"ID of PageNode\",\n    \"1-0\": \"node_type\",\n    \"1-1\": \"String\",\n    \"2-0\": \"data\",\n    \"2-1\": \"Object\",\n    \"3-0\": \"children\",\n    \"3-1\": \"Array\",\n    \"1-2\": \"Type of PageNode\",\n    \"2-2\": \"Data for object related to PageNode\",\n    \"3-2\": \"Children PageNodes of this PageNode\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","version":"56cca51eca43550b002813fa","childrenPages":[]}

getLeague Instance Tree Show

The Show method returns the page node structure beneath the League Instance.

Parameters


Path Params

id:
required
integer

Id of LeagueInstance

Attributes

Name
Type
Description

id

Integer

ID of PageNode

node_type

String

Type of PageNode

data

Object

Data for object related to PageNode

children

Array

Children PageNodes of this PageNode

Definition

https://api.sportngin.com/league_instance_tree/:id

Examples

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/league_instance_tree/41683"

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": []
                                        }
                                    },
                                  ...


{"_id":"57052d36ecfca80e009992a8","slug":"divisions","title":"Divisions","__v":22,"api":{"params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"","auth":"required","examples":{"codes":[]}},"category":"56e03709f97d422900d63922","isReference":true,"type":"basic","hidden":false,"link_url":"","order":5,"parentDoc":null,"excerpt":"While _not accessible directly through the API_, it is useful to understand the relationship between a Division and a [Division Instance](https://sportnginv2.readme.io/docs/division-instances-create).  A Division is a logical grouping of [Teams](https://sportnginv2.readme.io/docs/teams-show) in the [League](https://sportnginv2.readme.io/docs/leagues), and a [Division Instance](https://sportnginv2.readme.io/docs/division-instances-create) is the instance of that Division for the current [Season](https://sportnginv2.readme.io/docs/seasons-show).","githubsync":"","link_external":false,"user":"56e71f9edee212320019e731","sync_unique":"","updates":[],"version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Division name\",\n    \"2-0\": \"button_title\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Button title for the division\",\n    \"3-0\": \"abbrev\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Division abbreviation\",\n    \"4-0\": \"image_id\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"Image id for the division\",\n    \"5-0\": \"primary_color\",\n    \"5-1\": \"String\",\n    \"5-2\": \"Primary color for the division\",\n    \"6-0\": \"secondary_color\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Secondary color for the division\",\n    \"7-0\": \"created_at\",\n    \"7-1\": \"Datetime\",\n    \"7-2\": \"Timestamp of creation\",\n    \"8-0\": \"updated_at\",\n    \"8-1\": \"Datetime\",\n    \"8-2\": \"Timestamp of last update\",\n    \"9-0\": \"league_id\",\n    \"9-1\": \"Integer\",\n    \"9-2\": \"League id the division belongs to\"\n  },\n  \"cols\": 3,\n  \"rows\": 10\n}\n[/block]","createdAt":"2016-04-06T15:37:26.012Z","project":"5641217e0ee5370d00da636d","childrenPages":[]}

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.


Attributes

Attribute
Type
Notes

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

{"_id":"57052e5e849f721900f279b4","__v":3,"hidden":false,"isReference":true,"order":6,"version":"56cca51eca43550b002813fa","sync_unique":"","user":"56e71f9edee212320019e731","editedParams":true,"editedParams2":true,"githubsync":"","link_url":"","parentDoc":null,"title":"Division Instances Index","updates":[],"api":{"params":[{"ref":"","required":true,"desc":"Id of subseason the divisions belong to","default":"","type":"int","name":"subseason_id","in":"query","_id":"57166fe3b5af590e00a0ffda"}],"results":{"codes":[{"language":"json","status":200,"name":"","code":"[\n    {\n        \"id\": 181552,\n        \"created_at\": \"2016-03-22T12:52:51-07:00\",\n        \"updated_at\": \"2016-03-22T12:52:51-07:00\",\n        \"division_id\": 66180,\n        \"non_standing\": false,\n        \"max_standings_points\": null\n    },\n    {\n        \"id\": 181553,\n        \"created_at\": \"2016-03-22T12:54:23-07:00\",\n        \"updated_at\": \"2016-03-22T12:54:23-07:00\",\n        \"division_id\": 66181,\n        \"non_standing\": false,\n        \"max_standings_points\": null\n    }\n]"}]},"settings":"","url":"/division_instances","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/division_instances?subseason_id=291621\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/division_instances?subseason_id=291621\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"category":"56e03709f97d422900d63922","createdAt":"2016-04-06T15:42:22.928Z","excerpt":"The Index method returns an array of Division Instances for the given `subseason_id`.  A Division Instance is an instance of a specific [Divisions](https://sportnginv2.readme.io/docs/divisions), and effectively represents a single [Season](https://sportnginv2.readme.io/docs/seasons-show) within the [League](https://sportnginv2.readme.io/docs/leagues).\n\n###Parameters","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"1-0\": \"division_id\",\n    \"1-1\": \"Integer\",\n    \"2-0\": \"non_standing\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"whether the division instance affects standings\",\n    \"3-0\": \"created_at\",\n    \"3-1\": \"Datetime\",\n    \"3-2\": \"Timestamp of creation\",\n    \"4-0\": \"updated_at\",\n    \"4-1\": \"Datetime\",\n    \"4-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"division-instances-index","type":"get","childrenPages":[]}

getDivision Instances Index

The Index method returns an array of Division Instances for the given subseason_id. A Division Instance is an instance of a specific Divisions, and effectively represents a single Season within the League.

Parameters


Query Params

subseason_id:
required
integer

Id of subseason the divisions belong to

Attributes

Attribute
Type
Notes

id

Integer

division_id

Integer

non_standing

Boolean

whether the division instance affects standings

created_at

Datetime

Timestamp of creation

updated_at

Datetime

Timestamp of last update

Definition

https://api.sportngin.com/division_instances

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/division_instances?subseason_id=291621"

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
    }
]


{"_id":"57eeb35fcc36920e00bff4c0","isReference":true,"updates":[],"githubsync":"","hidden":false,"api":{"auth":"required","examples":{"codes":[{"name":"cURL - New Division","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN  \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n  \"parent_node_id\": 2458064,\n  \"existing_or_new\": \"new\",\n  \"top_template_id\": 23221,\n  \"bottom_template_id\": 23221,\n  \"division\": {\n    \"name\": \"Test division\",\n    \"button_title\": \"Test\",\n    \"abbrev\": \"TD\",\n    \"primary_color\": \"FFFFFF\",\n    \"secondary_color\": \"000000\"\n  }\n}' \"https://api.sportngin.com/division_instances\"","language":"curl"},{"name":"Ruby - New Division","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n  \\\"parent_node_id\\\": 2458064,\\n  \\\"existing_or_new\\\": \\\"new\\\",\\n  \\\"top_template_id\\\": 23221,\\n  \\\"bottom_template_id\\\": 23221,\\n  \\\"division\\\": {\\n    \\\"name\\\": \\\"Test division\\\",\\n    \\\"button_title\\\": \\\"Test\\\",\\n    \\\"abbrev\\\": \\\"TD\\\",\\n    \\\"primary_color\\\": \\\"FFFFFF\\\",\\n    \\\"secondary_color\\\": \\\"000000\\\"\\n  }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"name":"Java - New Division","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n  \\\"parent_node_id\\\": 2458064,\\n  \\\"existing_or_new\\\": \\\"new\\\",\\n  \\\"top_template_id\\\": 23221,\\n  \\\"bottom_template_id\\\": 23221,\\n  \\\"division\\\": {\\n    \\\"name\\\": \\\"Test division\\\",\\n    \\\"button_title\\\": \\\"Test\\\",\\n    \\\"abbrev\\\": \\\"TD\\\",\\n    \\\"primary_color\\\": \\\"FFFFFF\\\",\\n    \\\"secondary_color\\\": \\\"000000\\\"\\n  }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/division_instances\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"},{"name":"cURL - Existing Division","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN  \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n  \"parent_node_id\": 2458062,\n  \"division_id\":  66180\n}' \"https://api.sportngin.com/division_instances\"","language":"curl"},{"name":"Ruby - Existing Division","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n  \\\"parent_node_id\\\": 2458062,\\n  \\\"division_id\\\":  66180\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"name":"Java - Existing Division","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n  \\\"parent_node_id\\\": 2458062,\\n  \\\"division_id\\\":  66180\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/division_instances\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[{"_id":"57eeb756cc36920e00bff4c5","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"parent_node_id"},{"_id":"57eeb756cc36920e00bff4c4","default":"","desc":"Needed if the division instance is not being created as part of an existing division","in":"body","name":"new","ref":"","required":false,"type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 209310,\n    \"created_at\": \"2016-09-30T12:00:52-07:00\",\n    \"updated_at\": \"2016-09-30T12:00:52-07:00\",\n    \"division_id\": 66180,\n    \"non_standing\": false,\n    \"max_standings_points\": null\n}","name":""}]},"settings":"","url":"/division_instances"},"createdAt":"2016-09-30T18:47:59.386Z","excerpt":"The Create method accepts a single Division Instance (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"division-instances-create","title":"Division Instances Create","__v":2,"body":"","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","order":7,"parentDoc":null,"sync_unique":"","type":"post","category":"56e03709f97d422900d63922","link_url":"","childrenPages":[]}

postDivision Instances Create

The Create method accepts a single Division Instance (see attributes above) and creates a new record in SportsEngine.

Parameters


Body Params

parent_node_id:
required
integer
new:
string

Needed if the division instance is not being created as part of an existing division

Definition

https://api.sportngin.com/division_instances

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
}


{"_id":"57eeb2dd5347840e0053f1a8","order":8,"hidden":false,"link_external":false,"link_url":"","project":"5641217e0ee5370d00da636d","title":"Division Instances Update","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN  \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n\t\"max_standings_points\": 44.00\n}\n}' \"https://api.sportngin.com/division_instances/181552\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances/181552\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"max_standings_points\\\": 44.00 \\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"max_standings_points\\\": 44.00 \\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/division_instances/181552\")\n  .put(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"put","params":[{"default":"","type":"int","name":"id","_id":"577e8f45a74eb40e00d97b62","ref":"","in":"path","required":true,"desc":"Id of DivisionInstance to update"}],"results":{"codes":[{"status":200,"name":"","code":"{\n    \"id\": 181552,\n    \"created_at\": \"2016-03-22T12:52:51-07:00\",\n    \"updated_at\": \"2016-09-30T11:40:25-07:00\",\n    \"division_id\": 66180,\n    \"non_standing\": false,\n    \"max_standings_points\": \"44.0\"\n}","language":"json"}]},"settings":"","url":"/division_instances/:id"},"createdAt":"2016-09-30T18:45:49.661Z","excerpt":"The Update method updates the provided fields for a given `id`.\n\n###Parameters","type":"put","updates":[],"version":"56cca51eca43550b002813fa","isReference":true,"parentDoc":null,"slug":"division-instances-update","githubsync":"","sync_unique":"","user":"56548c568975c70d002ea4b4","__v":0,"body":"","category":"56e03709f97d422900d63922","childrenPages":[]}

putDivision Instances Update

The Update method updates the provided fields for a given id.

Parameters


Path Params

id:
required
integer

Id of DivisionInstance to update

Definition

https://api.sportngin.com/division_instances/:id

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 '{
	"max_standings_points": 44.00
}
}' "https://api.sportngin.com/division_instances/181552"

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"
}


{"_id":"57eeaabb7a53690e000abc13","excerpt":"The Delete method permanently deletes the associated DivisionInstance record in SportsEngine.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","githubsync":"","isReference":true,"link_external":false,"link_url":"","title":"Division Instances Delete","updates":[],"category":"56e03709f97d422900d63922","createdAt":"2016-09-30T18:11:07.379Z","order":9,"parentDoc":null,"type":"delete","body":"","project":"5641217e0ee5370d00da636d","sync_unique":"","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","api":{"examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/division_instances/209258\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/division_instances/209258\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/division_instances/209258\")\n  .delete(null)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"name":"id","_id":"57114eae5ba0d80e00f51614","ref":"","in":"path","required":true,"desc":"Id belonging to the division_instance of interest","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 209258,\n  \"created_at\": \"2016-09-28T14:38:04-07:00\",\n  \"updated_at\": \"2016-09-28T14:38:04-07:00\",\n  \"division_id\": 77569,\n  \"non_standing\": false,\n  \"max_standings_points\": null\n}","name":""}]},"settings":"","url":"/division_instances/:id","auth":"required"},"hidden":false,"slug":"division-instances-delete","__v":0,"childrenPages":[]}

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:
required
integer

Id belonging to the division_instance of interest

Definition

https://api.sportngin.com/division_instances/:id

Examples

curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/division_instances/209258"

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
}


{"_id":"57f26f94130b941700a4bc47","slug":"teams","sync_unique":"","type":"basic","updates":[],"api":{"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"githubsync":"","link_external":false,"parentDoc":null,"title":"Teams","category":"56e03709f97d422900d63922","link_url":"","order":10,"project":"5641217e0ee5370d00da636d","excerpt":"A Team can belong to a Division in a [League](https://sportnginv2.readme.io/docs/leagues), a league with no divisions, or exist as solo team league. A [Team Instance](https://sportnginv2.readme.io/docs/team-instances-create) is the instance of that Team for the current [Season](https://sportnginv2.readme.io/docs/seasons-show).","hidden":false,"isReference":true,"user":"56548c568975c70d002ea4b4","__v":0,"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"2-0\": \"button_title\",\n    \"2-1\": \"String\",\n    \"3-0\": \"abbrev\",\n    \"3-1\": \"String\",\n    \"4-0\": \"image_id\",\n    \"4-1\": \"Integer\",\n    \"5-0\": \"primary_color\",\n    \"5-1\": \"String\",\n    \"6-0\": \"secondary_color\",\n    \"6-1\": \"String\",\n    \"7-0\": \"gender\",\n    \"7-1\": \"Enum\",\n    \"8-0\": \"created_at\",\n    \"8-1\": \"DateTime\",\n    \"9-0\": \"updated_at\",\n    \"9-1\": \"DateTime\",\n    \"10-0\": \"sport_id\",\n    \"10-1\": \"Integer\",\n    \"11-0\": \"opponent\",\n    \"11-1\": \"Integer\",\n    \"12-0\": \"parent_team_id\",\n    \"12-1\": \"Integer\",\n    \"13-0\": \"ios_whitelabel_url\",\n    \"13-1\": \"String\",\n    \"14-0\": \"android_whitelabel_url\",\n    \"14-1\": \"String\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-2\": \"Team name\",\n    \"2-2\": \"Button title for the team\",\n    \"3-2\": \"Team abbreviation\",\n    \"4-2\": \"Image id for the team\",\n    \"5-2\": \"Primary color for the team\",\n    \"6-2\": \"Primary color for the team\",\n    \"8-2\": \"Timestamp of creation\",\n    \"9-2\": \"Timestamp of last update\",\n    \"12-2\": \"Id of team that is above this team\",\n    \"7-2\": \"Gender for the team\",\n    \"10-2\": \"Id of the sport which the team belongs to\",\n    \"11-2\": \"Set to `1` if the team is in the system as an opponent in a solo team league. Default value = `null`\",\n    \"13-2\": \"URL of the iTunes store item for the team's app, if applicable\",\n    \"14-2\": \"URL of the Google Play store item for the team's app, if applicable\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]","createdAt":"2016-10-03T14:47:48.783Z","version":"56cca51eca43550b002813fa","childrenPages":[]}

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.


Attributes

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

{"_id":"571941aaac1e2e0e00183463","category":"56e03709f97d422900d63922","githubsync":"","sync_unique":"","type":"get","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","api":{"url":"/teams","auth":"required","examples":{"codes":[{"language":"curl","code":"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\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/teams?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/teams?site_id=11953\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - with parameter","language":"curl","code":"curl -X GET -H \"Authorization: Bearer cb2e3bd276c7fdc8e0a9989c88c032b3\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Cache-Control: no-cache\" -H \"Postman-Token: 5021fb49-93c1-928f-6a63-f21dec82d677\" \"https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1\""},{"language":"ruby","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer cb2e3bd276c7fdc8e0a9989c88c032b3\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .addHeader(\"postman-token\", \"cb5b6b64-402a-3de6-6eff-cbe641ac55b2\")\n  .build();\n\nResponse response = client.newCall(request).execute();","name":"Ruby - with parameter"},{"name":"Java - with parameter","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/teams?site_id=11953¤t_subseason_only=1\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer cb2e3bd276c7fdc8e0a9989c88c032b3\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .addHeader(\"postman-token\", \"cb5b6b64-402a-3de6-6eff-cbe641ac55b2\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"type":"int","name":"site_id","in":"query","_id":"571941aaac1e2e0e00183469","ref":"","required":true,"desc":"Id of site the teams belong to","default":""},{"type":"int","name":"league_ids","in":"query","_id":"571941aaac1e2e0e00183468","ref":"","required":true,"desc":"Id of leagues the teams belong to","default":""},{"required":true,"desc":"Id of teams to be returned","default":"","type":"int","name":"team_ids","in":"query","_id":"571941aaac1e2e0e00183467","ref":""},{"desc":"Id of sport the teams belong to","default":"","type":"int","name":"sport_id","in":"query","_id":"571941aaac1e2e0e00183466","ref":"","required":false},{"name":"write_access","in":"query","_id":"571941aaac1e2e0e00183465","ref":"","required":false,"desc":"","default":"","type":"int"},{"desc":"","default":"","type":"int","name":"current_subseason_only","in":"query","_id":"571941aaac1e2e0e00183464","ref":"","required":false}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n    {\n        \"id\": 1373611,\n        \"name\": \"Boston Bears\",\n        \"button_title\": \"Boston\",\n        \"abbrev\": \"Bos\",\n        \"image_id\": null,\n        \"primary_color\": \"000000\",\n        \"secondary_color\": \"000000\",\n        \"gender\": \"male\",\n        \"created_at\": \"2016-03-22T13:06:41-07:00\",\n        \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n        \"sport_id\": 1,\n        \"opponent\": null,\n        \"parent_team_id\": null,\n        \"ios_whitelabel_url\": null,\n        \"android_whitelabel_url\": null,\n        \"sites\": [\n            {\n                \"id\": 11953,\n                \"domain_id\": 1149,\n                \"domain_name\": \"sportngin.com\",\n                \"subdomain\": \"apidemo\",\n                \"product_id\": 14,\n                \"name\": \"Sport Ngin API Demo Site\",\n                \"short_name\": \"Sport Ngin API Demo Site\",\n                \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                \"updated_on\": \"2016-04-19T10:52:59-07:00\",\n                \"created_by_user_id\": 3156422,\n                \"updated_by_user_id\": null,\n                \"timezone\": \"US/Central\",\n                \"twitter_user_id\": null,\n                \"layout_theme_id\": 51,\n                \"secure_subdomain\": \"apidemo\",\n                \"address_id\": 4447713,\n                \"membership_privacy\": \"open\",\n                \"membership_grace_period\": 1,\n                \"boss_billing_account_id\": null,\n                \"boss_organization_id\": 27743\n            }\n        ],\n        \"leagues\": [\n            {\n                \"id\": 27737,\n                \"name\": \"Eastern League\",\n                \"current_subseason_id\": 291621,\n                \"site_id\": 11953,\n                \"sport_id\": 1,\n                \"image_id\": null,\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n                \"button_title\": \"Eastern\",\n                \"primary_color\": \"00AEEF\",\n                \"secondary_color\": \"666666\",\n                \"gender\": \"male\",\n                \"abbrev\": \"East\",\n                \"score_ribbon\": false,\n                \"tweet_games\": null,\n                \"game_sheet_label\": \"gamesheet\"\n            }\n        ],\n        \"thumbnails\": {},\n        \"thumbnails_ssl\": {},\n        \"current_subseason_ids\": [\n            291621\n        ],\n        \"seasons\": [\n            {\n                \"id\": 267440,\n                \"name\": \"2016\",\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                \"solo_team_league_id\": null,\n                \"has_metadata\": null,\n                \"show_shared_schedule\": false,\n                \"stat_preference\": {\n                    \"id\": 292407,\n                    \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"game_defaults\": {\n                        \"auto_navigate_to_play_details\": true,\n                        \"field_of_play_enabled\": false,\n                        \"game_misconduct_time\": 0,\n                        \"ice_hockey_goalie_order_by\": null,\n                        \"ice_hockey_goalie_order_by_secondary\": null,\n                        \"ice_hockey_goalie_order_dir\": null,\n                        \"ice_hockey_goalie_order_dir_secondary\": null,\n                        \"ice_hockey_goalie_stat_qualify_by\": null,\n                        \"ice_hockey_goalie_stat_qualify_val\": null,\n                        \"ice_hockey_skater_order_by\": null,\n                        \"ice_hockey_skater_order_by_secondary\": null,\n                        \"ice_hockey_skater_order_dir\": null,\n                        \"ice_hockey_skater_order_dir_secondary\": null,\n                        \"ice_hockey_skater_stat_qualify_by\": null,\n                        \"ice_hockey_skater_stat_qualify_val\": null,\n                        \"ice_hockey_team_scoring_order_by\": \"pts\",\n                        \"ice_hockey_team_scoring_order_by_secondary\": null,\n                        \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                        \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                        \"ice_hockey_team_stats_order_by\": null,\n                        \"ice_hockey_team_stats_order_by_secondary\": null,\n                        \"ice_hockey_team_stats_order_dir\": null,\n                        \"ice_hockey_team_stats_order_dir_secondary\": null,\n                        \"ice_hockey_team_stats_stat_qualify_by\": null,\n                        \"ice_hockey_team_stats_stat_qualify_val\": null,\n                        \"intermission_length\": 1,\n                        \"major_adjustment_time\": 0,\n                        \"major_penalty_time\": 5,\n                        \"match_penalty_time\": 5,\n                        \"max_goal_differential\": 0,\n                        \"max_player_major_penalties\": 2,\n                        \"max_player_penalties\": 5,\n                        \"max_team_penalties\": 15,\n                        \"minor_adjustment_time\": 0,\n                        \"minor_penalty_time\": 2,\n                        \"misconduct_time\": 10,\n                        \"overtime_intervals\": 2,\n                        \"overtime_length\": \"5\",\n                        \"post_live_updates\": true,\n                        \"regulation_time_intervals\": null,\n                        \"shootout_enabled\": false,\n                        \"stop_run_time\": true,\n                        \"time_interval_name\": \"period\",\n                        \"time_intervals\": [\n                            \"20\",\n                            \"20\",\n                            \"20\"\n                        ],\n                        \"timeout_time\": 1,\n                        \"timeouts\": 1,\n                        \"track_goal_types\": true,\n                        \"track_player_sog\": true,\n                        \"warmup_length\": 5\n                    },\n                    \"season_id\": 267440,\n                    \"original_scorer_can_edit\": null,\n                    \"force_real_time_scoring\": false,\n                    \"stat_tool_id\": 1848623,\n                    \"stats_can_be_unlinked\": null,\n                    \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                    \"can_edit_final\": \"league_owner\",\n                    \"traded_player_stats\": null,\n                    \"game_sheet_auto_summary_enabled\": true,\n                    \"visible_stats\": \"league_xor_division\"\n                },\n                \"subseasons\": [\n                    {\n                        \"id\": 291621,\n                        \"name\": \"Regular Season\",\n                        \"season_id\": 267440,\n                        \"position\": 1,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-04-20T09:47:22-07:00\",\n                        \"snl_scoring_enabled\": true,\n                        \"statistic_grouping_id\": 417884,\n                        \"workers_completed\": null,\n                        \"standing_preference\": {\n                            \"id\": 110425,\n                            \"standing_tool_id\": 1848627,\n                            \"standing_type_id\": 5,\n                            \"standings_aggregation_level\": \"league\",\n                            \"qualifiers\": null,\n                            \"qualifier_limit\": null,\n                            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"winning_team_custom_points\": null,\n                            \"losing_team_custom_points\": null,\n                            \"tied_team_custom_points\": null,\n                            \"label_mapping\": {},\n                            \"extended_fields\": [\n                                \"win_count\",\n                                \"loss_count\",\n                                \"tie_count\",\n                                \"points\"\n                            ],\n                            \"order_rule\": 1,\n                            \"overtime_win_custom_points\": null,\n                            \"overtime_loss_custom_points\": null,\n                            \"overtime_wins_include_in_wins\": true,\n                            \"overtime_losses_include_in_losses\": true,\n                            \"legacy_custom_points\": false\n                        },\n                        \"live_scoring_stat_configuration\": {\n                            \"show_plus_minus\": null,\n                            \"fair_play_points\": false\n                        }\n                    }\n                ]\n            }\n        ],\n        \"subseason_team_instance_mapping\": [\n            {\n                \"subseason_id\": 291621,\n                \"team_instance_id\": 1876243\n            }\n        ],\n        \"league_name\": \"Eastern League\",\n        \"site_name\": \"Sport Ngin API Demo Site\",\n        \"sport_name\": \"Ice Hockey\"\n    },\n    ...\n]"}]},"settings":""},"createdAt":"2016-04-21T21:10:02.860Z","editedParams2":true,"isReference":true,"link_url":"","order":11,"parentDoc":null,"project":"5641217e0ee5370d00da636d","title":"Teams Index","body":"","editedParams":true,"excerpt":"The Index method returns an array of Teams matching the given parameters.\n\n###Parameters","__v":0,"hidden":false,"link_external":false,"slug":"teams-index","updates":[],"childrenPages":[]}

getTeams Index

The Index method returns an array of Teams matching the given parameters.

Parameters


Query Params

site_id:
required
integer

Id of site the teams belong to

league_ids:
required
integer

Id of leagues the teams belong to

team_ids:
required
integer

Id of teams to be returned

sport_id:
integer

Id of sport the teams belong to

write_access:
integer
current_subseason_only:
integer

Definition

https://api.sportngin.com/teams

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"
    },
    ...
]


{"_id":"571942ddac1e2e0e00183470","category":"56e03709f97d422900d63922","slug":"teams-show","type":"get","updates":[],"version":"56cca51eca43550b002813fa","order":12,"title":"Teams Show","body":"","editedParams2":true,"excerpt":"The Show method returns a single Team for a given `id`.\n\n###Parameters","githubsync":"","isReference":true,"project":"5641217e0ee5370d00da636d","sync_unique":"","createdAt":"2016-04-21T21:15:09.174Z","editedParams":true,"hidden":false,"parentDoc":null,"__v":0,"api":{"params":[{"ref":"","required":true,"desc":"Id of the team","default":"","type":"int","name":"id","in":"path","_id":"571941aaac1e2e0e00183469"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n    \"id\": 1373611,\n    \"name\": \"Boston Bears\",\n    \"button_title\": \"Boston\",\n    \"abbrev\": \"Bos\",\n    \"image_id\": null,\n    \"primary_color\": \"000000\",\n    \"secondary_color\": \"000000\",\n    \"gender\": \"male\",\n    \"created_at\": \"2016-03-22T13:06:41-07:00\",\n    \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n    \"sport_id\": 1,\n    \"opponent\": null,\n    \"parent_team_id\": null,\n    \"ios_whitelabel_url\": null,\n    \"android_whitelabel_url\": null,\n    \"sites\": [\n        {\n            \"id\": 11953,\n            \"domain_id\": 1149,\n            \"domain_name\": \"sportngin.com\",\n            \"subdomain\": \"apidemo\",\n            \"product_id\": 14,\n            \"name\": \"Sport Ngin API Demo Site\",\n            \"short_name\": \"Sport Ngin API Demo Site\",\n            \"created_on\": \"2016-02-24T06:32:26-08:00\",\n            \"updated_on\": \"2016-04-19T10:52:59-07:00\",\n            \"created_by_user_id\": 3156422,\n            \"updated_by_user_id\": null,\n            \"timezone\": \"US/Central\",\n            \"twitter_user_id\": null,\n            \"layout_theme_id\": 51,\n            \"secure_subdomain\": \"apidemo\",\n            \"address_id\": 4447713,\n            \"membership_privacy\": \"open\",\n            \"membership_grace_period\": 1,\n            \"boss_billing_account_id\": null,\n            \"boss_organization_id\": 27743\n        }\n    ],\n    \"leagues\": [\n        {\n            \"id\": 27737,\n            \"name\": \"Eastern League\",\n            \"current_subseason_id\": 291621,\n            \"site_id\": 11953,\n            \"sport_id\": 1,\n            \"image_id\": null,\n            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n            \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n            \"button_title\": \"Eastern\",\n            \"primary_color\": \"00AEEF\",\n            \"secondary_color\": \"666666\",\n            \"gender\": \"male\",\n            \"abbrev\": \"East\",\n            \"score_ribbon\": false,\n            \"tweet_games\": null,\n            \"game_sheet_label\": \"gamesheet\"\n        }\n    ],\n    \"thumbnails\": {},\n    \"thumbnails_ssl\": {},\n    \"current_subseason_ids\": [\n        291621\n    ],\n    \"seasons\": [\n        {\n            \"id\": 267440,\n            \"name\": \"2016\",\n            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n            \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n            \"solo_team_league_id\": null,\n            \"has_metadata\": null,\n            \"show_shared_schedule\": false,\n            \"stat_preference\": {\n                \"id\": 292407,\n                \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                \"game_defaults\": {\n                    \"auto_navigate_to_play_details\": true,\n                    \"field_of_play_enabled\": false,\n                    \"game_misconduct_time\": 0,\n                    \"ice_hockey_goalie_order_by\": null,\n                    \"ice_hockey_goalie_order_by_secondary\": null,\n                    \"ice_hockey_goalie_order_dir\": null,\n                    \"ice_hockey_goalie_order_dir_secondary\": null,\n                    \"ice_hockey_goalie_stat_qualify_by\": null,\n                    \"ice_hockey_goalie_stat_qualify_val\": null,\n                    \"ice_hockey_skater_order_by\": null,\n                    \"ice_hockey_skater_order_by_secondary\": null,\n                    \"ice_hockey_skater_order_dir\": null,\n                    \"ice_hockey_skater_order_dir_secondary\": null,\n                    \"ice_hockey_skater_stat_qualify_by\": null,\n                    \"ice_hockey_skater_stat_qualify_val\": null,\n                    \"ice_hockey_team_scoring_order_by\": \"pts\",\n                    \"ice_hockey_team_scoring_order_by_secondary\": null,\n                    \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                    \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                    \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                    \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                    \"ice_hockey_team_stats_order_by\": null,\n                    \"ice_hockey_team_stats_order_by_secondary\": null,\n                    \"ice_hockey_team_stats_order_dir\": null,\n                    \"ice_hockey_team_stats_order_dir_secondary\": null,\n                    \"ice_hockey_team_stats_stat_qualify_by\": null,\n                    \"ice_hockey_team_stats_stat_qualify_val\": null,\n                    \"intermission_length\": 1,\n                    \"major_adjustment_time\": 0,\n                    \"major_penalty_time\": 5,\n                    \"match_penalty_time\": 5,\n                    \"max_goal_differential\": 0,\n                    \"max_player_major_penalties\": 2,\n                    \"max_player_penalties\": 5,\n                    \"max_team_penalties\": 15,\n                    \"minor_adjustment_time\": 0,\n                    \"minor_penalty_time\": 2,\n                    \"misconduct_time\": 10,\n                    \"overtime_intervals\": 2,\n                    \"overtime_length\": \"5\",\n                    \"post_live_updates\": true,\n                    \"regulation_time_intervals\": null,\n                    \"shootout_enabled\": false,\n                    \"stop_run_time\": true,\n                    \"time_interval_name\": \"period\",\n                    \"time_intervals\": [\n                        \"20\",\n                        \"20\",\n                        \"20\"\n                    ],\n                    \"timeout_time\": 1,\n                    \"timeouts\": 1,\n                    \"track_goal_types\": true,\n                    \"track_player_sog\": true,\n                    \"warmup_length\": 5\n                },\n                \"season_id\": 267440,\n                \"original_scorer_can_edit\": null,\n                \"force_real_time_scoring\": false,\n                \"stat_tool_id\": 1848623,\n                \"stats_can_be_unlinked\": null,\n                \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                \"can_edit_final\": \"league_owner\",\n                \"traded_player_stats\": null,\n                \"game_sheet_auto_summary_enabled\": true,\n                \"visible_stats\": \"league_xor_division\"\n            },\n            \"subseasons\": [\n                {\n                    \"id\": 291621,\n                    \"name\": \"Regular Season\",\n                    \"season_id\": 267440,\n                    \"position\": 1,\n                    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                    \"updated_at\": \"2016-04-20T09:47:22-07:00\",\n                    \"snl_scoring_enabled\": true,\n                    \"statistic_grouping_id\": 417884,\n                    \"workers_completed\": null,\n                    \"standing_preference\": {\n                        \"id\": 110425,\n                        \"standing_tool_id\": 1848627,\n                        \"standing_type_id\": 5,\n                        \"standings_aggregation_level\": \"league\",\n                        \"qualifiers\": null,\n                        \"qualifier_limit\": null,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"winning_team_custom_points\": null,\n                        \"losing_team_custom_points\": null,\n                        \"tied_team_custom_points\": null,\n                        \"label_mapping\": {},\n                        \"extended_fields\": [\n                            \"win_count\",\n                            \"loss_count\",\n                            \"tie_count\",\n                            \"points\"\n                        ],\n                        \"order_rule\": 1,\n                        \"overtime_win_custom_points\": null,\n                        \"overtime_loss_custom_points\": null,\n                        \"overtime_wins_include_in_wins\": true,\n                        \"overtime_losses_include_in_losses\": true,\n                        \"legacy_custom_points\": false\n                    },\n                    \"live_scoring_stat_configuration\": {\n                        \"show_plus_minus\": null,\n                        \"fair_play_points\": false\n                    }\n                }\n            ]\n        }\n    ],\n    \"subseason_team_instance_mapping\": [\n        {\n            \"subseason_id\": 291621,\n            \"team_instance_id\": 1876243\n        }\n    ],\n    \"league_name\": \"Eastern League\",\n    \"site_name\": \"Sport Ngin API Demo Site\",\n    \"sport_name\": \"Ice Hockey\",\n    \"team_instances\": [\n        {\n            \"abbrev\": \"Bos\",\n            \"affects_standings\": true,\n            \"button_title\": \"Boston\",\n            \"created_at\": \"2016-03-22T13:19:12-07:00\",\n            \"gender\": \"male\",\n            \"id\": 1876243,\n            \"image_id\": null,\n            \"management_team_id\": null,\n            \"name\": \"Boston Bears\",\n            \"opponent\": null,\n            \"parent_team_instance_id\": null,\n            \"primary_color\": \"000000\",\n            \"roster_id\": 1837158,\n            \"secondary_color\": \"000000\",\n            \"team_id\": 1373611,\n            \"updated_at\": \"2016-03-23T09:34:28-07:00\"\n        }\n    ]\n}"}]},"settings":"","url":"/teams/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/teams/1373611\""},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/teams/1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/teams/1373611\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"link_external":false,"link_url":"","user":"56548c568975c70d002ea4b4","childrenPages":[]}

getTeams Show

The Show method returns a single Team for a given id.

Parameters


Path Params

id:
required
integer

Id of the team

Definition

https://api.sportngin.com/teams/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/teams/1373611"

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"
        }
    ]
}


{"_id":"577e8f45a74eb40e00d97b61","isReference":true,"link_url":"","githubsync":"","order":13,"project":"5641217e0ee5370d00da636d","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN  \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"team\":\n    {\n        \"abbrev\": \"BBB\" \n    }\n}' \"https://api.sportngin.com/teams/1373611\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/teams/1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"team\\\":\\n    {\\n        \\\"abbrev\\\": \\\"BBB\\\" \\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"team\\\":\\n    {\\n        \\\"abbrev\\\": \\\"BBB\\\" \\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/teams/1373611\")\n  .put(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"type":"int","name":"id","in":"path","_id":"577e8f45a74eb40e00d97b62","ref":"","required":true,"desc":"Id of team to update","default":""}],"results":{"codes":[{"name":"","code":"{\n    \"id\": 1373611,\n    \"name\": \"Boston Bears\",\n    \"button_title\": \"Boston\",\n    \"abbrev\": \"BBB\",\n    \"image_id\": null,\n    \"primary_color\": \"000000\",\n    \"secondary_color\": \"000000\",\n    \"gender\": \"male\",\n    \"created_at\": \"2016-03-22T13:06:41-07:00\",\n    \"updated_at\": \"2016-07-07T10:16:51-07:00\",\n    \"sport_id\": 1,\n    \"opponent\": null,\n    \"parent_team_id\": null,\n    \"ios_whitelabel_url\": null,\n    \"android_whitelabel_url\": null,\n    \"sites\": [\n        {\n            \"id\": 11953,\n            \"domain_id\": 1149,\n            \"domain_name\": \"sportngin.com\",\n            \"subdomain\": \"apidemo\",\n            \"product_id\": 14,\n            \"name\": \"Sport Ngin API Demo Site\",\n            \"short_name\": \"Sport Ngin API Demo Site\",\n            \"created_on\": \"2016-02-24T06:32:26-08:00\",\n            \"updated_on\": \"2016-06-02T09:24:42-07:00\",\n            \"created_by_user_id\": 3156422,\n            \"updated_by_user_id\": 3646297,\n            \"timezone\": \"America/Chicago\",\n            \"twitter_user_id\": null,\n            \"layout_theme_id\": 53,\n            \"secure_subdomain\": \"apidemo\",\n            \"address_id\": 4447713,\n            \"membership_privacy\": \"open\",\n            \"membership_grace_period\": 1,\n            \"boss_billing_account_id\": null,\n            \"boss_organization_id\": 27743\n        }\n    ],\n    \"leagues\": [\n        {\n            \"id\": 27737,\n            \"name\": \"Eastern League\",\n            \"current_subseason_id\": 291621,\n            \"site_id\": 11953,\n            \"sport_id\": 1,\n            \"image_id\": null,\n            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n            \"updated_at\": \"2016-05-02T13:29:58-07:00\",\n            \"button_title\": \"Eastern\",\n            \"primary_color\": \"00AEEF\",\n            \"secondary_color\": \"666666\",\n            \"gender\": \"male\",\n            \"abbrev\": \"East\",\n            \"score_ribbon\": false,\n            \"tweet_games\": null,\n            \"game_sheet_label\": \"gamesheet\"\n        }\n    ],\n    \"thumbnails\": {},\n    \"thumbnails_ssl\": {},\n    \"current_subseason_ids\": [\n        291621\n    ],\n    \"seasons\": [\n        {\n            \"id\": 267440,\n...\n    ],\n    \"subseason_team_instance_mapping\": [\n        {\n            \"subseason_id\": 291621,\n            \"team_instance_id\": 1876243\n        },\n        {\n            \"subseason_id\": 302608,\n            \"team_instance_id\": 1979872\n        }\n    ],\n    \"league_name\": \"Eastern League\",\n    \"site_name\": \"Sport Ngin API Demo Site\",\n    \"sport_name\": \"Ice Hockey\"\n}","language":"json","status":200}]},"settings":"","url":"/teams/:id"},"body":"","slug":"teams-update","user":"56548c568975c70d002ea4b4","__v":0,"editedParams2":true,"link_external":false,"excerpt":"The Update method updates the provided fields for a given `id`.\n\n###Parameters","hidden":false,"parentDoc":null,"sync_unique":"","title":"Teams Update","category":"56e03709f97d422900d63922","createdAt":"2016-07-07T17:20:05.025Z","editedParams":true,"type":"put","updates":[],"version":"56cca51eca43550b002813fa","childrenPages":[]}

putTeams Update

The Update method updates the provided fields for a given id.

Parameters


Path Params

id:
required
integer

Id of team to update

Definition

https://api.sportngin.com/teams/:id

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 '{
    "team":
    {
        "abbrev": "BBB" 
    }
}' "https://api.sportngin.com/teams/1373611"

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"
}


{"_id":"56d8802947b99513001f77b4","parentDoc":null,"project":"5641217e0ee5370d00da636d","api":{"url":"/team_instances","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/team_instances?subseason_id=291621\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"get","params":[{"_id":"56d882d2b159f10b003045fc","ref":"","in":"query","required":false,"desc":"Id of Subseason","default":"","type":"int","name":"subseason_id"},{"_id":"56d882d2b159f10b003045fb","ref":"","in":"query","required":false,"desc":"Id of LeagueInstance","default":"","type":"int","name":"league_instance_id"}],"results":{"codes":[{"name":"","code":"[\n    {\n        \"id\": 1876243,\n        \"created_at\": \"2016-03-22T13:19:12-07:00\",\n        \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n        \"team_id\": 1373611,\n        \"affects_standings\": true,\n        \"name\": \"Boston Bears\",\n        \"roster_id\": 1837158,\n        \"opponent\": null,\n        \"parent_team_instance_id\": null,\n        \"image_id\": null,\n        \"abbrev\": \"Bos\",\n        \"primary_color\": \"000000\",\n        \"secondary_color\": \"000000\",\n        \"button_title\": \"Boston\",\n        \"gender\": \"male\",\n        \"management_team_id\": null,\n        \"team\": {\n            \"id\": 1373611,\n            \"name\": \"Boston Bears\",\n            \"button_title\": \"Boston\",\n            \"abbrev\": \"Bos\",\n            \"image_id\": null,\n            \"primary_color\": \"000000\",\n            \"secondary_color\": \"000000\",\n            \"gender\": \"male\",\n            \"created_at\": \"2016-03-22T13:06:41-07:00\",\n            \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n            \"sport_id\": 1,\n            \"opponent\": null,\n            \"parent_team_id\": null,\n            \"ios_whitelabel_url\": null,\n            \"android_whitelabel_url\": null,\n            \"sites\": [\n                {\n                    \"id\": 11953,\n                    \"domain_id\": 1149,\n                    \"domain_name\": \"sportngin.com\",\n                    \"subdomain\": \"apidemo\",\n                    \"product_id\": 14,\n                    \"name\": \"Sport Ngin API Demo Site\",\n                    \"short_name\": \"Sport Ngin API Demo Site\",\n                    \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                    \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n                    \"created_by_user_id\": 3156422,\n                    \"updated_by_user_id\": null,\n                    \"timezone\": \"US/Central\",\n                    \"twitter_user_id\": null,\n                    \"layout_theme_id\": 51,\n                    \"secure_subdomain\": \"apidemo\",\n                    \"address_id\": 4447713,\n                    \"membership_privacy\": \"open\",\n                    \"membership_grace_period\": 1,\n                    \"boss_billing_account_id\": null,\n                    \"boss_organization_id\": 27743\n                }\n            ],\n            \"leagues\": [\n                {\n                    \"id\": 27737,\n                    \"name\": \"Eastern League\",\n                    \"current_subseason_id\": 291621,\n                    \"site_id\": 11953,\n                    \"sport_id\": 1,\n                    \"image_id\": null,\n                    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                    \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n                    \"button_title\": \"Eastern\",\n                    \"primary_color\": \"00AEEF\",\n                    \"secondary_color\": \"666666\",\n                    \"gender\": \"male\",\n                    \"abbrev\": \"East\",\n                    \"score_ribbon\": false,\n                    \"tweet_games\": null,\n                    \"game_sheet_label\": \"gamesheet\"\n                }\n            ],\n            \"thumbnails\": {},\n            \"thumbnails_ssl\": {},\n            \"current_subseason_ids\": [\n                291621\n            ],\n            \"seasons\": [\n                {\n                    \"id\": 267440,\n                    \"name\": \"2016\",\n                    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                    \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                    \"solo_team_league_id\": null,\n                    \"has_metadata\": null,\n                    \"show_shared_schedule\": false,\n                    \"stat_preference\": {\n                        \"id\": 292407,\n                        \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                        \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                        \"game_defaults\": {\n                            \"auto_navigate_to_play_details\": true,\n                            \"field_of_play_enabled\": false,\n                            \"game_misconduct_time\": 0,\n                            \"ice_hockey_goalie_order_by\": null,\n                            \"ice_hockey_goalie_order_by_secondary\": null,\n                            \"ice_hockey_goalie_order_dir\": null,\n                            \"ice_hockey_goalie_order_dir_secondary\": null,\n                            \"ice_hockey_goalie_stat_qualify_by\": null,\n                            \"ice_hockey_goalie_stat_qualify_val\": null,\n                            \"ice_hockey_skater_order_by\": null,\n                            \"ice_hockey_skater_order_by_secondary\": null,\n                            \"ice_hockey_skater_order_dir\": null,\n                            \"ice_hockey_skater_order_dir_secondary\": null,\n                            \"ice_hockey_skater_stat_qualify_by\": null,\n                            \"ice_hockey_skater_stat_qualify_val\": null,\n                            \"ice_hockey_team_scoring_order_by\": \"pts\",\n                            \"ice_hockey_team_scoring_order_by_secondary\": null,\n                            \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                            \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                            \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                            \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                            \"ice_hockey_team_stats_order_by\": null,\n                            \"ice_hockey_team_stats_order_by_secondary\": null,\n                            \"ice_hockey_team_stats_order_dir\": null,\n                            \"ice_hockey_team_stats_order_dir_secondary\": null,\n                            \"ice_hockey_team_stats_stat_qualify_by\": null,\n                            \"ice_hockey_team_stats_stat_qualify_val\": null,\n                            \"intermission_length\": 1,\n                            \"major_adjustment_time\": 0,\n                            \"major_penalty_time\": 5,\n                            \"match_penalty_time\": 5,\n                            \"max_goal_differential\": 0,\n                            \"max_player_major_penalties\": 2,\n                            \"max_player_penalties\": 5,\n                            \"max_team_penalties\": 15,\n                            \"minor_adjustment_time\": 0,\n                            \"minor_penalty_time\": 2,\n                            \"misconduct_time\": 10,\n                            \"overtime_intervals\": 2,\n                            \"overtime_length\": \"5\",\n                            \"post_live_updates\": true,\n                            \"regulation_time_intervals\": null,\n                            \"shootout_enabled\": false,\n                            \"stop_run_time\": true,\n                            \"time_interval_name\": \"period\",\n                            \"time_intervals\": [\n                                \"20\",\n                                \"20\",\n                                \"20\"\n                            ],\n                            \"timeout_time\": 1,\n                            \"timeouts\": 1,\n                            \"track_goal_types\": true,\n                            \"track_player_sog\": true,\n                            \"warmup_length\": 5\n                        },\n                        \"season_id\": 267440,\n                        \"original_scorer_can_edit\": null,\n                        \"force_real_time_scoring\": false,\n                        \"stat_tool_id\": 1848623,\n                        \"stats_can_be_unlinked\": null,\n                        \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                        \"can_edit_final\": \"league_owner\",\n                        \"traded_player_stats\": null,\n                        \"game_sheet_auto_summary_enabled\": true,\n                        \"visible_stats\": \"league_xor_division\"\n                    },\n                    \"subseasons\": [\n                        {\n                            \"id\": 291621,\n                            \"name\": \"Regular Season\",\n                            \"season_id\": 267440,\n                            \"position\": 1,\n                            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"updated_at\": \"2016-04-15T11:02:33-07:00\",\n                            \"snl_scoring_enabled\": true,\n                            \"statistic_grouping_id\": 417884,\n                            \"workers_completed\": null,\n                            \"standing_preference\": {\n                                \"id\": 110425,\n                                \"standing_tool_id\": 1848627,\n                                \"standing_type_id\": 5,\n                                \"standings_aggregation_level\": \"league\",\n                                \"qualifiers\": null,\n                                \"qualifier_limit\": null,\n                                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                                \"winning_team_custom_points\": null,\n                                \"losing_team_custom_points\": null,\n                                \"tied_team_custom_points\": null,\n                                \"label_mapping\": {},\n                                \"extended_fields\": [\n                                    \"win_count\",\n                                    \"loss_count\",\n                                    \"tie_count\",\n                                    \"points\"\n                                ],\n                                \"order_rule\": 1,\n                                \"overtime_win_custom_points\": null,\n                                \"overtime_loss_custom_points\": null,\n                                \"overtime_wins_include_in_wins\": true,\n                                \"overtime_losses_include_in_losses\": true,\n                                \"legacy_custom_points\": false\n                            },\n                            \"live_scoring_stat_configuration\": {\n                                \"show_plus_minus\": null,\n                                \"fair_play_points\": false\n                            }\n                        }\n                    ]\n                }\n            ],\n            \"subseason_team_instance_mapping\": [\n                {\n                    \"subseason_id\": 291621,\n                    \"team_instance_id\": 1876243\n                }\n            ],\n            \"league_name\": \"Eastern League\",\n            \"site_name\": \"Sport Ngin API Demo Site\",\n            \"sport_name\": \"Ice Hockey\"\n        },\n        \"thumbnails\": {},\n        \"subseason_ids\": [\n            291621\n        ]\n    },\n    \n...\n]","language":"json","status":200}]},"settings":""},"githubsync":"","hidden":false,"link_external":false,"link_url":"","__v":4,"sync_unique":"","title":"Team Instances Index","version":"56cca51eca43550b002813fa","body":"###Attributes \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"created_at\",\n    \"2-0\": \"updated_at\",\n    \"3-0\": \"team_id\",\n    \"4-0\": \"affects_standings\",\n    \"5-0\": \"name\",\n    \"6-0\": \"roster_id\",\n    \"7-0\": \"opponent\",\n    \"8-0\": \"parent_team_instance_id\",\n    \"9-0\": \"image_id\",\n    \"10-0\": \"abbrev\",\n    \"13-0\": \"button_title\",\n    \"14-0\": \"gender\",\n    \"11-0\": \"primary_color\",\n    \"12-0\": \"secondary_color\",\n    \"15-0\": \"team\",\n    \"16-0\": \"thumbnails\",\n    \"17-0\": \"subseason_ids\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Id of TeamInstance\",\n    \"1-1\": \"Timestamp\",\n    \"2-2\": \"Timestamp of last update\",\n    \"1-2\": \"Timestamp when created\",\n    \"2-1\": \"Timestamp\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"Id of team\",\n    \"4-1\": \"Boolean\",\n    \"5-1\": \"String\",\n    \"5-2\": \"Name of team\",\n    \"6-1\": \"Integer\",\n    \"6-2\": \"Id of roster that belongs to this TeamInstance\",\n    \"7-1\": \"Boolean\",\n    \"8-1\": \"Integer\",\n    \"9-1\": \"Integer\",\n    \"10-1\": \"String\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"String\",\n    \"14-1\": \"String\",\n    \"15-1\": \"Object\",\n    \"16-1\": \"Object\",\n    \"17-1\": \"Array\",\n    \"4-2\": \"Determines if this TeamInstance affects standings for the league\",\n    \"7-2\": \"Determines if this TeamInstance is an opponent for a SoloTeamLeague\",\n    \"8-2\": \"If opponent is true, this is the id of the TeamInstance that this TeamInstance is an opponent of\",\n    \"9-2\": \"Id of Image\",\n    \"10-2\": \"Abbreviation of this TeamInstance\",\n    \"11-2\": \"Primary color used in styling of team pages\",\n    \"12-2\": \"Secondary color used in styling of team pages\",\n    \"13-2\": \"Abbreviation of team. Used in various locations that have limited text.\",\n    \"14-2\": \"Gender of team (male, female, co-ed)\",\n    \"17-2\": \"Ids of Subseasons that this TeamInstance belongs to\",\n    \"16-2\": \"Object with relative links to large, medium, and small thumbnails (derived)\",\n    \"15-2\": \"Object representing the team irrespective of season or subseason\"\n  },\n  \"cols\": 3,\n  \"rows\": 18\n}\n[/block]","editedParams":true,"slug":"team-instances-index","updates":[],"user":"569e96c56b4a2c0d007e9153","type":"get","category":"56e03709f97d422900d63922","createdAt":"2016-03-03T18:19:21.971Z","editedParams2":true,"excerpt":"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`.\n\nA list of team instances belonging to the provided [League](https://sportnginv2.readme.io/docs/leagues) or [Subseason](https://sportnginv2.readme.io/docs/subseasons-show) is returned.  An error is thrown if any of the parameters are invalid.\n\n###Parameters","isReference":true,"order":15,"next":{"description":"","pages":[]},"childrenPages":[]}

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

subseason_id:
integer

Id of Subseason

league_instance_id:
integer

Id of LeagueInstance

Attributes

Name
Type
Description

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

https://api.sportngin.com/team_instances

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/team_instances?subseason_id=291621"

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
        ]
    },
    
...
]


{"_id":"56f1bf659c88d00e00d9e495","api":{"params":[{"name":"id","in":"path","_id":"57114eae5ba0d80e00f51614","ref":"","required":true,"desc":"Id belonging to the team_instance of interest","default":"","type":"int"}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 1876243,\n    \"created_at\": \"2016-03-22T13:19:12-07:00\",\n    \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n    \"team_id\": 1373611,\n    \"affects_standings\": true,\n    \"name\": \"Boston Bears\",\n    \"roster_id\": 1837158,\n    \"opponent\": null,\n    \"parent_team_instance_id\": null,\n    \"image_id\": null,\n    \"abbrev\": \"Bos\",\n    \"primary_color\": \"000000\",\n    \"secondary_color\": \"000000\",\n    \"button_title\": \"Boston\",\n    \"gender\": \"male\",\n    \"management_team_id\": null,\n    \"team\": {\n        \"id\": 1373611,\n        \"name\": \"Boston Bears\",\n        \"button_title\": \"Boston\",\n        \"abbrev\": \"Bos\",\n        \"image_id\": null,\n        \"primary_color\": \"000000\",\n        \"secondary_color\": \"000000\",\n        \"gender\": \"male\",\n        \"created_at\": \"2016-03-22T13:06:41-07:00\",\n        \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n        \"sport_id\": 1,\n        \"opponent\": null,\n        \"parent_team_id\": null,\n        \"ios_whitelabel_url\": null,\n        \"android_whitelabel_url\": null,\n        \"sites\": [\n            {\n                \"id\": 11953,\n                \"domain_id\": 1149,\n                \"domain_name\": \"sportngin.com\",\n                \"subdomain\": \"apidemo\",\n                \"product_id\": 14,\n                \"name\": \"Sport Ngin API Demo Site\",\n                \"short_name\": \"Sport Ngin API Demo Site\",\n                \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n                \"created_by_user_id\": 3156422,\n                \"updated_by_user_id\": null,\n                \"timezone\": \"US/Central\",\n                \"twitter_user_id\": null,\n                \"layout_theme_id\": 51,\n                \"secure_subdomain\": \"apidemo\",\n                \"address_id\": 4447713,\n                \"membership_privacy\": \"open\",\n                \"membership_grace_period\": 1,\n                \"boss_billing_account_id\": null,\n                \"boss_organization_id\": 27743\n            }\n        ],\n        \"leagues\": [\n            {\n                \"id\": 27737,\n                \"name\": \"Eastern League\",\n                \"current_subseason_id\": 291621,\n                \"site_id\": 11953,\n                \"sport_id\": 1,\n                \"image_id\": null,\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n                \"button_title\": \"Eastern\",\n                \"primary_color\": \"00AEEF\",\n                \"secondary_color\": \"666666\",\n                \"gender\": \"male\",\n                \"abbrev\": \"East\",\n                \"score_ribbon\": false,\n                \"tweet_games\": null,\n                \"game_sheet_label\": \"gamesheet\"\n            }\n        ],\n        \"thumbnails\": {},\n        \"thumbnails_ssl\": {},\n        \"current_subseason_ids\": [\n            291621\n        ],\n        \"seasons\": [\n            {\n                \"id\": 267440,\n                \"name\": \"2016\",\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                \"solo_team_league_id\": null,\n                \"has_metadata\": null,\n                \"show_shared_schedule\": false,\n                \"stat_preference\": {\n                    \"id\": 292407,\n                    \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"game_defaults\": {\n                        \"auto_navigate_to_play_details\": true,\n                        \"field_of_play_enabled\": false,\n                        \"game_misconduct_time\": 0,\n                        \"ice_hockey_goalie_order_by\": null,\n                        \"ice_hockey_goalie_order_by_secondary\": null,\n                        \"ice_hockey_goalie_order_dir\": null,\n                        \"ice_hockey_goalie_order_dir_secondary\": null,\n                        \"ice_hockey_goalie_stat_qualify_by\": null,\n                        \"ice_hockey_goalie_stat_qualify_val\": null,\n                        \"ice_hockey_skater_order_by\": null,\n                        \"ice_hockey_skater_order_by_secondary\": null,\n                        \"ice_hockey_skater_order_dir\": null,\n                        \"ice_hockey_skater_order_dir_secondary\": null,\n                        \"ice_hockey_skater_stat_qualify_by\": null,\n                        \"ice_hockey_skater_stat_qualify_val\": null,\n                        \"ice_hockey_team_scoring_order_by\": \"pts\",\n                        \"ice_hockey_team_scoring_order_by_secondary\": null,\n                        \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                        \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                        \"ice_hockey_team_stats_order_by\": null,\n                        \"ice_hockey_team_stats_order_by_secondary\": null,\n                        \"ice_hockey_team_stats_order_dir\": null,\n                        \"ice_hockey_team_stats_order_dir_secondary\": null,\n                        \"ice_hockey_team_stats_stat_qualify_by\": null,\n                        \"ice_hockey_team_stats_stat_qualify_val\": null,\n                        \"intermission_length\": 1,\n                        \"major_adjustment_time\": 0,\n                        \"major_penalty_time\": 5,\n                        \"match_penalty_time\": 5,\n                        \"max_goal_differential\": 0,\n                        \"max_player_major_penalties\": 2,\n                        \"max_player_penalties\": 5,\n                        \"max_team_penalties\": 15,\n                        \"minor_adjustment_time\": 0,\n                        \"minor_penalty_time\": 2,\n                        \"misconduct_time\": 10,\n                        \"overtime_intervals\": 2,\n                        \"overtime_length\": \"5\",\n                        \"post_live_updates\": true,\n                        \"regulation_time_intervals\": null,\n                        \"shootout_enabled\": false,\n                        \"stop_run_time\": true,\n                        \"time_interval_name\": \"period\",\n                        \"time_intervals\": [\n                            \"20\",\n                            \"20\",\n                            \"20\"\n                        ],\n                        \"timeout_time\": 1,\n                        \"timeouts\": 1,\n                        \"track_goal_types\": true,\n                        \"track_player_sog\": true,\n                        \"warmup_length\": 5\n                    },\n                    \"season_id\": 267440,\n                    \"original_scorer_can_edit\": null,\n                    \"force_real_time_scoring\": false,\n                    \"stat_tool_id\": 1848623,\n                    \"stats_can_be_unlinked\": null,\n                    \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                    \"can_edit_final\": \"league_owner\",\n                    \"traded_player_stats\": null,\n                    \"game_sheet_auto_summary_enabled\": true,\n                    \"visible_stats\": \"league_xor_division\"\n                },\n                \"subseasons\": [\n                    {\n                        \"id\": 291621,\n                        \"name\": \"Regular Season\",\n                        \"season_id\": 267440,\n                        \"position\": 1,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-04-15T11:02:33-07:00\",\n                        \"snl_scoring_enabled\": true,\n                        \"statistic_grouping_id\": 417884,\n                        \"workers_completed\": null,\n                        \"standing_preference\": {\n                            \"id\": 110425,\n                            \"standing_tool_id\": 1848627,\n                            \"standing_type_id\": 5,\n                            \"standings_aggregation_level\": \"league\",\n                            \"qualifiers\": null,\n                            \"qualifier_limit\": null,\n                            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"winning_team_custom_points\": null,\n                            \"losing_team_custom_points\": null,\n                            \"tied_team_custom_points\": null,\n                            \"label_mapping\": {},\n                            \"extended_fields\": [\n                                \"win_count\",\n                                \"loss_count\",\n                                \"tie_count\",\n                                \"points\"\n                            ],\n                            \"order_rule\": 1,\n                            \"overtime_win_custom_points\": null,\n                            \"overtime_loss_custom_points\": null,\n                            \"overtime_wins_include_in_wins\": true,\n                            \"overtime_losses_include_in_losses\": true,\n                            \"legacy_custom_points\": false\n                        },\n                        \"live_scoring_stat_configuration\": {\n                            \"show_plus_minus\": null,\n                            \"fair_play_points\": false\n                        }\n                    }\n                ]\n            }\n        ],\n        \"subseason_team_instance_mapping\": [\n            {\n                \"subseason_id\": 291621,\n                \"team_instance_id\": 1876243\n            }\n        ],\n        \"league_name\": \"Eastern League\",\n        \"site_name\": \"Sport Ngin API Demo Site\",\n        \"sport_name\": \"Ice Hockey\"\n    },\n    \"thumbnails\": {},\n    \"subseason_ids\": [\n        291621\n    ]\n}","name":"","status":200}]},"settings":"","url":"/team_instances/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/team_instances/1876243\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances/1876243\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances/1876243\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"order":16,"parentDoc":null,"project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","hidden":false,"version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attributes\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"2-0\": \"buttom_title\",\n    \"2-1\": \"String\",\n    \"3-0\": \"abbrev\",\n    \"3-1\": \"String\",\n    \"4-0\": \"image_id\",\n    \"4-1\": \"Integer\",\n    \"5-0\": \"primary_color\",\n    \"5-1\": \"String\",\n    \"6-0\": \"secondary_color\",\n    \"6-1\": \"String\",\n    \"7-0\": \"thumbnails\",\n    \"7-1\": \"Array of Strings\",\n    \"7-2\": \"derived field. thumbnails of the team logo\",\n    \"8-0\": \"created_at\",\n    \"8-1\": \"Datetime\",\n    \"9-0\": \"Uploaded_at\",\n    \"9-1\": \"Datetime\",\n    \"10-0\": \"thumbnails\",\n    \"10-1\": \"Hash\",\n    \"10-2\": \"A hash of the thumbnail urls. Keys: small, medium, and large\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-2\": \"Name of the team\",\n    \"2-2\": \"Version of team name that displays on buttons and links\",\n    \"3-2\": \"Abbreviation of the team name\",\n    \"4-2\": \"ID of the team image\",\n    \"5-2\": \"Hex code of the team's primary color\",\n    \"6-2\": \"Hex code of the team's secondary color\",\n    \"8-2\": \"Timestamp of creation date\",\n    \"9-2\": \"Timestamp of last update\",\n    \"11-0\": \"roster_id\",\n    \"11-1\": \"Integer\",\n    \"11-2\": \"id of the roster assigned by NGIN\",\n    \"12-0\": \"team_id\",\n    \"12-1\": \"Integer\",\n    \"12-2\": \"id of the team assigned by NGIN\",\n    \"13-0\": \"affects_standings\",\n    \"13-1\": \"Boolean\",\n    \"13-2\": \"Determines if this teams games affect overall league/division standings\",\n    \"14-0\": \"team\",\n    \"14-1\": \"Hash\",\n    \"14-2\": \"team data\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]","createdAt":"2016-03-22T21:55:49.983Z","editedParams":true,"excerpt":"The Show method returns a single Team Instance for a given `id`.\n\n###Parameters","type":"get","__v":8,"category":"56e03709f97d422900d63922","githubsync":"","link_url":"","slug":"team-instances-show","updates":[],"editedParams2":true,"isReference":true,"link_external":false,"sync_unique":"","title":"Team Instances Show","childrenPages":[]}

getTeam Instances Show

The Show method returns a single Team Instance for a given id.

Parameters


Path Params

id:
required
integer

Id belonging to the team_instance of interest

Attributes

Attributes
Type
Notes

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

https://api.sportngin.com/team_instances/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/team_instances/1876243"

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
    ]
}


{"_id":"56e0470f4685db1700d947ca","link_external":false,"title":"Team Instances Create","githubsync":"","hidden":false,"isReference":true,"slug":"team-instances-create","version":"56cca51eca43550b002813fa","__v":10,"api":{"examples":{"codes":[{"name":"cURL - New Team","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"parent_node_id\": 2458074,\n    \"existing_or_new\": \"new\",\n    \"top_new_team_template_id\": 23220,\n    \"bottom_new_team_template_id\": 23221,\n    \"team\":\n        {\n        \"name\": \"API TEST TEAM\",\n        \"button_title\": \"API TEAM\",\n        \"abbrev\": \"ATT\",\n        \"primary_color\": \"FFFFFF\",\n        \"secondary_color\": \"AAAAAA\"\n        }\n}\n    ' \"https://api.sportngin.com/team_instances?subseason_id=291621\"","language":"curl"},{"name":"Ruby - New Team","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"existing_or_new\\\": \\\"new\\\",\\n    \\\"team\\\":\\n        {\\n        \\\"name\\\": \\\"API TEST TEAM\\\",\\n        \\\"button_title\\\": \\\"API TEAM\\\",\\n        \\\"abbrev\\\": \\\"ATT\\\",\\n        \\\"primary_color\\\": \\\"FFFFFF\\\",\\n        \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n        }\\n}\\n    \"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"name":"Java - New Team","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"existing_or_new\\\": \\\"new\\\",\\n    \\\"team\\\":\\n        {\\n        \\\"name\\\": \\\"API TEST TEAM\\\",\\n        \\\"button_title\\\": \\\"API TEAM\\\",\\n        \\\"abbrev\\\": \\\"ATT\\\",\\n        \\\"primary_color\\\": \\\"FFFFFF\\\",\\n        \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n        }\\n}\\n    \");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"},{"name":"cURL - Existing Team","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    {\n    \"parent_node_id\": 2458074,\n    \"top_existing_team_template_id\": 23220,\n    \"bottom_existing_team_template_id\": 23220,\n    \"node\":\n    {\n    \"team_id\": 1373611\n    }\n}\n    ' \"https://api.sportngin.com/team_instances?subseason_id=291621\"","language":"curl"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"top_existing_team_template_id\\\": 23220,\\n    \\\"bottom_existing_team_template_id\\\": 23221,\\n    \\\"node\\\":\\n        {\\n        \\\"team_id\\\": 1373611,\\n}\\n}\\n    \"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby","name":"Ruby - Existing Team"},{"name":"Java - Existing Team","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"top_existing_team_template_id\\\": 23220,\\n    \\\"bottom_existing_team_template_id\\\": 23221,\\n    \\\"node\\\":\\n        {\\n        \\\"team_id\\\": 1373611,\\n}\\n}\\n    \");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances?subseason_id=291621\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[{"in":"path","required":true,"desc":"","default":"","type":"int","name":"subseason_id","_id":"57eeac5ecc36920e00bff4b9","ref":""},{"desc":"","default":"","type":"int","name":"league_instance_id","_id":"57eeac5ecc36920e00bff4b8","ref":"","in":"path","required":true},{"_id":"58867c1d9321a50f00f3eb13","default":"","desc":"ID of the node beneath which the team will be placed","in":"body","name":"parent_node_id","ref":"","required":true,"type":"int"},{"name":"existing_or_new","_id":"58867c1d9321a50f00f3eb12","ref":"","in":"body","required":true,"desc":"Denotes whether the new Team Instance will be created under a new or existing Team","default":"existing","type":"string"},{"type":"int","name":"top_new_team_template_id","_id":"58867c1d9321a50f00f3eb11","ref":"","in":"body","required":false,"desc":"Top template for team page if new team","default":""},{"desc":"Top template for team page if existing team","default":"","type":"int","name":"top_existing_team_template_id","_id":"58867c1d9321a50f00f3eb10","ref":"","in":"body","required":false},{"_id":"58867c1d9321a50f00f3eb0f","ref":"","in":"body","required":false,"desc":"Bottom template for team page if new team","default":"","type":"int","name":"bottom_new_team_template_id"},{"_id":"58867c1d9321a50f00f3eb0e","ref":"","in":"body","required":false,"desc":"Bottom template for team page if existing team","default":"","type":"int","name":"bottom_existing_team_template_id"},{"_id":"58867c1d9321a50f00f3eb0d","ref":"","in":"body","required":false,"desc":"ID of Team of which to create new instance of","default":"","type":"int","name":"node[team_id]"},{"_id":"58867c1d9321a50f00f3eb0c","ref":"","in":"body","required":false,"desc":"Name of team if team does not already exist","default":"","type":"string","name":"team[name]"},{"_id":"58867c1d9321a50f00f3eb0b","ref":"","in":"body","required":false,"desc":"Button title of team if team does not already exist","default":"","type":"string","name":"team[button_title]"},{"name":"team[abbrev]","_id":"58867c1d9321a50f00f3eb0a","ref":"","in":"body","required":false,"desc":"Abbreviation of team name if team does not already exist","default":"","type":"string"},{"ref":"","in":"body","required":false,"desc":"Team primary color if team does not already exist","default":"","type":"string","name":"team[primary_color]","_id":"58867c1d9321a50f00f3eb09"},{"default":"","type":"string","name":"team[secondary_color]","_id":"58867c1d9321a50f00f3eb08","ref":"","in":"body","required":false,"desc":"Team secondary color if team does not already exist"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n    \"id\": 1930618,\n    \"created_at\": \"2016-04-22T09:00:25-07:00\",\n    \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n    \"team_id\": 1413546,\n    \"affects_standings\": true,\n    \"name\": \"API TEST TEAM\",\n    \"roster_id\": 1892176,\n    \"opponent\": null,\n    \"parent_team_instance_id\": null,\n    \"image_id\": null,\n    \"abbrev\": \"ATT\",\n    \"primary_color\": \"FFFFFF\",\n    \"secondary_color\": \"AAAAAA\",\n    \"button_title\": \"API TEAM\",\n    \"gender\": \"male\",\n    \"management_team_id\": null,\n    \"team\": {\n        \"id\": 1413546,\n        \"name\": \"API TEST TEAM\",\n        \"button_title\": \"API TEAM\",\n        \"abbrev\": \"ATT\",\n        \"image_id\": null,\n        \"primary_color\": \"FFFFFF\",\n        \"secondary_color\": \"AAAAAA\",\n        \"gender\": null,\n        \"created_at\": \"2016-04-22T09:00:25-07:00\",\n        \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n        \"sport_id\": 1,\n        \"opponent\": null,\n        \"parent_team_id\": null,\n        \"ios_whitelabel_url\": null,\n        \"android_whitelabel_url\": null,\n        \"sites\": [\n            {\n                \"id\": 11953,\n                \"domain_id\": 1149,\n                \"domain_name\": \"sportngin.com\",\n                \"subdomain\": \"apidemo\",\n                \"product_id\": 14,\n                \"name\": \"Sport Ngin API Demo Site\",\n                \"short_name\": \"Sport Ngin API Demo Site\",\n                \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n                \"created_by_user_id\": 3156422,\n                \"updated_by_user_id\": null,\n                \"timezone\": \"US/Central\",\n                \"twitter_user_id\": null,\n                \"layout_theme_id\": 51,\n                \"secure_subdomain\": \"apidemo\",\n                \"address_id\": 4447713,\n                \"membership_privacy\": \"open\",\n                \"membership_grace_period\": 1,\n                \"boss_billing_account_id\": null,\n                \"boss_organization_id\": 27743\n            }\n        ],\n        \"leagues\": [\n            {\n                \"id\": 27737,\n                \"name\": \"Eastern League\",\n                \"current_subseason_id\": 291621,\n                \"site_id\": 11953,\n                \"sport_id\": 1,\n                \"image_id\": null,\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n                \"button_title\": \"Eastern\",\n                \"primary_color\": \"00AEEF\",\n                \"secondary_color\": \"666666\",\n                \"gender\": \"male\",\n                \"abbrev\": \"East\",\n                \"score_ribbon\": false,\n                \"tweet_games\": null,\n                \"game_sheet_label\": \"gamesheet\"\n            }\n        ],\n        \"thumbnails\": {},\n        \"thumbnails_ssl\": {},\n        \"current_subseason_ids\": [\n            291621\n        ],\n        \"seasons\": [\n            {\n                \"id\": 267440,\n                \"name\": \"2016\",\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                \"solo_team_league_id\": null,\n                \"has_metadata\": null,\n                \"show_shared_schedule\": false,\n                \"stat_preference\": {\n                    \"id\": 292407,\n                    \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"game_defaults\": {\n                        \"auto_navigate_to_play_details\": true,\n                        \"field_of_play_enabled\": false,\n                        \"game_misconduct_time\": 0,\n                        \"ice_hockey_goalie_order_by\": null,\n                        \"ice_hockey_goalie_order_by_secondary\": null,\n                        \"ice_hockey_goalie_order_dir\": null,\n                        \"ice_hockey_goalie_order_dir_secondary\": null,\n                        \"ice_hockey_goalie_stat_qualify_by\": null,\n                        \"ice_hockey_goalie_stat_qualify_val\": null,\n                        \"ice_hockey_skater_order_by\": null,\n                        \"ice_hockey_skater_order_by_secondary\": null,\n                        \"ice_hockey_skater_order_dir\": null,\n                        \"ice_hockey_skater_order_dir_secondary\": null,\n                        \"ice_hockey_skater_stat_qualify_by\": null,\n                        \"ice_hockey_skater_stat_qualify_val\": null,\n                        \"ice_hockey_team_scoring_order_by\": \"pts\",\n                        \"ice_hockey_team_scoring_order_by_secondary\": null,\n                        \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                        \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                        \"ice_hockey_team_stats_order_by\": null,\n                        \"ice_hockey_team_stats_order_by_secondary\": null,\n                        \"ice_hockey_team_stats_order_dir\": null,\n                        \"ice_hockey_team_stats_order_dir_secondary\": null,\n                        \"ice_hockey_team_stats_stat_qualify_by\": null,\n                        \"ice_hockey_team_stats_stat_qualify_val\": null,\n                        \"intermission_length\": 1,\n                        \"major_adjustment_time\": 0,\n                        \"major_penalty_time\": 5,\n                        \"match_penalty_time\": 5,\n                        \"max_goal_differential\": 0,\n                        \"max_player_major_penalties\": 2,\n                        \"max_player_penalties\": 5,\n                        \"max_team_penalties\": 15,\n                        \"minor_adjustment_time\": 0,\n                        \"minor_penalty_time\": 2,\n                        \"misconduct_time\": 10,\n                        \"overtime_intervals\": 2,\n                        \"overtime_length\": \"5\",\n                        \"post_live_updates\": true,\n                        \"regulation_time_intervals\": null,\n                        \"shootout_enabled\": false,\n                        \"stop_run_time\": true,\n                        \"time_interval_name\": \"period\",\n                        \"time_intervals\": [\n                            \"20\",\n                            \"20\",\n                            \"20\"\n                        ],\n                        \"timeout_time\": 1,\n                        \"timeouts\": 1,\n                        \"track_goal_types\": true,\n                        \"track_player_sog\": true,\n                        \"warmup_length\": 5\n                    },\n                    \"season_id\": 267440,\n                    \"original_scorer_can_edit\": null,\n                    \"force_real_time_scoring\": false,\n                    \"stat_tool_id\": 1848623,\n                    \"stats_can_be_unlinked\": null,\n                    \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                    \"can_edit_final\": \"league_owner\",\n                    \"traded_player_stats\": null,\n                    \"game_sheet_auto_summary_enabled\": true,\n                    \"visible_stats\": \"league_xor_division\"\n                },\n                \"subseasons\": [\n                    {\n                        \"id\": 291621,\n                        \"name\": \"Regular Season\",\n                        \"season_id\": 267440,\n                        \"position\": 1,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-04-20T11:53:00-07:00\",\n                        \"snl_scoring_enabled\": true,\n                        \"statistic_grouping_id\": 417884,\n                        \"workers_completed\": null,\n                        \"standing_preference\": {\n                            \"id\": 110425,\n                            \"standing_tool_id\": 1848627,\n                            \"standing_type_id\": 5,\n                            \"standings_aggregation_level\": \"league\",\n                            \"qualifiers\": null,\n                            \"qualifier_limit\": null,\n                            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"winning_team_custom_points\": null,\n                            \"losing_team_custom_points\": null,\n                            \"tied_team_custom_points\": null,\n                            \"label_mapping\": {},\n                            \"extended_fields\": [\n                                \"win_count\",\n                                \"loss_count\",\n                                \"tie_count\",\n                                \"points\"\n                            ],\n                            \"order_rule\": 1,\n                            \"overtime_win_custom_points\": null,\n                            \"overtime_loss_custom_points\": null,\n                            \"overtime_wins_include_in_wins\": true,\n                            \"overtime_losses_include_in_losses\": true,\n                            \"legacy_custom_points\": false\n                        },\n                        \"live_scoring_stat_configuration\": {\n                            \"show_plus_minus\": null,\n                            \"fair_play_points\": false\n                        }\n                    }\n                ]\n            }\n        ],\n        \"subseason_team_instance_mapping\": [\n            {\n                \"subseason_id\": 291621,\n                \"team_instance_id\": 1930618\n            }\n        ],\n        \"league_name\": \"Eastern League\",\n        \"site_name\": \"Sport Ngin API Demo Site\",\n        \"sport_name\": \"Ice Hockey\"\n    },\n    \"thumbnails\": {},\n    \"subseason_ids\": [\n        291621\n    ]\n}"}]},"settings":"","url":"/team_instances","auth":"required"},"category":"56e03709f97d422900d63922","order":17,"link_url":"","parentDoc":null,"type":"post","updates":[],"body":"","createdAt":"2016-03-09T15:53:51.431Z","editedParams":true,"excerpt":"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`.\n\n###Parameters","user":"56548c568975c70d002ea4b4","editedParams2":true,"next":{"description":"","pages":[]},"project":"5641217e0ee5370d00da636d","sync_unique":"","childrenPages":[]}

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

subseason_id:
required
integer
league_instance_id:
required
integer

Body Params

parent_node_id:
required
integer

ID of the node beneath which the team will be placed

existing_or_new:
required
stringexisting

Denotes whether the new Team Instance will be created under a new or existing Team

top_new_team_template_id:
integer

Top template for team page if new team

top_existing_team_template_id:
integer

Top template for team page if existing team

bottom_new_team_template_id:
integer

Bottom template for team page if new team

bottom_existing_team_template_id:
integer

Bottom template for team page if existing team

node[team_id]:
integer

ID of Team of which to create new instance of

team[name]:
string

Name of team if team does not already exist

team[button_title]:
string

Button title of team if team does not already exist

team[abbrev]:
string

Abbreviation of team name if team does not already exist

team[primary_color]:
string

Team primary color if team does not already exist

team[secondary_color]:
string

Team secondary color if team does not already exist

Definition

https://api.sportngin.com/team_instances

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
    ]
}


{"_id":"58866fd62822ed0f00d5b4d3","isReference":true,"version":"56cca51eca43550b002813fa","__v":5,"category":"56e03709f97d422900d63922","createdAt":"2017-01-23T21:04:22.702Z","slug":"team-instances-create-no-league","sync_unique":"","title":"Team Instances Create (no league)","updates":[],"body":"","hidden":false,"next":{"description":"","pages":[]},"order":18,"user":"56548c568975c70d002ea4b4","parentDoc":null,"api":{"settings":"","url":"/team_instances","auth":"required","examples":{"codes":[{"name":"cURL - New Team","language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"parent_node_id\": 2458074,\n    \"existing_or_new\": \"new\",\n    \"top_new_team_template_id\": 23220,\n    \"bottom_new_team_template_id\": 23221,\n    \"season\":\n    \t\t{\n    \t\t\"name\": \"2017-18\"\n    \t\t},\n    \"subseason\":\n    \t\t{\n    \t\t\"name\": \"Regular Season\"\n    \t\t},\n    \"league\":\n    \t\t{\n    \t\t\"sport_id\": 1\n    \t\t},\n    \"team\":\n        {\n        \"name\": \"API TEST TEAM\",\n        \"button_title\": \"API TEAM\",\n        \"abbrev\": \"ATT\",\n        \"primary_color\": \"FFFFFF\",\n        \"secondary_color\": \"AAAAAA\"\n        }\n}\n    ' \"https://api.sportngin.com/team_instances\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"existing_or_new\\\": \\\"new\\\",\\n    \\\"top_new_team_template_id\\\": 23220,\\n    \\\"bottom_new_team_template_id\\\": 23220,\\n    \\\"season\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"2017-18\\\"\\n    \\t},\\n    \\\"subseason\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"Regular Season\\\"\\n    \\t},\\n    \\\"league\\\":\\n    \\t{\\n    \\t\\\"sport_id\\\": 1\\n    \\t},\\n    \\\"team\\\":\\n        {\\n        \\\"name\\\": \\\"API TEST TEAM\\\",\\n        \\\"button_title\\\": \\\"API TEAM\\\",\\n        \\\"abbrev\\\": \\\"ATT\\\",\\n        \\\"primary_color\\\": \\\"FFFFFF\\\",\\n        \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n        }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","name":"Ruby - New Team"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"existing_or_new\\\": \\\"new\\\",\\n    \\\"top_new_team_template_id\\\": 23220,\\n    \\\"bottom_new_team_template_id\\\": 23220,\\n    \\\"season\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"2017-18\\\"\\n    \\t},\\n    \\\"subseason\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"Regular Season\\\"\\n    \\t},\\n    \\\"league\\\":\\n    \\t{\\n    \\t\\\"sport_id\\\": 1\\n    \\t},\\n    \\\"team\\\":\\n        {\\n        \\\"name\\\": \\\"API TEST TEAM\\\",\\n        \\\"button_title\\\": \\\"API TEAM\\\",\\n        \\\"abbrev\\\": \\\"ATT\\\",\\n        \\\"primary_color\\\": \\\"FFFFFF\\\",\\n        \\\"secondary_color\\\": \\\"AAAAAA\\\"\\n        }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","name":"Java - New Team"},{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"parent_node_id\": 2458074,\n    \"top_new_team_template_id\": 23220,\n    \"bottom_new_team_template_id\": 23221,\n    \"season\":\n    \t\t{\n    \t\t\"name\": \"2017-18\"\n    \t\t},\n    \"subseason\":\n    \t\t{\n    \t\t\"name\": \"Regular Season\"\n    \t\t},\n    \"league\":\n    \t\t{\n    \t\t\"sport_id\": 1\n    \t\t},\n  \t \"node\":\n    \t\t{\n   \t\t\t\"team_id\": 1373611\n    \t\t}\n}\n    ' \"https://api.sportngin.com/team_instances\"","name":"cURL - Existing Team"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"existing_or_new\\\": \\\"new\\\",\\n    \\\"top_new_team_template_id\\\": 23220,\\n    \\\"bottom_new_team_template_id\\\": 23220,\\n    \\\"season\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"2017-18\\\"\\n    \\t},\\n    \\\"subseason\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"Regular Season\\\"\\n    \\t},\\n    \\\"league\\\":\\n    \\t{\\n    \\t\\\"sport_id\\\": 1\\n    \\t},\\n    \\\"node\\\":\\n        {\\n        \\\"team_id\\\": 1373611\\n        }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","name":"Ruby - Existing Team","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"parent_node_id\\\": 2458074,\\n    \\\"existing_or_new\\\": \\\"new\\\",\\n    \\\"top_new_team_template_id\\\": 23220,\\n    \\\"bottom_new_team_template_id\\\": 23220,\\n    \\\"season\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"2017-18\\\"\\n    \\t},\\n    \\\"subseason\\\":\\n    \\t{\\n    \\t\\\"name\\\": \\\"Regular Season\\\"\\n    \\t},\\n    \\\"league\\\":\\n    \\t{\\n    \\t\\\"sport_id\\\": 1\\n    \\t},\\n    \\\"node\\\":\\n        {\\n        \\\"team_id\\\": 1373611\\n        }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","name":"Java - Existing Team"}]},"method":"post","params":[{"default":"","type":"int","name":"parent_node_id","_id":"5886737b9321a50f00f3eada","ref":"","in":"body","required":true,"desc":"ID of the node beneath which the team will be placed"},{"default":"existing","type":"string","name":"existing_or_new","_id":"5886737b9321a50f00f3ead9","ref":"","in":"body","required":true,"desc":"Denotes whether the new Team Instance will be created under a new or existing Team"},{"default":"","type":"int","name":"top_new_team_template_id","_id":"588675689a74d20f00f84b75","ref":"","in":"body","required":false,"desc":"Top template for team page if new team"},{"in":"body","required":false,"desc":"Top template for team page if existing team","default":"","type":"int","name":"top_existing_team_template_id","_id":"588675689a74d20f00f84b74","ref":""},{"required":false,"desc":"Bottom template for team page if new team","default":"","type":"int","name":"bottom_new_team_template_id","_id":"588675689a74d20f00f84b73","ref":"","in":"body"},{"type":"int","name":"bottom_existing_team_template_id","_id":"588675689a74d20f00f84b72","ref":"","in":"body","required":false,"desc":"Bottom template for team page if existing team","default":""},{"desc":"Sport ID for the team being created","default":"","type":"int","name":"league[sport_id]","_id":"5886737b9321a50f00f3ead1","ref":"","in":"body","required":true},{"name":"season[name]","_id":"5886737b9321a50f00f3ead3","ref":"","in":"body","required":true,"desc":"Season name (eg: 2017-2018)","default":"","type":"string"},{"ref":"","in":"body","required":true,"desc":"Subseason name (eg: Regular Season)","default":"","type":"string","name":"subseason[name]","_id":"5886737b9321a50f00f3ead2"},{"in":"body","required":false,"desc":"ID of Team of which to create new instance of","default":"","type":"int","name":"node[team_id]","_id":"588674209321a50f00f3eade","ref":""},{"desc":"Name of team if team does not already exist","default":"","type":"string","name":"team[name]","_id":"5886737b9321a50f00f3ead8","ref":"","in":"body","required":false},{"name":"team[button_title]","_id":"5886737b9321a50f00f3ead7","ref":"","in":"body","required":false,"desc":"Button title of team if team does not already exist","default":"","type":"string"},{"ref":"","in":"body","required":false,"desc":"Abbreviation of team name if team does not already exist","default":"","type":"string","name":"team[abbrev]","_id":"5886737b9321a50f00f3ead6"},{"default":"","type":"string","name":"team[primary_color]","_id":"5886737b9321a50f00f3ead5","ref":"","in":"body","required":false,"desc":"Team primary color if team does not already exist"},{"default":"","type":"string","name":"team[secondary_color]","_id":"5886737b9321a50f00f3ead4","ref":"","in":"body","required":false,"desc":"Team secondary color if team does not already exist"}],"results":{"codes":[{"code":"{\n    \"id\": 1930618,\n    \"created_at\": \"2016-04-22T09:00:25-07:00\",\n    \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n    \"team_id\": 1413546,\n    \"affects_standings\": true,\n    \"name\": \"API TEST TEAM\",\n    \"roster_id\": 1892176,\n    \"opponent\": null,\n    \"parent_team_instance_id\": null,\n    \"image_id\": null,\n    \"abbrev\": \"ATT\",\n    \"primary_color\": \"FFFFFF\",\n    \"secondary_color\": \"AAAAAA\",\n    \"button_title\": \"API TEAM\",\n    \"gender\": \"male\",\n    \"management_team_id\": null,\n    \"team\": {\n        \"id\": 1413546,\n        \"name\": \"API TEST TEAM\",\n        \"button_title\": \"API TEAM\",\n        \"abbrev\": \"ATT\",\n        \"image_id\": null,\n        \"primary_color\": \"FFFFFF\",\n        \"secondary_color\": \"AAAAAA\",\n        \"gender\": null,\n        \"created_at\": \"2016-04-22T09:00:25-07:00\",\n        \"updated_at\": \"2016-04-22T09:00:25-07:00\",\n        \"sport_id\": 1,\n        \"opponent\": null,\n        \"parent_team_id\": null,\n        \"ios_whitelabel_url\": null,\n        \"android_whitelabel_url\": null,\n        \"sites\": [\n            {\n                \"id\": 11953,\n                \"domain_id\": 1149,\n                \"domain_name\": \"sportngin.com\",\n                \"subdomain\": \"apidemo\",\n                \"product_id\": 14,\n                \"name\": \"Sport Ngin API Demo Site\",\n                \"short_name\": \"Sport Ngin API Demo Site\",\n                \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n                \"created_by_user_id\": 3156422,\n                \"updated_by_user_id\": null,\n                \"timezone\": \"US/Central\",\n                \"twitter_user_id\": null,\n                \"layout_theme_id\": 51,\n                \"secure_subdomain\": \"apidemo\",\n                \"address_id\": 4447713,\n                \"membership_privacy\": \"open\",\n                \"membership_grace_period\": 1,\n                \"boss_billing_account_id\": null,\n                \"boss_organization_id\": 27743\n            }\n        ],\n        \"leagues\": [],\n        \"thumbnails\": {},\n        \"thumbnails_ssl\": {},\n        \"current_subseason_ids\": [\n            291621\n        ],\n        \"seasons\": [\n            {\n                \"id\": 267440,\n                \"name\": \"2016\",\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                \"solo_team_league_id\": 199530,\n                \"has_metadata\": null,\n                \"show_shared_schedule\": false,\n                \"stat_preference\": {\n                    \"id\": 292407,\n                    \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"game_defaults\": {\n                        \"auto_navigate_to_play_details\": true,\n                        \"field_of_play_enabled\": false,\n                        \"game_misconduct_time\": 0,\n                        \"ice_hockey_goalie_order_by\": null,\n                        \"ice_hockey_goalie_order_by_secondary\": null,\n                        \"ice_hockey_goalie_order_dir\": null,\n                        \"ice_hockey_goalie_order_dir_secondary\": null,\n                        \"ice_hockey_goalie_stat_qualify_by\": null,\n                        \"ice_hockey_goalie_stat_qualify_val\": null,\n                        \"ice_hockey_skater_order_by\": null,\n                        \"ice_hockey_skater_order_by_secondary\": null,\n                        \"ice_hockey_skater_order_dir\": null,\n                        \"ice_hockey_skater_order_dir_secondary\": null,\n                        \"ice_hockey_skater_stat_qualify_by\": null,\n                        \"ice_hockey_skater_stat_qualify_val\": null,\n                        \"ice_hockey_team_scoring_order_by\": \"pts\",\n                        \"ice_hockey_team_scoring_order_by_secondary\": null,\n                        \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                        \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                        \"ice_hockey_team_stats_order_by\": null,\n                        \"ice_hockey_team_stats_order_by_secondary\": null,\n                        \"ice_hockey_team_stats_order_dir\": null,\n                        \"ice_hockey_team_stats_order_dir_secondary\": null,\n                        \"ice_hockey_team_stats_stat_qualify_by\": null,\n                        \"ice_hockey_team_stats_stat_qualify_val\": null,\n                        \"intermission_length\": 1,\n                        \"major_adjustment_time\": 0,\n                        \"major_penalty_time\": 5,\n                        \"match_penalty_time\": 5,\n                        \"max_goal_differential\": 0,\n                        \"max_player_major_penalties\": 2,\n                        \"max_player_penalties\": 5,\n                        \"max_team_penalties\": 15,\n                        \"minor_adjustment_time\": 0,\n                        \"minor_penalty_time\": 2,\n                        \"misconduct_time\": 10,\n                        \"overtime_intervals\": 2,\n                        \"overtime_length\": \"5\",\n                        \"post_live_updates\": true,\n                        \"regulation_time_intervals\": null,\n                        \"shootout_enabled\": false,\n                        \"stop_run_time\": true,\n                        \"time_interval_name\": \"period\",\n                        \"time_intervals\": [\n                            \"20\",\n                            \"20\",\n                            \"20\"\n                        ],\n                        \"timeout_time\": 1,\n                        \"timeouts\": 1,\n                        \"track_goal_types\": true,\n                        \"track_player_sog\": true,\n                        \"warmup_length\": 5\n                    },\n                    \"season_id\": 267440,\n                    \"original_scorer_can_edit\": null,\n                    \"force_real_time_scoring\": false,\n                    \"stat_tool_id\": 1848623,\n                    \"stats_can_be_unlinked\": null,\n                    \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                    \"can_edit_final\": \"league_owner\",\n                    \"traded_player_stats\": null,\n                    \"game_sheet_auto_summary_enabled\": true,\n                    \"visible_stats\": \"league_xor_division\"\n                },\n                \"subseasons\": [\n                    {\n                        \"id\": 291621,\n                        \"name\": \"Regular Season\",\n                        \"season_id\": 267440,\n                        \"position\": 1,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-04-20T11:53:00-07:00\",\n                        \"snl_scoring_enabled\": true,\n                        \"statistic_grouping_id\": 417884,\n                        \"workers_completed\": null,\n                        \"standing_preference\": null,\n                        \"live_scoring_stat_configuration\": {\n                            \"show_plus_minus\": null,\n                            \"fair_play_points\": false\n                        }\n                    }\n                ]\n            }\n        ],\n        \"subseason_team_instance_mapping\": [\n            {\n                \"subseason_id\": 291621,\n                \"team_instance_id\": 1930618\n            }\n        ],\n        \"league_name\": null,\n        \"site_name\": \"Sport Ngin API Demo Site\",\n        \"sport_name\": \"Ice Hockey\"\n    },\n    \"thumbnails\": {},\n    \"subseason_ids\": [\n        291621\n    ]\n}","name":"","status":200,"language":"json"}]}},"githubsync":"","link_external":false,"link_url":"","excerpt":"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`.\n\n###Parameters","project":"5641217e0ee5370d00da636d","type":"post","childrenPages":[]}

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

parent_node_id:
required
integer

ID of the node beneath which the team will be placed

existing_or_new:
required
stringexisting

Denotes whether the new Team Instance will be created under a new or existing Team

top_new_team_template_id:
integer

Top template for team page if new team

top_existing_team_template_id:
integer

Top template for team page if existing team

bottom_new_team_template_id:
integer

Bottom template for team page if new team

bottom_existing_team_template_id:
integer

Bottom template for team page if existing team

league[sport_id]:
required
integer

Sport ID for the team being created

season[name]:
required
string

Season name (eg: 2017-2018)

subseason[name]:
required
string

Subseason name (eg: Regular Season)

node[team_id]:
integer

ID of Team of which to create new instance of

team[name]:
string

Name of team if team does not already exist

team[button_title]:
string

Button title of team if team does not already exist

team[abbrev]:
string

Abbreviation of team name if team does not already exist

team[primary_color]:
string

Team primary color if team does not already exist

team[secondary_color]:
string

Team secondary color if team does not already exist

Definition

https://api.sportngin.com/team_instances

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
    ]
}


{"_id":"57eeae42cc36920e00bff4ba","__v":0,"category":"56e03709f97d422900d63922","parentDoc":null,"project":"5641217e0ee5370d00da636d","sync_unique":"","updates":[],"user":"56548c568975c70d002ea4b4","api":{"results":{"codes":[{"code":"{\n    \"id\": 1876244,\n    \"created_at\": \"2016-03-22T13:19:31-07:00\",\n    \"updated_at\": \"2016-09-30T11:21:58-07:00\",\n    \"team_id\": 1373612,\n    \"affects_standings\": true,\n    \"name\": \"Buffalo Bison\",\n    \"roster_id\": 1837159,\n    \"opponent\": null,\n    \"parent_team_instance_id\": null,\n    \"image_id\": null,\n    \"abbrev\": \"Buff\",\n    \"primary_color\": \"000000\",\n    \"secondary_color\": \"000000\",\n    \"button_title\": \"Buff\",\n    \"gender\": \"male\",\n    \"management_team_id\": null,\n    \"team\": {\n        \"id\": 1373612,\n        \"name\": \"Buffalo Bison\",\n        \"button_title\": \"Buffalo\",\n        \"abbrev\": \"Buff\",\n        \"image_id\": null,\n        \"primary_color\": \"000000\",\n        \"secondary_color\": \"000000\",\n        \"gender\": \"male\",\n        \"created_at\": \"2016-03-22T13:06:41-07:00\",\n        \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n        \"sport_id\": 1,\n        \"opponent\": null,\n        \"parent_team_id\": null,\n        \"ios_whitelabel_url\": null,\n        \"android_whitelabel_url\": null,\n        \"sites\": [\n            {\n                \"id\": 11953,\n                \"domain_id\": 1149,\n                \"domain_name\": \"sportngin.com\",\n                \"subdomain\": \"apidemo\",\n                \"product_id\": 14,\n                \"name\": \"Sport Ngin API Demo Site\",\n                \"short_name\": \"Sport Ngin API Demo Site\",\n                \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                \"updated_on\": \"2016-09-29T07:59:17-07:00\",\n                \"created_by_user_id\": 3156422,\n                \"updated_by_user_id\": 3646297,\n                \"timezone\": \"America/Chicago\",\n                \"twitter_user_id\": null,\n                \"layout_theme_id\": 53,\n                \"secure_subdomain\": \"apidemo\",\n                \"address_id\": 4447713,\n                \"membership_privacy\": \"open\",\n                \"membership_grace_period\": 1,\n                \"boss_billing_account_id\": null,\n                \"boss_organization_id\": 27743\n            }\n        ],\n        \"leagues\": [\n            {\n                \"id\": 27737,\n                \"name\": \"Eastern League\",\n                \"current_subseason_id\": 291621,\n                \"site_id\": 11953,\n                \"sport_id\": 1,\n                \"image_id\": null,\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-05-02T13:29:58-07:00\",\n                \"button_title\": \"Eastern\",\n                \"primary_color\": \"00AEEF\",\n                \"secondary_color\": \"666666\",\n                \"gender\": \"male\",\n                \"abbrev\": \"East\",\n                \"score_ribbon\": false,\n                \"tweet_games\": null,\n                \"game_sheet_label\": \"gamesheet\"\n            }\n        ],\n        \"thumbnails\": {},\n        \"thumbnails_ssl\": {},\n        \"current_subseason_ids\": [\n            291621\n        ],\n        \"seasons\": [\n            ...","language":"json","status":200,"name":""}]},"settings":"","url":"/team_instances/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN  \" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n\t\"button_title\": \"Buff\"\n}\n}' \"https://api.sportngin.com/team_instances/1876244\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances/1876244\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"button_title\\\": \\\"Buff\\\" \\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"button_title\\\": \\\"Buff\\\" \\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances/1876244\")\n  .put(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"_id":"577e8f45a74eb40e00d97b62","ref":"","in":"path","required":true,"desc":"Id of TeamInstance to update","default":"","type":"int","name":"id"}]},"createdAt":"2016-09-30T18:26:10.830Z","excerpt":"The Update method updates the provided fields for a given `id`.\n\n###Parameters","githubsync":"","hidden":false,"isReference":true,"link_external":false,"order":19,"type":"put","title":"Team Instances Update","version":"56cca51eca43550b002813fa","body":"","link_url":"","slug":"team-instances-update","childrenPages":[]}

putTeam Instances Update

The Update method updates the provided fields for a given id.

Parameters


Path Params

id:
required
integer

Id of TeamInstance to update

Definition

https://api.sportngin.com/team_instances/:id

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 '{
	"button_title": "Buff"
}
}' "https://api.sportngin.com/team_instances/1876244"

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": [
            ...


{"_id":"57eea7c1cc36920e00bff4b7","body":"","hidden":false,"slug":"team-instances-delete","excerpt":"The Delete method permanently deletes the associated TeamInstance record in SportsEngine.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","project":"5641217e0ee5370d00da636d","sync_unique":"","parentDoc":null,"title":"Team Instances Delete","__v":0,"api":{"method":"delete","params":[{"desc":"Id belonging to the team_instance of interest","default":"","type":"int","name":"id","_id":"57114eae5ba0d80e00f51614","ref":"","in":"path","required":true}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 1876243,\n    \"created_at\": \"2016-03-22T13:19:12-07:00\",\n    \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n    \"team_id\": 1373611,\n    \"affects_standings\": true,\n    \"name\": \"Boston Bears\",\n    \"roster_id\": 1837158,\n    \"opponent\": null,\n    \"parent_team_instance_id\": null,\n    \"image_id\": null,\n    \"abbrev\": \"Bos\",\n    \"primary_color\": \"000000\",\n    \"secondary_color\": \"000000\",\n    \"button_title\": \"Boston\",\n    \"gender\": \"male\",\n    \"management_team_id\": null,\n    \"team\": {\n        \"id\": 1373611,\n        \"name\": \"Boston Bears\",\n        \"button_title\": \"Boston\",\n        \"abbrev\": \"Bos\",\n        \"image_id\": null,\n        \"primary_color\": \"000000\",\n        \"secondary_color\": \"000000\",\n        \"gender\": \"male\",\n        \"created_at\": \"2016-03-22T13:06:41-07:00\",\n        \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n        \"sport_id\": 1,\n        \"opponent\": null,\n        \"parent_team_id\": null,\n        \"ios_whitelabel_url\": null,\n        \"android_whitelabel_url\": null,\n        \"sites\": [\n            {\n                \"id\": 11953,\n                \"domain_id\": 1149,\n                \"domain_name\": \"sportngin.com\",\n                \"subdomain\": \"apidemo\",\n                \"product_id\": 14,\n                \"name\": \"Sport Ngin API Demo Site\",\n                \"short_name\": \"Sport Ngin API Demo Site\",\n                \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n                \"created_by_user_id\": 3156422,\n                \"updated_by_user_id\": null,\n                \"timezone\": \"US/Central\",\n                \"twitter_user_id\": null,\n                \"layout_theme_id\": 51,\n                \"secure_subdomain\": \"apidemo\",\n                \"address_id\": 4447713,\n                \"membership_privacy\": \"open\",\n                \"membership_grace_period\": 1,\n                \"boss_billing_account_id\": null,\n                \"boss_organization_id\": 27743\n            }\n        ],\n        \"leagues\": [\n            {\n                \"id\": 27737,\n                \"name\": \"Eastern League\",\n                \"current_subseason_id\": 291621,\n                \"site_id\": 11953,\n                \"sport_id\": 1,\n                \"image_id\": null,\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n                \"button_title\": \"Eastern\",\n                \"primary_color\": \"00AEEF\",\n                \"secondary_color\": \"666666\",\n                \"gender\": \"male\",\n                \"abbrev\": \"East\",\n                \"score_ribbon\": false,\n                \"tweet_games\": null,\n                \"game_sheet_label\": \"gamesheet\"\n            }\n        ],\n        \"thumbnails\": {},\n        \"thumbnails_ssl\": {},\n        \"current_subseason_ids\": [\n            291621\n        ],\n        \"seasons\": [\n            {\n                \"id\": 267440,\n                \"name\": \"2016\",\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                \"solo_team_league_id\": null,\n                \"has_metadata\": null,\n                \"show_shared_schedule\": false,\n                \"stat_preference\": {\n                    \"id\": 292407,\n                    \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                    \"game_defaults\": {\n                        \"auto_navigate_to_play_details\": true,\n                        \"field_of_play_enabled\": false,\n                        \"game_misconduct_time\": 0,\n                        \"ice_hockey_goalie_order_by\": null,\n                        \"ice_hockey_goalie_order_by_secondary\": null,\n                        \"ice_hockey_goalie_order_dir\": null,\n                        \"ice_hockey_goalie_order_dir_secondary\": null,\n                        \"ice_hockey_goalie_stat_qualify_by\": null,\n                        \"ice_hockey_goalie_stat_qualify_val\": null,\n                        \"ice_hockey_skater_order_by\": null,\n                        \"ice_hockey_skater_order_by_secondary\": null,\n                        \"ice_hockey_skater_order_dir\": null,\n                        \"ice_hockey_skater_order_dir_secondary\": null,\n                        \"ice_hockey_skater_stat_qualify_by\": null,\n                        \"ice_hockey_skater_stat_qualify_val\": null,\n                        \"ice_hockey_team_scoring_order_by\": \"pts\",\n                        \"ice_hockey_team_scoring_order_by_secondary\": null,\n                        \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                        \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                        \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                        \"ice_hockey_team_stats_order_by\": null,\n                        \"ice_hockey_team_stats_order_by_secondary\": null,\n                        \"ice_hockey_team_stats_order_dir\": null,\n                        \"ice_hockey_team_stats_order_dir_secondary\": null,\n                        \"ice_hockey_team_stats_stat_qualify_by\": null,\n                        \"ice_hockey_team_stats_stat_qualify_val\": null,\n                        \"intermission_length\": 1,\n                        \"major_adjustment_time\": 0,\n                        \"major_penalty_time\": 5,\n                        \"match_penalty_time\": 5,\n                        \"max_goal_differential\": 0,\n                        \"max_player_major_penalties\": 2,\n                        \"max_player_penalties\": 5,\n                        \"max_team_penalties\": 15,\n                        \"minor_adjustment_time\": 0,\n                        \"minor_penalty_time\": 2,\n                        \"misconduct_time\": 10,\n                        \"overtime_intervals\": 2,\n                        \"overtime_length\": \"5\",\n                        \"post_live_updates\": true,\n                        \"regulation_time_intervals\": null,\n                        \"shootout_enabled\": false,\n                        \"stop_run_time\": true,\n                        \"time_interval_name\": \"period\",\n                        \"time_intervals\": [\n                            \"20\",\n                            \"20\",\n                            \"20\"\n                        ],\n                        \"timeout_time\": 1,\n                        \"timeouts\": 1,\n                        \"track_goal_types\": true,\n                        \"track_player_sog\": true,\n                        \"warmup_length\": 5\n                    },\n                    \"season_id\": 267440,\n                    \"original_scorer_can_edit\": null,\n                    \"force_real_time_scoring\": false,\n                    \"stat_tool_id\": 1848623,\n                    \"stats_can_be_unlinked\": null,\n                    \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                    \"can_edit_final\": \"league_owner\",\n                    \"traded_player_stats\": null,\n                    \"game_sheet_auto_summary_enabled\": true,\n                    \"visible_stats\": \"league_xor_division\"\n                },\n                \"subseasons\": [\n                    {\n                        \"id\": 291621,\n                        \"name\": \"Regular Season\",\n                        \"season_id\": 267440,\n                        \"position\": 1,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-04-15T11:02:33-07:00\",\n                        \"snl_scoring_enabled\": true,\n                        \"statistic_grouping_id\": 417884,\n                        \"workers_completed\": null,\n                        \"standing_preference\": {\n                            \"id\": 110425,\n                            \"standing_tool_id\": 1848627,\n                            \"standing_type_id\": 5,\n                            \"standings_aggregation_level\": \"league\",\n                            \"qualifiers\": null,\n                            \"qualifier_limit\": null,\n                            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                            \"winning_team_custom_points\": null,\n                            \"losing_team_custom_points\": null,\n                            \"tied_team_custom_points\": null,\n                            \"label_mapping\": {},\n                            \"extended_fields\": [\n                                \"win_count\",\n                                \"loss_count\",\n                                \"tie_count\",\n                                \"points\"\n                            ],\n                            \"order_rule\": 1,\n                            \"overtime_win_custom_points\": null,\n                            \"overtime_loss_custom_points\": null,\n                            \"overtime_wins_include_in_wins\": true,\n                            \"overtime_losses_include_in_losses\": true,\n                            \"legacy_custom_points\": false\n                        },\n                        \"live_scoring_stat_configuration\": {\n                            \"show_plus_minus\": null,\n                            \"fair_play_points\": false\n                        }\n                    }\n                ]\n            }\n        ],\n        \"subseason_team_instance_mapping\": [\n            {\n                \"subseason_id\": 291621,\n                \"team_instance_id\": 1876243\n            }\n        ],\n        \"league_name\": \"Eastern League\",\n        \"site_name\": \"Sport Ngin API Demo Site\",\n        \"sport_name\": \"Ice Hockey\"\n    },\n    \"thumbnails\": {},\n    \"subseason_ids\": [\n        291621\n    ]\n}","name":"","status":200}]},"settings":"","url":"/team_instances/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/team_instances/1876243\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/team_instances/1876243\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/team_instances/1876243\")\n  .delete(null)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"category":"56e03709f97d422900d63922","githubsync":"","isReference":true,"order":20,"type":"delete","version":"56cca51eca43550b002813fa","createdAt":"2016-09-30T17:58:25.835Z","link_external":false,"link_url":"","updates":[],"user":"56548c568975c70d002ea4b4","childrenPages":[]}

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:
required
integer

Id belonging to the team_instance of interest

Definition

https://api.sportngin.com/team_instances/:id

Examples

curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/team_instances/1876243"

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
    ]
}


{"_id":"56f417d60f1f970e006e24a1","parentDoc":null,"sync_unique":"","__v":4,"editedParams2":true,"excerpt":"The Show method returns a single Season for a given `id`.\n\n###Parameters","hidden":false,"link_url":"","order":21,"api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/seasons/267440\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/seasons/267440\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/seasons/267440\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","type":"int","name":"id","in":"path","_id":"56fd7f18e7f3080e008e3e85","ref":"","required":true,"desc":""}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 267440,\n    \"name\": \"2016\",\n    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n    \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n    \"solo_team_league_id\": null,\n    \"has_metadata\": null,\n    \"show_shared_schedule\": false,\n    \"stat_preference\": {\n        \"id\": 292407,\n        \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n        \"created_on\": \"2016-03-22T12:46:58-07:00\",\n        \"game_defaults\": {\n            \"auto_navigate_to_play_details\": true,\n            \"field_of_play_enabled\": false,\n            \"game_misconduct_time\": 0,\n            \"ice_hockey_goalie_order_by\": null,\n            \"ice_hockey_goalie_order_by_secondary\": null,\n            \"ice_hockey_goalie_order_dir\": null,\n            \"ice_hockey_goalie_order_dir_secondary\": null,\n            \"ice_hockey_goalie_stat_qualify_by\": null,\n            \"ice_hockey_goalie_stat_qualify_val\": null,\n            \"ice_hockey_skater_order_by\": null,\n            \"ice_hockey_skater_order_by_secondary\": null,\n            \"ice_hockey_skater_order_dir\": null,\n            \"ice_hockey_skater_order_dir_secondary\": null,\n            \"ice_hockey_skater_stat_qualify_by\": null,\n            \"ice_hockey_skater_stat_qualify_val\": null,\n            \"ice_hockey_team_scoring_order_by\": \"pts\",\n            \"ice_hockey_team_scoring_order_by_secondary\": null,\n            \"ice_hockey_team_scoring_order_dir\": \"desc\",\n            \"ice_hockey_team_scoring_order_dir_secondary\": null,\n            \"ice_hockey_team_scoring_stat_qualify_by\": null,\n            \"ice_hockey_team_scoring_stat_qualify_val\": null,\n            \"ice_hockey_team_stats_order_by\": null,\n            \"ice_hockey_team_stats_order_by_secondary\": null,\n            \"ice_hockey_team_stats_order_dir\": null,\n            \"ice_hockey_team_stats_order_dir_secondary\": null,\n            \"ice_hockey_team_stats_stat_qualify_by\": null,\n            \"ice_hockey_team_stats_stat_qualify_val\": null,\n            \"intermission_length\": 1,\n            \"major_adjustment_time\": 0,\n            \"major_penalty_time\": 5,\n            \"match_penalty_time\": 5,\n            \"max_goal_differential\": 0,\n            \"max_player_major_penalties\": 2,\n            \"max_player_penalties\": 5,\n            \"max_team_penalties\": 15,\n            \"minor_adjustment_time\": 0,\n            \"minor_penalty_time\": 2,\n            \"misconduct_time\": 10,\n            \"overtime_intervals\": 2,\n            \"overtime_length\": \"5\",\n            \"post_live_updates\": true,\n            \"regulation_time_intervals\": null,\n            \"shootout_enabled\": false,\n            \"stop_run_time\": true,\n            \"time_interval_name\": \"period\",\n            \"time_intervals\": [\n                \"20\",\n                \"20\",\n                \"20\"\n            ],\n            \"timeout_time\": 1,\n            \"timeouts\": 1,\n            \"track_goal_types\": true,\n            \"track_player_sog\": true,\n            \"warmup_length\": 5\n        },\n        \"season_id\": 267440,\n        \"original_scorer_can_edit\": null,\n        \"force_real_time_scoring\": false,\n        \"stat_tool_id\": 1848623,\n        \"stats_can_be_unlinked\": null,\n        \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n        \"can_edit_final\": \"league_owner\",\n        \"traded_player_stats\": null,\n        \"game_sheet_auto_summary_enabled\": true,\n        \"visible_stats\": \"league_xor_division\"\n    },\n    \"subseasons\": [\n        {\n            \"id\": 291621,\n            \"name\": \"Regular Season\",\n            \"season_id\": 267440,\n            \"position\": 1,\n            \"created_at\": \"2016-03-22T12:46:58-07:00\",\n            \"updated_at\": \"2016-04-14T09:43:56-07:00\",\n            \"snl_scoring_enabled\": true,\n            \"statistic_grouping_id\": 417884,\n            \"workers_completed\": null,\n            \"standing_preference\": {\n                \"id\": 110425,\n                \"standing_tool_id\": 1848627,\n                \"standing_type_id\": 5,\n                \"standings_aggregation_level\": \"league\",\n                \"qualifiers\": null,\n                \"qualifier_limit\": null,\n                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                \"winning_team_custom_points\": null,\n                \"losing_team_custom_points\": null,\n                \"tied_team_custom_points\": null,\n                \"label_mapping\": {},\n                \"extended_fields\": [\n                    \"win_count\",\n                    \"loss_count\",\n                    \"tie_count\",\n                    \"points\"\n                ],\n                \"order_rule\": 1,\n                \"overtime_win_custom_points\": null,\n                \"overtime_loss_custom_points\": null,\n                \"overtime_wins_include_in_wins\": true,\n                \"overtime_losses_include_in_losses\": true,\n                \"legacy_custom_points\": false\n            },\n            \"live_scoring_stat_configuration\": {\n                \"show_plus_minus\": null,\n                \"fair_play_points\": false\n            }\n        }\n    ]\n}","name":"","status":200}]},"settings":"","url":"/seasons/:id","auth":"required"},"editedParams":true,"project":"5641217e0ee5370d00da636d","slug":"seasons-show","type":"get","version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Name of the season\",\n    \"2-0\": \"stat_prefence\",\n    \"2-1\": \"Hash\",\n    \"2-2\": \"Information about stat preferences for the season\",\n    \"3-0\": \"roster_enabled\",\n    \"3-1\": \"Boolean\",\n    \"3-2\": \"Whether or not team_instances for the season will have rosters\",\n    \"4-0\": \"schedule_enabled\",\n    \"4-1\": \"Boolean\",\n    \"4-2\": \"Whether or not to display games for this season in the game schedule\",\n    \"5-0\": \"statistics_enabld\",\n    \"5-1\": \"Boolean\",\n    \"5-2\": \"Whether or not to calculate statistics for the season\",\n    \"6-0\": \"created_at\",\n    \"6-1\": \"Datetime\",\n    \"7-0\": \"updated_at\",\n    \"7-1\": \"Datetime\",\n    \"6-2\": \"Timestamp of creation date\",\n    \"7-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\n###Stat_Preference Hash Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-0\": \"season_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"id of the season assigned by NGIN\",\n    \"2-0\": \"force_real_time_scoring\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"Whether or not to require all scoring to be done with Sport NGIN Live\",\n    \"3-0\": \"original_scorer_can_edit\",\n    \"3-1\": \"Boolean\",\n    \"3-2\": \"Whether or not the original scorer is able to edit the stats\",\n    \"4-0\": \"required_roster_fields\",\n    \"4-1\": \"Array\",\n    \"4-2\": \"List of required fields for rosters\",\n    \"5-0\": \"email_list\",\n    \"5-1\": \"String\",\n    \"5-2\": \"List of emails to send updates to\",\n    \"6-0\": \"email_time\",\n    \"6-1\": \"Datetime\",\n    \"6-2\": \"Time of day to send email updates\",\n    \"7-0\": \"game_defaults\",\n    \"7-1\": \"Hash\",\n    \"7-2\": \"Sport specific defaults for games in this season\",\n    \"8-0\": \"created_on\",\n    \"9-0\": \"updated_on\",\n    \"8-1\": \"Datetime\",\n    \"9-1\": \"Datetime\",\n    \"8-2\": \"Timestamp of creation date\",\n    \"9-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 10\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"Stat_Preference may return other sport specific fields.\"\n}\n[/block]","createdAt":"2016-03-24T16:37:42.300Z","updates":[],"user":"56e71f9edee212320019e731","category":"56e03709f97d422900d63922","githubsync":"","isReference":true,"link_external":false,"title":"Seasons Show","childrenPages":[]}

getSeasons Show

The Show method returns a single Season for a given id.

Parameters


Path Params

id:
required
integer

Attributes

Attribute
Type
Notes

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

Stat_Preference Hash Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/seasons/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/seasons/267440"

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
            }
        }
    ]
}


{"_id":"56f439f0e2d47b0e005fe91c","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-0\": \"season_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"id of the season assigned by NGIN\",\n    \"2-0\": \"name\",\n    \"2-1\": \"String\",\n    \"2-2\": \"name for the subseason\",\n    \"3-0\": \"standing_type_id\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"id of the standings assigned by NGIN\",\n    \"4-0\": \"qaulifiers\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"number of possible qaulifiers\",\n    \"5-0\": \"qaulifier_limit\",\n    \"5-1\": \"Integer\",\n    \"5-2\": \"Upper limit of the number of qualifiers\",\n    \"6-0\": \"standings_aggregation_level\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Level the standings are build at\",\n    \"7-0\": \"snl_scoring_enabled\",\n    \"7-1\": \"Boolean\",\n    \"7-2\": \"Weather or not Sport NGIN Live is enabled for the subseason\",\n    \"8-0\": \"position\",\n    \"8-1\": \"Integer\",\n    \"8-2\": \"Order of the subseasons in a season\",\n    \"9-0\": \"created_at\",\n    \"9-1\": \"Datetime\",\n    \"9-2\": \"Timestamp of creation date\",\n    \"10-0\": \"Updated_at\",\n    \"10-1\": \"Datetime\",\n    \"10-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 11\n}\n[/block]\n###Standings Type ID Mapping\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"standing_type_id\",\n    \"h-1\": \"name\",\n    \"h-2\": \"description\",\n    \"h-3\": \"sport_id\",\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"2-0\": \"3\",\n    \"3-0\": \"4\",\n    \"4-0\": \"5\",\n    \"5-0\": \"6\",\n    \"6-0\": \"7\",\n    \"7-0\": \"8\",\n    \"8-0\": \"9\",\n    \"9-0\": \"10\",\n    \"10-0\": \"11\",\n    \"11-0\": \"12\",\n    \"12-0\": \"13\",\n    \"13-0\": \"14\",\n    \"14-0\": \"15\",\n    \"15-0\": \"16\",\n    \"16-0\": \"17\",\n    \"0-3\": \"1\",\n    \"1-3\": \"1\",\n    \"2-3\": \"4\",\n    \"3-3\": \"5\",\n    \"4-3\": \"1\",\n    \"5-3\": \"3\",\n    \"6-3\": \"11\",\n    \"7-3\": \"7\",\n    \"8-3\": \"3\",\n    \"10-3\": \"16\",\n    \"11-3\": \"16\",\n    \"13-3\": \"1\",\n    \"14-3\": \"19\",\n    \"15-3\": \"12\",\n    \"16-3\": \"3\",\n    \"0-1\": \"Hockey - NHL Classic with FPP\",\n    \"1-1\": \"Hockey - NHL Classic\",\n    \"2-1\": \"Baseball - MLB\",\n    \"3-1\": \"Soccer - Universal\",\n    \"4-1\": \"Hockey - NHL Current\",\n    \"5-1\": \"Lacrosse - MLL\",\n    \"6-1\": \"Football - NFL\",\n    \"7-1\": \"Basketball - NBA\",\n    \"8-1\": \"Box Lacrosse\",\n    \"9-1\": \"Seeded Single Elimination Bracket\",\n    \"10-1\": \"Rugby Union With Bonus Points\",\n    \"11-1\": \"Rugby Union Without Bonus Points\",\n    \"12-1\": \"Custom Points\",\n    \"13-1\": \"Hockey - Pond Hockey\",\n    \"14-1\": \"Ultimate\",\n    \"15-1\": \"Volleyball\",\n    \"16-1\": \"Lacrosse - NLL\",\n    \"0-2\": \"Identical to NHL Classic, but with the addition of Fair Play Points (FPP).\",\n    \"1-2\": \"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).\",\n    \"2-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n    \"3-2\": \"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).\",\n    \"4-2\": \"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).\",\n    \"5-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n    \"6-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n    \"7-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n    \"8-2\": \"Teams are ordered by games behind, then winning percentage, and then wins.\",\n    \"9-2\": \"Teams are seeded and play games within a single-elimination bracket.\",\n    \"10-2\": \"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\",\n    \"11-2\": \"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).\",\n    \"12-2\": \"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).\",\n    \"13-2\": \"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).\",\n    \"14-2\": \"Ultimate Standings\",\n    \"15-2\": \"Volleyball Standings\",\n    \"16-2\": \"Identical to Lacrosse - MLL, but with no tie game option\"\n  },\n  \"cols\": 4,\n  \"rows\": 17\n}\n[/block]","createdAt":"2016-03-24T19:03:12.924Z","editedParams2":true,"link_url":"","sync_unique":"","title":"Subseasons Show","project":"5641217e0ee5370d00da636d","__v":5,"category":"56e03709f97d422900d63922","excerpt":"The Show method returns a single Subseason for a given `id`.\n\n###Parameters","githubsync":"","hidden":false,"parentDoc":null,"type":"get","updates":[],"editedParams":true,"isReference":true,"order":22,"slug":"subseasons-show","user":"56e71f9edee212320019e731","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 291621,\n    \"name\": \"Regular Season\",\n    \"season_id\": 267440,\n    \"position\": 1,\n    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n    \"updated_at\": \"2016-04-14T09:36:29-07:00\",\n    \"snl_scoring_enabled\": true,\n    \"statistic_grouping_id\": 417884,\n    \"workers_completed\": null,\n    \"standing_preference\": {\n        \"id\": 110425,\n        \"standing_tool_id\": 1848627,\n        \"standing_type_id\": 5,\n        \"standings_aggregation_level\": \"league\",\n        \"qualifiers\": null,\n        \"qualifier_limit\": null,\n        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n        \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n        \"winning_team_custom_points\": null,\n        \"losing_team_custom_points\": null,\n        \"tied_team_custom_points\": null,\n        \"label_mapping\": {},\n        \"extended_fields\": [\n            \"win_count\",\n            \"loss_count\",\n            \"tie_count\",\n            \"points\"\n        ],\n        \"order_rule\": 1,\n        \"overtime_win_custom_points\": null,\n        \"overtime_loss_custom_points\": null,\n        \"overtime_wins_include_in_wins\": true,\n        \"overtime_losses_include_in_losses\": true,\n        \"legacy_custom_points\": false\n    },\n    \"live_scoring_stat_configuration\": {\n        \"show_plus_minus\": null,\n        \"fair_play_points\": false\n    }\n}","name":""}]},"settings":"","url":"/subseasons/:id","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.stage.ngin-staging.com/subseasons/291621\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.stage.ngin-staging.com/subseasons/291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.stage.ngin-staging.com/subseasons/291621\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"required":true,"desc":"Id of the subseason of interest.","default":"","type":"int","name":"id","in":"path","_id":"571118a8a10f7c190069811d","ref":""}]},"link_external":false,"version":"56cca51eca43550b002813fa","childrenPages":[]}

getSubseasons Show

The Show method returns a single Subseason for a given id.

Parameters


Path Params

id:
required
integer

Id of the subseason of interest.

Attributes

Attribute
Type
Notes

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

Standings Type ID Mapping

standing_type_id
name
description
sport_id

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

https://api.sportngin.com/subseasons/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.stage.ngin-staging.com/subseasons/291621"

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
    }
}


{"_id":"56fefa68cd877c0e00a42f22","link_url":"","title":"Events","__v":13,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"excerpt":"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.\n\nA [Game](ref:games-show) holds all pertinent competition-related information for an [Event](https://sportnginv2.readme.io/docs/events) in SportsEngine.  *This is easy to remember: [Games](https://sportnginv2.readme.io/docs/games-show) are really just a _type_ of Event, but _not necessarily the other way around!_*\n\n###Associations\nAn Event belongs to a [Content Node](https://sportnginsite.readme.io/docs/content-node), and can have a [Game](https://sportnginv2.readme.io/docs/games-show), a Dib Item, or a [Survey](https://sportnginv2.readme.io/docs/surveys).\n\nA [Game](ref:games-index) is always paired with an [Event](https://sportnginv2.readme.io/docs/events), and belongs to [Team Instances](https://sportnginv2.readme.io/docs/team-instances-show), [Subseasons](https://sportnginv2.readme.io/docs/subseasons-show).\n\nA [Game](ref:games-show) can have [Scoring Plays](https://sportnginv2.readme.io/docs/scoring-plays), [Posts](https://sportnginsite.readme.io/docs/posts), [Photos](https://sportnginsite.readme.io/docs/photo), [Video](https://sportnginsite.readme.io/docs/video),  [News Articles](https://sportnginsite.readme.io/docs/news-articles), [Game Player Stats](https://sportnginv2.readme.io/docs/game-player-stats), and [Game Team Stats](https://sportnginv2.readme.io/docs/https://sportnginv2.readme.io/docs/game-team-stats).","link_external":false,"createdAt":"2016-04-01T22:47:04.671Z","sync_unique":"","updates":[],"project":"5641217e0ee5370d00da636d","slug":"events","type":"basic","version":"56cca51eca43550b002813fa","category":"56cca51eca43550b00281403","githubsync":"","hidden":false,"parentDoc":null,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"[Games News Articles Create](ref:games-news-articles-create) is used to attach a [News Articles](ref:news-articles) to a [Game](ref:games-index).\"\n}\n[/block]","isReference":true,"order":0,"user":"56cbf1419f4ae20b00644fde","childrenPages":[]}

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.


{"_id":"56cca522ca43550b00281417","body":"","createdAt":"2016-01-14T16:57:11.569Z","isReference":true,"link_url":"","updates":[],"editedParams2":true,"order":1,"project":"5641217e0ee5370d00da636d","sync_unique":"","title":"Events Index","user":"5678311948c8d00d0094b803","__v":5,"githubsync":"","link_external":false,"parentDoc":null,"api":{"params":[{"ref":"","required":true,"desc":"Comma separated list of ids for Subseasons.","default":"","type":"string","name":"subseason_ids","in":"query","_id":"56e9b394c3db7f1900f1a101"},{"type":"int","name":"team_id","in":"query","_id":"56e9b394c3db7f1900f1a100","ref":"","required":true,"desc":"ID of a Team.","default":""},{"type":"string","name":"team_ids","in":"query","_id":"56e9b394c3db7f1900f1a0ff","ref":"","required":true,"desc":"Comma separated list of IDs for Teams.","default":""},{"required":true,"desc":"Id of site events belong to","default":"","type":"int","name":"site_id","in":"query","_id":"5723af6bebe0d70e00131967","ref":""},{"default":"","type":"string","name":"page_node_ids","in":"query","_id":"56e9b394c3db7f1900f1a0fe","ref":"","required":true,"desc":"Comma separated list of IDs for PageNodes."},{"in":"query","_id":"56e9b394c3db7f1900f1a0fd","ref":"","required":false,"desc":"When selecting by team, only select events for the current subseason.","default":"false","type":"boolean","name":"current_subseason_only"},{"ref":"","required":false,"desc":"Start of date range for query.","default":"10 years ago","type":"datetime","name":"start_date","in":"query","_id":"5697d45d3503e40d0061f492"},{"type":"datetime","name":"end_date","in":"query","_id":"5697d45d3503e40d0061f491","ref":"","required":false,"desc":"End of date range for query.","default":"10 years from now"},{"type":"int","name":"page","in":"query","_id":"5697d45d3503e40d0061f494","ref":"","required":false,"desc":"Page of result set.","default":"0"},{"type":"int","name":"limit","in":"query","_id":"5697d45d3503e40d0061f493","ref":"","required":false,"desc":"Size of result set.","default":"100"},{"required":false,"desc":"Direction of sorting. Possible values are asc or desc.","default":"asc","type":"string","name":"sort","in":"query","_id":"56e9b394c3db7f1900f1a0fc","ref":""}],"results":{"codes":[{"name":"Regular Response","code":"{\n    \"events\": [\n        {\n            \"id\": 306927600,\n            \"title\": \"Boston Bears Event\",\n            \"description\": null,\n            \"location\": \"\",\n            \"location_url\": \"\",\n            \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n            \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n            \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n            \"created_on\": \"2016-04-06T11:54:38-07:00\",\n            \"imported_event_flag\": false,\n            \"all_day_event\": false,\n            \"event_type\": null,\n            \"recur_interval\": \"none\",\n            \"recur_interval_value\": null,\n            \"recur_week_sunday\": false,\n            \"recur_week_monday\": false,\n            \"recur_week_tuesday\": false,\n            \"recur_week_wednesday\": false,\n            \"recur_week_thursday\": false,\n            \"recur_week_friday\": false,\n            \"recur_week_saturday\": false,\n            \"recur_month_repeat_by\": null,\n            \"recur_end_date\": null,\n            \"action\": \"_self\",\n            \"protocol\": \"\",\n            \"background_schedule_import_id\": null,\n            \"event_import_id\": null,\n            \"content_node_id\": null,\n            \"ical_feed_id\": null,\n            \"ical_uid\": null,\n            \"layout_template\": \"two_panel\",\n            \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n            \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n            \"local_timezone\": \"US/Central\",\n            \"game_id\": null,\n            \"game\": null,\n            \"has_game\": false,\n            \"comment_element_id\": 288944370,\n            \"recurring_event_originator_id\": null,\n            \"full_location_url\": \"\"\n        },\n        {\n            \"id\": 307398486,\n            \"title\": \"Boston Bears Event\",\n            \"description\": null,\n            \"location\": \"\",\n            \"location_url\": \"\",\n            \"start_date_time\": \"2016-04-07T18:00:00-05:00\",\n            \"end_date_time\": \"2016-04-07T18:00:00-05:00\",\n            \"updated_on\": \"2016-04-07T11:56:17-07:00\",\n            \"created_on\": \"2016-04-07T11:56:17-07:00\",\n            \"imported_event_flag\": false,\n            \"all_day_event\": false,\n            \"event_type\": null,\n            \"recur_interval\": \"none\",\n            \"recur_interval_value\": null,\n            \"recur_week_sunday\": false,\n            \"recur_week_monday\": false,\n            \"recur_week_tuesday\": false,\n            \"recur_week_wednesday\": false,\n            \"recur_week_thursday\": false,\n            \"recur_week_friday\": false,\n            \"recur_week_saturday\": false,\n            \"recur_month_repeat_by\": null,\n            \"recur_end_date\": null,\n            \"action\": \"_self\",\n            \"protocol\": \"\",\n            \"background_schedule_import_id\": null,\n            \"event_import_id\": null,\n            \"content_node_id\": null,\n            \"ical_feed_id\": null,\n            \"ical_uid\": null,\n            \"layout_template\": \"two_panel\",\n            \"utc_start_date_time\": \"2016-04-07T23:00:00-07:00\",\n            \"utc_end_date_time\": \"2016-04-07T23:00:00-07:00\",\n            \"local_timezone\": \"US/Central\",\n            \"game_id\": null,\n            \"game\": null,\n            \"has_game\": false,\n            \"comment_element_id\": 289424103,\n            \"recurring_event_originator_id\": null,\n            \"full_location_url\": \"\"\n        },\n...\n    ],\n    \"more\": true\n}","language":"json","status":200},{"name":"Connections Response","status":200,"language":"json","code":"[\n  {\n    \"id\": 61356511,\n    \"title\": \"2nd Annual \\\"Grow The Game\\\" Night - Black out night\",\n    \"description\": \"<p>Wine tasting, great music, and great Storm friends. Come on out to the 2nd Annual Storm hockey Grow the Game Night. Help raise money for the financial assistance fund while having a great time with great friends.</p>\\n\\n<p>More information will be forthcoming.</p>\\n\",\n    \"location\": \"Location TBD\",\n    \"location_url\": \"\",\n    \"start_date_time\": \"2014-01-31T19:00:00-06:00\",\n    \"end_date_time\": \"2014-01-31T23:00:00-06:00\",\n    \"updated_on\": \"2013-11-24T23:07:39-08:00\",\n    \"created_on\": \"2013-11-24T23:07:38-08:00\",\n    \"imported_event_flag\": false,\n    \"all_day_event\": false,\n    \"event_type\": null,\n    \"recur_interval\": \"none\",\n    \"recur_interval_value\": null,\n    \"recur_week_sunday\": false,\n    \"recur_week_monday\": false,\n    \"recur_week_tuesday\": false,\n    \"recur_week_wednesday\": false,\n    \"recur_week_thursday\": false,\n    \"recur_week_friday\": false,\n    \"recur_week_saturday\": false,\n    \"recur_month_repeat_by\": null,\n    \"recur_end_date\": null,\n    \"action\": \"_self\",\n    \"protocol\": \"\",\n    \"background_schedule_import_id\": null,\n    \"event_import_id\": null,\n    \"content_node_id\": null,\n    \"ical_feed_id\": null,\n    \"ical_uid\": null,\n    \"layout_template\": \"two_panel\",\n    \"utc_start_date_time\": null,\n    \"utc_end_date_time\": null,\n    \"local_timezone\": \"America/Chicago\",\n    \"game_id\": null,\n    \"game\": null,\n    \"has_game\": false,\n    \"comment_element_id\": 37613994,\n    \"recurring_event_originator_id\": null,\n    \"full_location_url\": \"\"\n  },\n  {\n    \"id\": 143333662,\n    \"title\": \"NHL Alumni - Storm End Of Year Bash\",\n    \"description\": \"\",\n    \"location\": \"Parade Ice Gardens\",\n    \"location_url\": \"\",\n    \"start_date_time\": \"2015-03-21T15:00:00-05:00\",\n    \"end_date_time\": \"2015-03-21T18:00:00-05:00\",\n    \"updated_on\": \"2015-02-11T09:34:34-08:00\",\n    \"created_on\": \"2015-02-11T09:34:33-08:00\",\n    \"imported_event_flag\": false,\n    \"all_day_event\": false,\n    \"event_type\": null,\n    \"recur_interval\": \"none\",\n    \"recur_interval_value\": null,\n    \"recur_week_sunday\": false,\n    \"recur_week_monday\": false,\n    \"recur_week_tuesday\": false,\n    \"recur_week_wednesday\": false,\n    \"recur_week_thursday\": false,\n    \"recur_week_friday\": false,\n    \"recur_week_saturday\": false,\n    \"recur_month_repeat_by\": null,\n    \"recur_end_date\": null,\n    \"action\": \"_self\",\n    \"protocol\": \"\",\n    \"background_schedule_import_id\": null,\n    \"event_import_id\": null,\n    \"content_node_id\": 13422056,\n    \"ical_feed_id\": null,\n    \"ical_uid\": null,\n    \"layout_template\": \"two_panel\",\n    \"utc_start_date_time\": null,\n    \"utc_end_date_time\": null,\n    \"local_timezone\": \"America/Chicago\",\n    \"game_id\": null,\n    \"game\": null,\n    \"has_game\": false,\n    \"comment_element_id\": 122435324,\n    \"recurring_event_originator_id\": null,\n    \"full_location_url\": \"\"\n  }\n]"}]},"settings":"","url":"/events","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/events?team_ids=1373611\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events?team_ids=1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/events?team_ids=1373611\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get"},"category":"56cca51eca43550b00281403","editedParams":true,"excerpt":"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.\n\n###Parameters","hidden":false,"slug":"events-index","type":"get","version":"56cca51eca43550b002813fa","childrenPages":[]}

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

subseason_ids:
required
string

Comma separated list of ids for Subseasons.

team_id:
required
integer

ID of a Team.

team_ids:
required
string

Comma separated list of IDs for Teams.

site_id:
required
integer

Id of site events belong to

page_node_ids:
required
string

Comma separated list of IDs for PageNodes.

current_subseason_only:
booleanfalse

When selecting by team, only select events for the current subseason.

start_date:
datetime10 years ago

Start of date range for query.

end_date:
datetime10 years from now

End of date range for query.

page:
integer0

Page of result set.

limit:
integer100

Size of result set.

sort:
stringasc

Direction of sorting. Possible values are asc or desc.

Definition

https://api.sportngin.com/events

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/events?team_ids=1373611"

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
}


{"_id":"56fabadde982ce220059ba8e","api":{"settings":"","url":"/events/:id","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/events/306927600\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events/306927600\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/events/306927600\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"id","ref":"","required":true,"type":"int","in":"path","_id":"56fabaf96c4e0e1900b1d7fe","default":"","desc":"ID of Event"}],"results":{"codes":[{"status":200,"name":"","code":"{\n    \"id\": 306927600,\n    \"title\": \"Boston Bears Event\",\n    \"description\": null,\n    \"location\": \"\",\n    \"location_url\": \"\",\n    \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n    \"created_on\": \"2016-04-06T11:54:38-07:00\",\n    \"imported_event_flag\": false,\n    \"all_day_event\": false,\n    \"event_type\": null,\n    \"recur_interval\": \"none\",\n    \"recur_interval_value\": null,\n    \"recur_week_sunday\": false,\n    \"recur_week_monday\": false,\n    \"recur_week_tuesday\": false,\n    \"recur_week_wednesday\": false,\n    \"recur_week_thursday\": false,\n    \"recur_week_friday\": false,\n    \"recur_week_saturday\": false,\n    \"recur_month_repeat_by\": null,\n    \"recur_end_date\": null,\n    \"action\": \"_self\",\n    \"protocol\": \"\",\n    \"background_schedule_import_id\": null,\n    \"event_import_id\": null,\n    \"content_node_id\": null,\n    \"ical_feed_id\": null,\n    \"ical_uid\": null,\n    \"layout_template\": \"two_panel\",\n    \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"local_timezone\": \"US/Central\",\n    \"game\": null,\n    \"has_game\": false,\n    \"game_id\": null,\n    \"comment_element_id\": 288944370,\n    \"recurring_event_originator_id\": null,\n    \"full_location_url\": \"\"\n}","language":"json"}]}},"createdAt":"2016-03-29T17:26:53.240Z","hidden":false,"githubsync":"","link_url":"","order":2,"parentDoc":null,"project":"5641217e0ee5370d00da636d","__v":2,"category":"56cca51eca43550b00281403","excerpt":"The Show method returns a single Event for a given `id`.\n\n###Parameters","user":"569e96c56b4a2c0d007e9153","isReference":true,"slug":"events-show","editedParams2":true,"link_external":false,"sync_unique":"","title":"Events Show","type":"get","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"title\",\n    \"2-0\": \"description\",\n    \"3-0\": \"location\",\n    \"4-0\": \"location_url\",\n    \"5-0\": \"start_date_time\",\n    \"6-0\": \"end_date_time\",\n    \"7-0\": \"updated_on\",\n    \"8-0\": \"created_on\",\n    \"9-0\": \"imported_event_flag\",\n    \"10-0\": \"all_day_event\",\n    \"11-0\": \"event_type\",\n    \"12-0\": \"recur_interval\",\n    \"13-0\": \"recur_interval_value\",\n    \"14-0\": \"recur_week_sunday\",\n    \"15-0\": \"recur_week_monday\",\n    \"16-0\": \"recur_week_tuesday\",\n    \"17-0\": \"recur_week_wednesday\",\n    \"18-0\": \"recur_week_thursday\",\n    \"19-0\": \"recur_week_friday\",\n    \"20-0\": \"recur_week_saturday\",\n    \"21-0\": \"recur_month_repeat_by\",\n    \"22-0\": \"recur_end_date\",\n    \"23-0\": \"action\",\n    \"24-0\": \"protocol\",\n    \"25-0\": \"background_schedule_import_id\",\n    \"26-0\": \"event_import_id\",\n    \"27-0\": \"content_node_id\",\n    \"28-0\": \"ical_feed_id\",\n    \"29-0\": \"ical_feed_uid\",\n    \"30-0\": \"layout_template\",\n    \"31-0\": \"utc_start_date_time\",\n    \"32-0\": \"utc_end_date_time\",\n    \"33-0\": \"local_timezone\",\n    \"34-0\": \"game\",\n    \"35-0\": \"has_game\",\n    \"36-0\": \"game_id\",\n    \"37-0\": \"comment_element_id\",\n    \"38-0\": \"recurring_event_originator_id\",\n    \"39-0\": \"full_location_url\",\n    \"40-0\": \"permissions\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String\",\n    \"3-1\": \"String\",\n    \"4-1\": \"String\",\n    \"5-1\": \"DateTime\",\n    \"6-1\": \"DateTime\",\n    \"7-1\": \"Timestamp\",\n    \"8-1\": \"Timestamp\",\n    \"9-1\": \"Boolean\",\n    \"10-1\": \"Boolean\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"Integer\",\n    \"14-1\": \"Boolean\",\n    \"15-1\": \"Boolean\",\n    \"16-1\": \"Boolean\",\n    \"17-1\": \"Boolean\",\n    \"18-1\": \"Boolean\",\n    \"19-1\": \"Boolean\",\n    \"20-1\": \"Boolean\",\n    \"21-1\": \"String\",\n    \"22-1\": \"DateTime\",\n    \"23-1\": \"String\",\n    \"24-1\": \"String\",\n    \"25-1\": \"Integer\",\n    \"26-1\": \"Integer\",\n    \"27-1\": \"Integer\",\n    \"28-1\": \"Integer\",\n    \"29-1\": \"String\",\n    \"30-1\": \"String\",\n    \"31-1\": \"DateTime\",\n    \"32-1\": \"DateTime\",\n    \"33-1\": \"String\",\n    \"34-1\": \"Object\",\n    \"35-1\": \"Boolean\",\n    \"36-1\": \"Integer\",\n    \"37-1\": \"Integer\",\n    \"38-1\": \"Integer\",\n    \"39-1\": \"String\",\n    \"40-1\": \"Object\",\n    \"0-2\": \"ID of Event\",\n    \"1-2\": \"Title of Event\",\n    \"2-2\": \"Description of Event\",\n    \"3-2\": \"Location of Event\",\n    \"4-2\": \"URL of Location\",\n    \"5-2\": \"Start of Event\",\n    \"6-2\": \"End of Event\",\n    \"7-2\": \"Timestamp when last updated\",\n    \"8-2\": \"Timestamp when created\",\n    \"9-2\": \"Flag for an imported Event\",\n    \"10-2\": \"Flag for an \\\"all day\\\" Event\",\n    \"11-2\": \"Type of Event\",\n    \"14-2\": \"Repeats on Sunday\",\n    \"15-2\": \"Repeats on Monday\",\n    \"16-2\": \"Repeats on Tuesday\",\n    \"17-2\": \"Repeats on Wednesday\",\n    \"18-2\": \"Repeats on Thursday\",\n    \"19-2\": \"Repeats on Friday\",\n    \"20-2\": \"Repeats on Saturday\",\n    \"36-2\": \"ID of Game\",\n    \"34-2\": \"Game Object\",\n    \"37-2\": \"ID of CommentElement\",\n    \"39-2\": \"Fully constructed location URL\",\n    \"40-2\": \"Update and delete permissions object\",\n    \"35-2\": \"\",\n    \"33-2\": \"Timezone of Event\",\n    \"31-2\": \"start_date_time converted to UTC\",\n    \"32-2\": \"end_date_time converted to UTC\",\n    \"28-2\": \"ID of IcalFeed\",\n    \"29-2\": \"UID for a singular event in an iCal feed\",\n    \"27-2\": \"ID of ContentNode\",\n    \"25-2\": \"ID of BackgroundScheduleImport\",\n    \"12-2\": \"Interval for repeating. Possible values are none, day, week, month, or year.\",\n    \"13-2\": \"Multiplier for recur_interval\",\n    \"21-2\": \"Used if recur_interval is month. Possible values are day_of_month or day_of_week.\",\n    \"22-2\": \"Date when to stop repeating\",\n    \"23-2\": \"Action for location_url. Recommended values are _self and _blank.\",\n    \"24-2\": \"Protocol of location_url. Possible values are http://, https://, or mailto://.\",\n    \"26-2\": \"Used for MaxSolutions\",\n    \"30-2\": \"Layout for content\"\n  },\n  \"cols\": 3,\n  \"rows\": 41\n}\n[/block]","editedParams":true,"updates":[],"version":"56cca51eca43550b002813fa","childrenPages":[]}

getEvents Show

The Show method returns a single Event for a given id.

Parameters


Path Params

id:
required
integer

ID of Event

Attributes

Name
Type
Description

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

https://api.sportngin.com/events/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/events/306927600"

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": ""
}


{"_id":"56e1ba25d2f9771900df1ce1","version":"56cca51eca43550b002813fa","__v":12,"excerpt":"The Create method accepts a single Event (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","isReference":true,"link_url":"","order":3,"slug":"events-create","sync_unique":"","api":{"method":"post","params":[{"_id":"56e1bd624241650e005b7c83","ref":"","in":"body","required":true,"desc":"Title of the Event","default":"","type":"string","name":"title"},{"_id":"56e1bdfa4241650e005b7c85","ref":"","in":"body","required":true,"desc":"Start of Event","default":"","type":"datetime","name":"start_date_time"},{"_id":"56e1be24150ed52d0062c678","ref":"","in":"body","required":false,"desc":"End of Event","default":"start_date_time","type":"datetime","name":"end_date_time"},{"_id":"56e1bdfa4241650e005b7c84","ref":"","in":"body","required":true,"desc":"Array of PageNode IDs to be attached to","default":"","type":"array_int","name":"page_node_ids"},{"_id":"56e1be5bd2f9771900df1cec","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"description"},{"_id":"56e1be5bd2f9771900df1ceb","ref":"","in":"body","required":false,"desc":"Location of Event","default":"","type":"string","name":"location"},{"_id":"56e1be5bd2f9771900df1cea","ref":"","in":"body","required":false,"desc":"URL of Location","default":"","type":"string","name":"location_url"},{"_id":"56e1c12b4241650e005b7c9a","ref":"","in":"body","required":false,"desc":"Protocol of location_url. Possible values are http://, https://, or mailto://.","default":"","type":"string","name":"protocol"},{"_id":"56e1bee336b3bb3400cd0aeb","ref":"","in":"body","required":false,"desc":"","default":"","type":"boolean","name":"all_day_event"},{"_id":"57ea7f161780cd170064f275","ref":"","in":"body","required":false,"desc":"game, practice, etc","default":"","type":"string","name":"event_type"},{"_id":"56e1c0d636b3bb3400cd0af7","ref":"","in":"body","required":false,"desc":"Interval for repeating. Possible values are none, day, week, month, or year.","default":"none","type":"string","name":"recur_interval"},{"_id":"56e1c0d636b3bb3400cd0af6","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"recur_interval_value"},{"_id":"56e1c0d636b3bb3400cd0af5","ref":"","in":"body","required":false,"desc":"Repeats on Sunday","default":"false","type":"boolean","name":"recur_week_sunday"},{"_id":"56e30f646e602e0e00700b27","ref":"","in":"body","required":false,"desc":"Repeats on Monday","default":"false","type":"boolean","name":"recur_week_monday"},{"_id":"56e30f646e602e0e00700b26","ref":"","in":"body","required":false,"desc":"Repeats on Tuesday","default":"false","type":"boolean","name":"recur_week_tuesday"},{"_id":"56e30f646e602e0e00700b25","ref":"","in":"body","required":false,"desc":"Repeats on Wednesday","default":"false","type":"boolean","name":"recur_week_wednesday"},{"_id":"56e30f646e602e0e00700b24","ref":"","in":"body","required":false,"desc":"Repeats on Thursday","default":"false","type":"boolean","name":"recur_week_thursday"},{"_id":"56e30f646e602e0e00700b23","ref":"","in":"body","required":false,"desc":"Repeats on Friday","default":"false","type":"boolean","name":"recur_week_friday"},{"_id":"56e30f646e602e0e00700b22","ref":"","in":"body","required":false,"desc":"Repeats on Saturday","default":"false","type":"boolean","name":"recur_week_saturday"},{"_id":"56e1c0d636b3bb3400cd0af4","ref":"","in":"body","required":false,"desc":"Used if recur_interval is month. Possible values are day_of_month or day_of_week.","default":"","type":"string","name":"recur_month_repeat_by"},{"_id":"56e1c0d636b3bb3400cd0af3","ref":"","in":"body","required":false,"desc":"Date when to stop repeating","default":"","type":"string","name":"recur_end_date"}],"results":{"codes":[{"name":"","code":"{\n    \"id\": 306927600,\n    \"title\": \"Boston Bears Event\",\n    \"description\": null,\n    \"location\": \"\",\n    \"location_url\": \"\",\n    \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n    \"created_on\": \"2016-04-06T11:54:38-07:00\",\n    \"imported_event_flag\": false,\n    \"all_day_event\": false,\n    \"event_type\": null,\n    \"recur_interval\": \"none\",\n    \"recur_interval_value\": null,\n    \"recur_week_sunday\": false,\n    \"recur_week_monday\": false,\n    \"recur_week_tuesday\": false,\n    \"recur_week_wednesday\": false,\n    \"recur_week_thursday\": false,\n    \"recur_week_friday\": false,\n    \"recur_week_saturday\": false,\n    \"recur_month_repeat_by\": null,\n    \"recur_end_date\": null,\n    \"action\": \"_self\",\n    \"protocol\": \"\",\n    \"background_schedule_import_id\": null,\n    \"event_import_id\": null,\n    \"content_node_id\": null,\n    \"ical_feed_id\": null,\n    \"ical_uid\": null,\n    \"layout_template\": \"two_panel\",\n    \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"local_timezone\": \"US/Central\",\n    \"game\": null,\n    \"has_game\": false,\n    \"game_id\": null,\n    \"comment_element_id\": 288944370,\n    \"recurring_event_originator_id\": null,\n    \"full_location_url\": \"\"\n}","language":"json","status":200}]},"settings":"","url":"/events","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"event\": {\n        \"title\": \"Boston Bears Event\",\n        \"page_node_ids\": 2458139,\n        \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n    }\n}' \"https://api.sportngin.com/events\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"event\\\": {\\n        \\\"title\\\": \\\"Boston Bears Event\\\",\\n        \\\"page_node_ids\\\": 2458139,\\n        \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"event\\\": {\\n        \\\"title\\\": \\\"Boston Bears Event\\\",\\n        \\\"page_node_ids\\\": 2458139,\\n        \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/events\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"body":"","createdAt":"2016-03-10T18:17:09.211Z","editedParams":true,"project":"5641217e0ee5370d00da636d","updates":[],"category":"56cca51eca43550b00281403","githubsync":"","link_external":false,"parentDoc":null,"title":"Events Create","editedParams2":true,"hidden":false,"type":"post","user":"569e96c56b4a2c0d007e9153","next":{"description":"","pages":[]},"childrenPages":[]}

postEvents Create

The Create method accepts a single Event (see attributes above) and creates a new record in SportsEngine.

Parameters


Body Params

title:
required
string

Title of the Event

start_date_time:
required
datetime

Start of Event

end_date_time:
datetimestart_date_time

End of Event

page_node_ids:
required
array of integers

Array of PageNode IDs to be attached to

description:
string
location:
string

Location of Event

location_url:
string

URL of Location

protocol:
string

Protocol of location_url. Possible values are http://, https://, or mailto://.

all_day_event:
boolean
event_type:
string

game, practice, etc

recur_interval:
stringnone

Interval for repeating. Possible values are none, day, week, month, or year.

recur_interval_value:
string
recur_week_sunday:
booleanfalse

Repeats on Sunday

recur_week_monday:
booleanfalse

Repeats on Monday

recur_week_tuesday:
booleanfalse

Repeats on Tuesday

recur_week_wednesday:
booleanfalse

Repeats on Wednesday

recur_week_thursday:
booleanfalse

Repeats on Thursday

recur_week_friday:
booleanfalse

Repeats on Friday

recur_week_saturday:
booleanfalse

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:
string

Date when to stop repeating

Definition

https://api.sportngin.com/events

Examples

curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
    "event": {
        "title": "Boston Bears Event",
        "page_node_ids": 2458139,
        "start_date_time": "2016-04-07T10:00:00-5:00"
    }
}' "https://api.sportngin.com/events"

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": ""
}


{"_id":"56fabfac52807c2000b777ea","updates":[],"version":"56cca51eca43550b002813fa","link_url":"","project":"5641217e0ee5370d00da636d","sync_unique":"","type":"put","api":{"url":"/events/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"event\": {\n        \"title\": \"Boston Bears Updated Event\",\n        \"start_date_time\": \"2016-04-07T10:00:00-5:00\"\n    }\n}' \"https://api.sportngin.com/events/306304983\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events/306304983\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"event\\\": {\\n        \\\"title\\\": \\\"Boston Bears Updated Event\\\",\\n        \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"event\\\": {\\n        \\\"title\\\": \\\"Boston Bears Updated Event\\\",\\n        \\\"start_date_time\\\": \\\"2016-04-07T10:00:00-5:00\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/events/306304983\")\n  .put(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"type":"string","in":"body","_id":"56e1bd624241650e005b7c83","default":"","desc":"Title of the Event","name":"title","ref":"","required":false},{"name":"start_date_time","ref":"","required":true,"type":"datetime","in":"body","_id":"56e1bdfa4241650e005b7c85","default":"","desc":"Start of Event"},{"name":"end_date_time","in":"body","_id":"56e1be24150ed52d0062c678","ref":"","required":false,"desc":"End of Event","default":"start_date_time","type":"datetime"},{"ref":"","required":false,"type":"array_int","in":"body","_id":"56e1bdfa4241650e005b7c84","default":"","desc":"Array of PageNode IDs to be attached to","name":"page_node_ids"},{"_id":"56e1be5bd2f9771900df1cec","ref":"","required":false,"desc":"","default":"","type":"string","name":"description","in":"body"},{"_id":"56e1be5bd2f9771900df1ceb","ref":"","required":false,"desc":"Location of Event","default":"","type":"string","name":"location","in":"body"},{"_id":"56e1be5bd2f9771900df1cea","ref":"","required":false,"desc":"Url of Location","default":"","type":"string","name":"location_url","in":"body"},{"in":"body","_id":"56e1c12b4241650e005b7c9a","ref":"","required":false,"desc":"Protocol of location_url. Possible values are http://, https://, or mailto://.","default":"","type":"string","name":"protocol"},{"name":"all_day_event","in":"body","_id":"56e1bee336b3bb3400cd0aeb","ref":"","required":false,"desc":"","default":"","type":"boolean"},{"default":"none","type":"string","name":"recur_interval","in":"body","_id":"56e1c0d636b3bb3400cd0af7","ref":"","required":false,"desc":"Interval for repeating. Possible values are none, day, week, month, or year."},{"in":"body","_id":"56e1c0d636b3bb3400cd0af6","ref":"","required":false,"desc":"","default":"","type":"string","name":"recur_interval_value"},{"ref":"","required":false,"desc":"Repeat on Sunday","default":"false","type":"boolean","name":"recur_week_sunday","in":"body","_id":"56e1c0d636b3bb3400cd0af5"},{"required":false,"desc":"Repeat on Monday","default":"false","type":"boolean","name":"recur_week_monday","in":"body","_id":"56e30f646e602e0e00700b27","ref":""},{"default":"false","type":"boolean","name":"recur_week_tuesday","in":"body","_id":"56e30f646e602e0e00700b26","ref":"","required":false,"desc":"Repeat on Tuesday"},{"in":"body","_id":"56e30f646e602e0e00700b25","ref":"","required":false,"desc":"Repeat on Wednesday","default":"false","type":"boolean","name":"recur_week_wednesday"},{"ref":"","required":false,"desc":"Repeat on Thursday","default":"false","type":"boolean","name":"recur_week_thursday","in":"body","_id":"56e30f646e602e0e00700b24"},{"type":"boolean","name":"recur_week_friday","in":"body","_id":"56e30f646e602e0e00700b23","ref":"","required":false,"desc":"Repeat on Friday","default":"false"},{"required":false,"desc":"Repeat on Saturday","default":"false","type":"boolean","name":"recur_week_saturday","in":"body","_id":"56e30f646e602e0e00700b22","ref":""},{"desc":"Used if recur_interval is month. Possible values are day_of_month or day_of_week.","default":"","type":"string","name":"recur_month_repeat_by","in":"body","_id":"56e1c0d636b3bb3400cd0af4","ref":"","required":false},{"ref":"","required":false,"desc":"Date when to stop repeating","default":"","type":"string","name":"recur_end_date","in":"body","_id":"56e1c0d636b3bb3400cd0af3"}],"results":{"codes":[{"name":"","code":"{\n    \"id\": 306304983,\n    \"title\": \"Boston Bears Updated Event\",\n    \"description\": null,\n    \"location\": \"\",\n    \"location_url\": \"\",\n    \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"updated_on\": \"2016-04-07T09:44:37-07:00\",\n    \"created_on\": \"2016-04-07T09:43:19-07:00\",\n    \"imported_event_flag\": false,\n    \"all_day_event\": false,\n    \"event_type\": null,\n    \"recur_interval\": \"none\",\n    \"recur_interval_value\": null,\n    \"recur_week_sunday\": false,\n    \"recur_week_monday\": false,\n    \"recur_week_tuesday\": false,\n    \"recur_week_wednesday\": false,\n    \"recur_week_thursday\": false,\n    \"recur_week_friday\": false,\n    \"recur_week_saturday\": false,\n    \"recur_month_repeat_by\": null,\n    \"recur_end_date\": null,\n    \"action\": \"_self\",\n    \"protocol\": \"\",\n    \"background_schedule_import_id\": null,\n    \"event_import_id\": null,\n    \"content_node_id\": null,\n    \"ical_feed_id\": null,\n    \"ical_uid\": null,\n    \"layout_template\": \"two_panel\",\n    \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"local_timezone\": \"US/Central\",\n    \"game\": null,\n    \"has_game\": false,\n    \"game_id\": null,\n    \"comment_element_id\": 288311109,\n    \"recurring_event_originator_id\": null,\n    \"full_location_url\": \"\"\n}","language":"json","status":200}]},"settings":""},"category":"56cca51eca43550b00281403","link_external":false,"title":"Events Update","user":"569e96c56b4a2c0d007e9153","__v":0,"body":"","createdAt":"2016-03-29T17:47:24.032Z","hidden":false,"slug":"events-update","order":4,"parentDoc":null,"editedParams":true,"editedParams2":true,"excerpt":"The Update method accepts a single Event (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","githubsync":"","isReference":true,"childrenPages":[]}

putEvents Update

The Update method accepts a single Event (see attributes above) and updates the matching record in SportsEngine.

Parameters


Body Params

title:
string

Title of the Event

start_date_time:
required
datetime

Start of Event

end_date_time:
datetimestart_date_time

End of Event

page_node_ids:
array of integers

Array of PageNode IDs to be attached to

description:
string
location:
string

Location of Event

location_url:
string

Url of Location

protocol:
string

Protocol of location_url. Possible values are http://, https://, or mailto://.

all_day_event:
boolean
recur_interval:
stringnone

Interval for repeating. Possible values are none, day, week, month, or year.

recur_interval_value:
string
recur_week_sunday:
booleanfalse

Repeat on Sunday

recur_week_monday:
booleanfalse

Repeat on Monday

recur_week_tuesday:
booleanfalse

Repeat on Tuesday

recur_week_wednesday:
booleanfalse

Repeat on Wednesday

recur_week_thursday:
booleanfalse

Repeat on Thursday

recur_week_friday:
booleanfalse

Repeat on Friday

recur_week_saturday:
booleanfalse

Repeat 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:
string

Date when to stop repeating

Definition

https://api.sportngin.com/events/:id

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": ""
}


{"_id":"56fac0f31770652b003633f4","hidden":false,"link_external":false,"link_url":"","version":"56cca51eca43550b002813fa","githubsync":"","createdAt":"2016-03-29T17:52:51.792Z","editedParams":true,"excerpt":"The Delete method permanently deletes the associated Event record in SportsEngine.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","title":"Events Delete","type":"delete","user":"569e96c56b4a2c0d007e9153","category":"56cca51eca43550b00281403","isReference":true,"project":"5641217e0ee5370d00da636d","slug":"events-delete","sync_unique":"","api":{"examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" \"https://api.sportngin.com/events/306927600\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/events/306927600\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/events/306927600\")\n  .delete(null)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"in":"path","_id":"56fac1316c4e0e1900b1d80f","ref":"","required":true,"desc":"Id of Event","default":"","type":"int","name":"id"}],"results":{"codes":[{"language":"json","status":200,"code":"{\n    \"id\": 306927600,\n    \"title\": \"Boston Bears Event\",\n    \"description\": null,\n    \"location\": \"\",\n    \"location_url\": \"\",\n    \"start_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"end_date_time\": \"2016-04-07T10:00:00-05:00\",\n    \"updated_on\": \"2016-04-06T11:54:38-07:00\",\n    \"created_on\": \"2016-04-06T11:54:38-07:00\",\n    \"imported_event_flag\": false,\n    \"all_day_event\": false,\n    \"event_type\": null,\n    \"recur_interval\": \"none\",\n    \"recur_interval_value\": null,\n    \"recur_week_sunday\": false,\n    \"recur_week_monday\": false,\n    \"recur_week_tuesday\": false,\n    \"recur_week_wednesday\": false,\n    \"recur_week_thursday\": false,\n    \"recur_week_friday\": false,\n    \"recur_week_saturday\": false,\n    \"recur_month_repeat_by\": null,\n    \"recur_end_date\": null,\n    \"action\": \"_self\",\n    \"protocol\": \"\",\n    \"background_schedule_import_id\": null,\n    \"event_import_id\": null,\n    \"content_node_id\": null,\n    \"ical_feed_id\": null,\n    \"ical_uid\": null,\n    \"layout_template\": \"two_panel\",\n    \"utc_start_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"utc_end_date_time\": \"2016-04-07T15:00:00-07:00\",\n    \"local_timezone\": \"US/Central\",\n    \"game\": null,\n    \"has_game\": false,\n    \"game_id\": null,\n    \"comment_element_id\": 288944370,\n    \"recurring_event_originator_id\": null,\n    \"full_location_url\": \"\"\n}"}]},"settings":"","url":"/events/:id","auth":"required"},"body":"","editedParams2":true,"order":5,"parentDoc":null,"updates":[],"__v":3,"childrenPages":[]}

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:
required
integer

Id of Event

Definition

https://api.sportngin.com/events/:id

Examples

curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" "https://api.sportngin.com/events/306927600"

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": ""
}


{"_id":"56f18cc09791b22d0077b9ea","link_url":"","parentDoc":null,"sync_unique":"","type":"get","updates":[],"user":"56e71f9edee212320019e731","category":"56cca51eca43550b00281403","editedParams":true,"version":"56cca51eca43550b002813fa","excerpt":"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`.\n\nOptional parameters include: `before` (inclusive, formatted mm-dd-yyyy), `after` (inclusive, formattted mm-dd-yyyy), `today`, and `filters`.\n\n###Parameters","isReference":true,"order":6,"project":"5641217e0ee5370d00da636d","title":"Games Index","__v":2,"createdAt":"2016-03-22T18:19:44.358Z","editedParams2":true,"slug":"games-index","api":{"results":{"codes":[{"language":"json","code":"[\n    {\n        \"id\": 13557129,\n        \"team_1_id\": 1876243,\n        \"team_1_is_home\": true,\n        \"team_2_id\": 1876249,\n        \"team_2_name\": null,\n        \"subseason_id\": 291621,\n        \"event_id\": 307388787,\n        \"status\": \"scheduled\",\n        \"affects_standings\": 1,\n        \"referee_signoff\": null,\n        \"notes\": null,\n        \"submitted_on\": null,\n        \"created_at\": \"2016-04-07T11:11:20-07:00\",\n        \"updated_at\": \"2016-04-07T11:11:27-07:00\",\n        \"properties\": {\n            \"added_periods\": null,\n            \"my_num_non_overtime_periods\": null,\n            \"my_num_periods\": null,\n            \"overtime_intervals\": 2,\n            \"overtime_length\": \"5\",\n            \"quick_score_overtime\": false,\n            \"quick_score_shootout\": false,\n            \"regulation_time_intervals\": [\n                \"20\",\n                \"20\",\n                \"20\"\n            ],\n            \"shootout_enabled\": false,\n            \"time_interval_name\": \"period\",\n            \"time_intervals\": [\n                \"20\",\n                \"20\",\n                \"20\"\n            ]\n        },\n        \"enable_live_webcast\": true,\n        \"original_scorer_id\": null,\n        \"last_editor_id\": null,\n        \"image_id\": null,\n        \"sport_id\": 1,\n        \"game_id\": null,\n        \"embed_code\": null,\n        \"quick_score_id\": null,\n        \"extra_game_details_id\": 11352836,\n        \"scoring_type\": \"unscored\",\n        \"live_scoring_locked\": null,\n        \"division_override\": null,\n        \"field_of_play_enabled\": false,\n        \"game_stats_updated_at\": null,\n        \"team_1_division_id\": null,\n        \"team_2_division_id\": null,\n        \"home_team_id\": 1876243,\n        \"away_team_id\": 1876249,\n        \"home_team_name\": \"Boston Bears\",\n        \"home_team_abbrev\": \"Bos\",\n        \"home_team_button_title\": \"Boston\",\n        \"away_team_name\": \"Detroit Cyclists\",\n        \"away_team_abbrev\": \"Det\",\n        \"away_team_button_title\": \"Detroit\",\n        \"home_team_logo\": null,\n        \"away_team_logo\": null,\n        \"home_team_logo_large_square\": null,\n        \"away_team_logo_large_square\": null,\n        \"current_period\": 0,\n        \"time_remaining\": null,\n        \"score_by_time_interval\": [\n            \"scheduled\"\n        ],\n        \"home_team_score_api\": 0,\n        \"away_team_score_api\": 0,\n        \"comment_element_id\": 289413351,\n        \"total_interval_count\": 0,\n        \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557129?subseason=291621\",\n        \"start_date_time\": \"2016-04-28T13:15:00-05:00\",\n        \"end_date_time\": \"2016-04-28T13:15:00-05:00\",\n        \"location\": \"Joe Louis Arena\",\n        \"overtime_game\": false,\n        \"half_point_scorable\": false,\n        \"local_timezone\": \"US/Central\"\n    },\n    {\n        \"id\": 13557134,\n        \"team_1_id\": 1876243,\n        \"team_1_is_home\": true,\n        \"team_2_id\": 1876249,\n        \"team_2_name\": null,\n        \"subseason_id\": 291621,\n        \"event_id\": 307389556,\n        \"status\": \"scheduled\",\n        \"affects_standings\": 1,\n        \"referee_signoff\": null,\n        \"notes\": null,\n        \"submitted_on\": null,\n        \"created_at\": \"2016-04-07T11:12:41-07:00\",\n        \"updated_at\": \"2016-04-07T11:17:20-07:00\",\n        \"properties\": {\n            \"added_periods\": null,\n            \"my_num_non_overtime_periods\": null,\n            \"my_num_periods\": null,\n            \"overtime_intervals\": 2,\n            \"overtime_length\": \"5\",\n            \"quick_score_overtime\": false,\n            \"quick_score_shootout\": false,\n            \"regulation_time_intervals\": [\n                \"20\",\n                \"20\",\n                \"20\"\n            ],\n            \"shootout_enabled\": false,\n            \"time_interval_name\": \"period\",\n            \"time_intervals\": [\n                \"20\",\n                \"20\",\n                \"20\"\n            ]\n        },\n        \"enable_live_webcast\": true,\n        \"original_scorer_id\": null,\n        \"last_editor_id\": null,\n        \"image_id\": null,\n        \"sport_id\": 1,\n        \"game_id\": null,\n        \"embed_code\": null,\n        \"quick_score_id\": null,\n        \"extra_game_details_id\": 11352841,\n        \"scoring_type\": \"unscored\",\n        \"live_scoring_locked\": null,\n        \"division_override\": null,\n        \"field_of_play_enabled\": false,\n        \"game_stats_updated_at\": null,\n        \"team_1_division_id\": null,\n        \"team_2_division_id\": null,\n        \"home_team_id\": 1876243,\n        \"away_team_id\": 1876249,\n        \"home_team_name\": \"Boston Bears\",\n        \"home_team_abbrev\": \"Bos\",\n        \"home_team_button_title\": \"Boston\",\n        \"away_team_name\": \"Detroit Cyclists\",\n        \"away_team_abbrev\": \"Det\",\n        \"away_team_button_title\": \"Detroit\",\n        \"home_team_logo\": null,\n        \"away_team_logo\": null,\n        \"home_team_logo_large_square\": null,\n        \"away_team_logo_large_square\": null,\n        \"current_period\": 0,\n        \"time_remaining\": null,\n        \"score_by_time_interval\": [\n            \"scheduled\"\n        ],\n        \"home_team_score_api\": 0,\n        \"away_team_score_api\": 0,\n        \"comment_element_id\": 289414128,\n        \"total_interval_count\": 0,\n        \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n        \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n        \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n        \"location\": \"TD Garden\",\n        \"overtime_game\": false,\n        \"half_point_scorable\": false,\n        \"local_timezone\": \"US/Central\"\n    }\n]","name":"","status":200}]},"settings":"","url":"/games","auth":"required","examples":{"codes":[{"name":"cURL","code":"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\"","language":"curl"},{"name":null,"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games?subseason_id=291621&page=1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games?subseason_id=291621&page=1\")\n  .get()\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - with filters","language":"curl","code":"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&filters[rules][][field]=updated_at&filters[rules][][operator]=gt&filters[rules][][value]=2015-12-04%2006:53:05\""},{"name":"Ruby - with filters","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games?subseason_id=291621&page=1&filters%5Brules%5D%5B%5D%5Bfield%5D=updated_at&filters%5Brules%5D%5B%5D%5Boperator%5D=gt&filters%5Brules%5D%5B%5D%5Bvalue%5D=2015-12-04%252006%3A53%3A05\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java  - with filters","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games?subseason_id=291621&page=1&filters%5Brules%5D%5B%5D%5Bfield%5D=updated_at&filters%5Brules%5D%5B%5D%5Boperator%5D=gt&filters%5Brules%5D%5B%5D%5Bvalue%5D=2015-12-04%252006%3A53%3A05\")\n  .get()\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"in":"query","_id":"56f18cc09791b22d0077b9ee","ref":"","required":true,"desc":"Page of results to display","default":"","type":"int","name":"page"},{"name":"subseason_id","in":"query","_id":"56f18cc09791b22d0077b9ed","ref":"","required":false,"desc":"","default":"","type":"int"},{"default":"","type":"int","name":"divison_instance_id","in":"query","_id":"56f18cc09791b22d0077b9ec","ref":"","required":false,"desc":""},{"in":"query","_id":"56f18cc09791b22d0077b9eb","ref":"","required":false,"desc":"","default":"","type":"int","name":"team_instance_id"},{"name":"per_page","in":"query","_id":"56f2f32aa0de870e003b6d73","ref":"","required":false,"desc":"Number of results to display per page","default":"100","type":"int"},{"default":"","type":"string","name":"ext_game_id","in":"query","_id":"56f2f3a6c6d9e30e00590507","ref":"","required":false,"desc":""},{"in":"query","_id":"56f2f3a6c6d9e30e00590506","ref":"","required":false,"desc":"","default":"","type":"int","name":"game_ids"},{"name":"season_id","in":"query","_id":"56f2f3a6c6d9e30e00590505","ref":"","required":false,"desc":"","default":"","type":"int"}]},"body":"","hidden":false,"link_external":false,"githubsync":"","childrenPages":[]}

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:
required
integer

Page of results to display

subseason_id:
integer
divison_instance_id:
integer
team_instance_id:
integer
per_page:
integer100

Number of results to display per page

ext_game_id:
string
game_ids:
integer
season_id:
integer

Definition

https://api.sportngin.com/games

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"
    }
]


{"_id":"56f18a0b4476fb2200795e11","category":"56cca51eca43550b00281403","slug":"games-show","title":"Games Show","type":"get","__v":0,"editedParams2":true,"link_url":"","order":7,"sync_unique":"","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"sport_id\",\n    \"2-0\": \"status\",\n    \"3-0\": \"subseason_id\",\n    \"4-0\": \"team_1_id\",\n    \"5-0\": \"team_2_id\",\n    \"6-0\": \"start_date_time\",\n    \"7-0\": \"end_date_time\",\n    \"8-0\": \"home_team_id\",\n    \"9-0\": \"away_team_id\",\n    \"10-0\": \"team_1_is_home\",\n    \"11-0\": \"location\",\n    \"12-0\": \"location_url_protocol\",\n    \"13-0\": \"location_url\",\n    \"14-0\": \"description\",\n    \"16-0\": \"notes\",\n    \"18-0\": \"properties\",\n    \"22-0\": \"officials\",\n    \"23-0\": \"extra_game_details\",\n    \"24-0\": \"affects_standings\",\n    \"25-0\": \"created_at\",\n    \"26-0\": \"updated_at\",\n    \"27-0\": \"time_remaining\",\n    \"28-0\": \"currernt_period\",\n    \"29-0\": \"score_by_time_interval\",\n    \"30-0\": \"home_team_name\",\n    \"33-0\": \"home_team_logo\",\n    \"35-0\": \"home_team_score_api\",\n    \"36-0\": \"away_team_name\",\n    \"39-0\": \"away_team_logo\",\n    \"41-0\": \"away_team_score_api\",\n    \"42-0\": \"scoring_type\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"Integer\",\n    \"2-1\": \"String\",\n    \"3-1\": \"Integer\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"ID of Team 1 instance: set as home by default\",\n    \"5-1\": \"Integer\",\n    \"6-1\": \"Datetime\",\n    \"7-1\": \"Datetime\",\n    \"8-1\": \"Integer\",\n    \"9-1\": \"Integer\",\n    \"10-1\": \"Boolean\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"String\",\n    \"14-1\": \"String\",\n    \"16-1\": \"String\",\n    \"18-1\": \"Object\",\n    \"22-1\": \"Array\",\n    \"23-1\": \"Object\",\n    \"24-1\": \"Boolean\",\n    \"25-1\": \"Timestamp\",\n    \"26-1\": \"Timestamp\",\n    \"27-1\": \"Time\",\n    \"28-1\": \"Integer\",\n    \"29-1\": \"Array\",\n    \"30-1\": \"String\",\n    \"33-1\": \"String\",\n    \"35-1\": \"Integer\",\n    \"36-1\": \"String\",\n    \"36-2\": \"Name of the away team\",\n    \"39-1\": \"String\",\n    \"41-1\": \"Integer\",\n    \"42-1\": \"String\",\n    \"0-2\": \"Unique ID assigned by NGIN\",\n    \"1-2\": \"ID of the game's sport\",\n    \"2-2\": \"The status of the game (unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, delayed)\",\n    \"3-2\": \"ID of subseason assigned by NGIN\",\n    \"5-2\": \"ID of Team 2 instance: set as away by default\",\n    \"6-2\": \"Timestamp of the start time of the game\",\n    \"7-2\": \"Timestamp of the end time of the game: derived from start time if not passed\",\n    \"8-2\": \"ID of the home team_instance: can be used in place of team_#_id once game exists\",\n    \"9-2\": \"ID of the away team_instance: can be used in place of team_#_id once game exists\",\n    \"10-2\": \"Defaults to true: false will set team_2 as home\",\n    \"11-2\": \"Description of the location of the game\",\n    \"12-2\": \"HTTP protocol of the location_url\",\n    \"13-2\": \"URL for the location (excludes http protocol)\",\n    \"14-2\": \"Description of the game\",\n    \"16-2\": \"Extra notes and information for the game\",\n    \"18-2\": \"Additional properties for the game\",\n    \"22-2\": \"Officials for the game\",\n    \"23-2\": \"Extra information about the game\",\n    \"24-2\": \"Whether or not the game affects the teams' standings\",\n    \"25-2\": \"Timestamp of creation date\",\n    \"26-2\": \"Timestamp of last update\",\n    \"27-2\": \"Derived field. Remaining time of a game\",\n    \"28-2\": \"Derived field. Current period of a game\",\n    \"29-2\": \"Derived field. Scores by game periods\",\n    \"30-2\": \"Name of the home team\",\n    \"33-2\": \"Image url of the home team\",\n    \"35-2\": \"Read only - use the Quick Score API to update final game scores\",\n    \"39-2\": \"Image url of the away team\",\n    \"41-2\": \"Read only - use the Quick Score API to update final game scores\",\n    \"42-2\": \"Possible values are quick, tabular, live, unscored\",\n    \"31-0\": \"home_team_abbrev\",\n    \"32-0\": \"home_team_button_title\",\n    \"34-0\": \"home_team_logo_large_square\",\n    \"40-0\": \"away_team_logo_large_square\",\n    \"37-0\": \"away_team_abbrev\",\n    \"38-0\": \"away_team_button_title\",\n    \"31-1\": \"String\",\n    \"32-1\": \"String\",\n    \"34-1\": \"String\",\n    \"37-1\": \"String\",\n    \"38-1\": \"String\",\n    \"40-1\": \"String\",\n    \"31-2\": \"Abbreviation of the home team\",\n    \"37-2\": \"Abbreviation of the away team\",\n    \"32-2\": \"Button title of the home team\",\n    \"38-2\": \"Button title of the away team\",\n    \"34-2\": \"URL of large square image of the home team\",\n    \"40-2\": \"Url of large square image of the away team\",\n    \"54-0\": \"local_timezone\",\n    \"54-1\": \"String\",\n    \"54-2\": \"Timezone of the Game\",\n    \"53-0\": \"half_point_scorable\",\n    \"52-0\": \"overtime_game\",\n    \"51-0\": \"game_show_url\",\n    \"50-0\": \"total_interval_count\",\n    \"49-0\": \"comment_element_id\",\n    \"47-0\": \"team_1_division_id\",\n    \"48-0\": \"team_2_division_id\",\n    \"46-0\": \"game_stats_updated_at\",\n    \"45-0\": \"field_of_play_enabled\",\n    \"44-0\": \"division_override\",\n    \"43-0\": \"live_scoring_locked\",\n    \"17-0\": \"submitted_on\",\n    \"15-0\": \"referee_signoff\",\n    \"19-0\": \"image_id\",\n    \"20-0\": \"game_id\",\n    \"21-0\": \"embed_code\",\n    \"44-2\": \"Force division game\",\n    \"44-1\": \"Boolean\",\n    \"43-1\": \"Boolean\",\n    \"45-1\": \"Boolean\",\n    \"46-1\": \"Timestamp\",\n    \"46-2\": \"Timestamp when the game stats were last updated\",\n    \"47-1\": \"Integer\",\n    \"48-1\": \"Integer\",\n    \"49-1\": \"Integer\",\n    \"49-2\": \"Id of CommentElement\",\n    \"50-1\": \"Integer\",\n    \"51-1\": \"String\",\n    \"53-1\": \"Boolean\",\n    \"52-1\": \"Boolean\",\n    \"52-2\": \"Determines if this game went into overtime\",\n    \"51-2\": \"Url to the game page\",\n    \"50-2\": \"Number of periods or quarters\",\n    \"53-2\": \"Determines if half-points are allowed when scoring\",\n    \"47-2\": \"Scope available teams on a TBD game for team_1\",\n    \"48-2\": \"Scope available teams on a TBD game for team_2\",\n    \"43-2\": \"Can't live score if locked\",\n    \"55-0\": \"live_scoring_url\",\n    \"55-1\": \"String\",\n    \"55-2\": \"Url to live-score the game\",\n    \"45-2\": \"Display field on game show page\",\n    \"19-2\": \"ID of Image\",\n    \"20-2\": \"ID of Game for other team\",\n    \"21-2\": \"Custom code that goes on the game show page\",\n    \"19-1\": \"Integer\",\n    \"20-1\": \"Integer\",\n    \"21-1\": \"String\",\n    \"17-1\": \"Timestamp\",\n    \"17-2\": \"Timestamp when the game is first saved in completed status\",\n    \"15-1\": \"String\",\n    \"15-2\": \"Text that represents an Official signing off on the game\"\n  },\n  \"cols\": 3,\n  \"rows\": 56\n}\n[/block]\n###Official Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"name\",\n    \"2-0\": \"official_type_id\",\n    \"3-0\": \"created_at\",\n    \"4-0\": \"updated_at\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"String\",\n    \"2-1\": \"Integer\",\n    \"3-1\": \"Datetime\",\n    \"4-1\": \"Datetime\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-2\": \"Name of the official\",\n    \"2-2\": \"id of the type of official\",\n    \"3-2\": \"Timestamp of creation date\",\n    \"4-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n###Extra Game Details Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"1-0\": \"ext_game_id\",\n    \"2-0\": \"weather_conditions\",\n    \"3-0\": \"wind_speed\",\n    \"4-0\": \"wind_speed_units\",\n    \"5-0\": \"wind_direction\",\n    \"6-0\": \"temperature\",\n    \"7-0\": \"temperature_units\",\n    \"8-0\": \"attendance\",\n    \"9-0\": \"sellout\",\n    \"10-0\": \"night_game\",\n    \"11-0\": \"neutral_field\",\n    \"12-0\": \"natural_surface\",\n    \"13-0\": \"created_at\",\n    \"14-0\": \"updated_at\",\n    \"0-1\": \"Integer\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String\",\n    \"3-1\": \"Integer\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"6-1\": \"Integer\",\n    \"7-1\": \"String\",\n    \"8-1\": \"Integer\",\n    \"9-1\": \"Boolean\",\n    \"10-1\": \"Boolean\",\n    \"11-1\": \"Boolean\",\n    \"12-1\": \"Boolean\",\n    \"13-1\": \"Datetime\",\n    \"14-1\": \"Datetime\",\n    \"0-2\": \"Unique id assigned by NGIN\",\n    \"1-2\": \"User specified game id number\",\n    \"2-2\": \"Description of the weather conditions for the game\",\n    \"3-2\": \"Wind speed for the game\",\n    \"4-2\": \"Units the wind speed is measured in\",\n    \"5-2\": \"Direction the wind was blowing during the game\",\n    \"6-2\": \"Temperature during the game\",\n    \"7-2\": \"Units the temperature is measured in\",\n    \"8-2\": \"Number of spectators attending the game\",\n    \"9-2\": \"Whether or not the game sold out\",\n    \"10-2\": \"Whether or not the game was played at night\",\n    \"11-2\": \"Whether or not the game was played on a neutral field\",\n    \"12-2\": \"Whether or not the game was played on a natural surface\",\n    \"13-2\": \"Timestamp of creation date\",\n    \"14-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]","api":{"settings":"","url":"/games/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" \"https://api.sportngin.com/games/13557134\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games/13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games/13557134\")\n  .get()\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"ref":"","required":true,"type":"int","in":"path","_id":"56f18a0b4476fb2200795e12","default":"","desc":"","name":"id"}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 13557134,\n    \"team_1_id\": 1876243,\n    \"team_1_is_home\": true,\n    \"team_2_id\": 1876249,\n    \"team_2_name\": null,\n    \"subseason_id\": 291621,\n    \"event_id\": 307389556,\n    \"status\": \"scheduled\",\n    \"affects_standings\": 1,\n    \"referee_signoff\": null,\n    \"notes\": null,\n    \"submitted_on\": null,\n    \"created_at\": \"2016-04-07T11:12:41-07:00\",\n    \"updated_at\": \"2016-04-07T11:17:20-07:00\",\n    \"properties\": {\n        \"added_periods\": null,\n        \"my_num_non_overtime_periods\": null,\n        \"my_num_periods\": null,\n        \"overtime_intervals\": 2,\n        \"overtime_length\": \"5\",\n        \"quick_score_overtime\": false,\n        \"quick_score_shootout\": false,\n        \"regulation_time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ],\n        \"shootout_enabled\": false,\n        \"time_interval_name\": \"period\",\n        \"time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ]\n    },\n    \"enable_live_webcast\": true,\n    \"original_scorer_id\": null,\n    \"last_editor_id\": null,\n    \"image_id\": null,\n    \"sport_id\": 1,\n    \"game_id\": null,\n    \"embed_code\": null,\n    \"quick_score_id\": null,\n    \"extra_game_details_id\": 11352841,\n    \"scoring_type\": \"unscored\",\n    \"live_scoring_locked\": null,\n    \"division_override\": null,\n    \"field_of_play_enabled\": false,\n    \"game_stats_updated_at\": null,\n    \"team_1_division_id\": null,\n    \"team_2_division_id\": null,\n    \"home_team_id\": 1876243,\n    \"away_team_id\": 1876249,\n    \"home_team_name\": \"Boston Bears\",\n    \"home_team_abbrev\": \"Bos\",\n    \"home_team_button_title\": \"Boston\",\n    \"away_team_name\": \"Detroit Cyclists\",\n    \"away_team_abbrev\": \"Det\",\n    \"away_team_button_title\": \"Detroit\",\n    \"home_team_logo\": null,\n    \"away_team_logo\": null,\n    \"home_team_logo_large_square\": null,\n    \"away_team_logo_large_square\": null,\n    \"current_period\": 0,\n    \"time_remaining\": null,\n    \"score_by_time_interval\": [\n        \"scheduled\"\n    ],\n    \"home_team_score_api\": 0,\n    \"away_team_score_api\": 0,\n    \"comment_element_id\": 289414128,\n    \"total_interval_count\": 0,\n    \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n    \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"location\": \"TD Garden\",\n    \"overtime_game\": false,\n    \"half_point_scorable\": false,\n    \"local_timezone\": \"US/Central\",\n    \"permissions\": {\n        \"score\": true\n    },\n    \"live_scoring_url\": \"https://live.sportngin.com/live/ice_hockey/13557134?auth_token=CM9Vq15fC7JxyEwgmxs3\"\n}","name":"","status":200}]}},"createdAt":"2016-03-22T18:08:11.407Z","editedParams":true,"excerpt":"The Show method returns a single Game for a given `id`.\n\n###Parameters","githubsync":"","hidden":false,"isReference":true,"project":"5641217e0ee5370d00da636d","updates":[],"user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","parentDoc":null,"link_external":false,"childrenPages":[]}

getGames Show

The Show method returns a single Game for a given id.

Parameters


Path Params

id:
required
integer

Attributes

Name
Type
Description

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

Official Attributes

Name
Type
Description

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

Extra Game Details Attributes

Name
Type
Description

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

https://api.sportngin.com/games/:id

Examples

curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/games/13557134"

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"
}


{"_id":"56e9c1f6c3db7f1900f1a134","user":"569e96c56b4a2c0d007e9153","version":"56cca51eca43550b002813fa","createdAt":"2016-03-16T20:28:38.391Z","editedParams":true,"isReference":true,"parentDoc":null,"project":"5641217e0ee5370d00da636d","api":{"auth":"required","examples":{"codes":[{"code":"curl -X POST -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -d '{\n    \"game\": {\n        \"team_1_id\": \"1876243\",\n        \"team_2_id\": \"1876249\",\n        \"subseason_id\": \"291621\",\n        \"sport_id\": \"1\",\n        \"status\": \"scheduled\",\n        \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n        \"team_1_is_home\": \"true\",\n        \"location\": \"Joe Louis Arena\"\n    }\n}' \"https://api.sportngin.com/games\"","language":"curl","name":null},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACEESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"game\\\": {\\n        \\\"team_1_id\\\": \\\"1876243\\\",\\n        \\\"team_2_id\\\": \\\"1876249\\\",\\n        \\\"subseason_id\\\": \\\"291621\\\",\\n        \\\"sport_id\\\": \\\"1\\\",\\n        \\\"status\\\": \\\"scheduled\\\",\\n        \\\"start_date_time\\\": \\\"2016-04-28T14:15:00-05:00\\\",\\n        \\\"team_1_is_home\\\": \\\"true\\\",\\n        \\\"location\\\": \\\"Joe Louis Arena\\\"\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"game\\\": {\\n        \\\"team_1_id\\\": \\\"1876243\\\",\\n        \\\"team_2_id\\\": \\\"1876249\\\",\\n        \\\"subseason_id\\\": \\\"291621\\\",\\n        \\\"sport_id\\\": \\\"1\\\",\\n        \\\"status\\\": \\\"scheduled\\\",\\n        \\\"start_date_time\\\": \\\"2016-04-28T14:15:00-05:00\\\",\\n        \\\"team_1_is_home\\\": \\\"true\\\",\\n        \\\"location\\\": \\\"Joe Louis Arena\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games\")\n  .post(body)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - no_team_2_id","language":"curl","code":"curl -X POST -H \"NGIN-API-VERSION: 0.1\" -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -d '{\n    \"game\": {\n        \"team_1_id\": 1876284,\n        \"team_2_id\": 0,\n        \"team_2_name\": \"The Firemen\",\n        \"subseason_id\": 291622,\n        \"sport_id\": 1,\n        \"status\": \"scheduled\",\n        \"start_date_time\": \"2016-04-28T18:00:000-05:00\",\n        \"team_1_is_home\": true,\n        \"location\": \"Sport Ngin Ice Arena\"\n    }\n}' \"https://api.sportngin.com/games\""},{"name":"Ruby - no team_2_id","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"accept\"] = 'application/json'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest.body = \"{\\n    \\\"game\\\": {\\n        \\\"team_1_id\\\": 1876284,\\n        \\\"team_2_id\\\": 0,\\n        \\\"team_2_name\\\": \\\"The Firemen\\\",\\n        \\\"subseason_id\\\": 291622,\\n        \\\"sport_id\\\": 1,\\n        \\\"status\\\": \\\"scheduled\\\",\\n        \\\"start_date_time\\\": \\\"2016-04-28T18:00:000-05:00\\\",\\n        \\\"team_1_is_home\\\": true,\\n        \\\"location\\\": \\\"Sport Ngin Ice Arena\\\"\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java - no team_2_id","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"game\\\": {\\n        \\\"team_1_id\\\": 1876284,\\n        \\\"team_2_id\\\": 0,\\n        \\\"team_2_name\\\": \\\"The Firemen\\\",\\n        \\\"subseason_id\\\": 291622,\\n        \\\"sport_id\\\": 1,\\n        \\\"status\\\": \\\"scheduled\\\",\\n        \\\"start_date_time\\\": \\\"2016-04-28T18:00:000-05:00\\\",\\n        \\\"team_1_is_home\\\": true,\\n        \\\"location\\\": \\\"Sport Ngin Ice Arena\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games\")\n  .post(body)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post","params":[{"desc":"Id of a TeamInstance","default":"","type":"int","name":"team_1_id","in":"body","_id":"56eafa0e9caa860e00922721","ref":"","required":true},{"ref":"","required":true,"desc":"Id of a TeamInstance","default":"","type":"int","name":"team_2_id","in":"body","_id":"56eafa0e9caa860e00922720"},{"required":true,"desc":"Id of a Subseason","default":"","type":"int","name":"subseason_id","in":"body","_id":"56eafa0e9caa860e0092271f","ref":""},{"name":"sport_id","ref":"","required":true,"type":"int","in":"body","_id":"56eafa0e9caa860e0092271e","default":"","desc":"Id of a Sport"},{"ref":"","required":false,"desc":"Location of Event","default":"","type":"string","name":"location","in":"body","_id":"56eafa0e9caa860e0092271d"},{"required":true,"type":"string","in":"body","_id":"56eafa413633a60e007988be","default":"","desc":"Possible values are unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, or delayed.","name":"status","ref":""},{"type":"datetime","name":"start_date_time","in":"body","_id":"56eafa413633a60e007988bd","ref":"","required":true,"desc":"Start date and time of game","default":""},{"required":false,"desc":"End date and time of game","default":"start_date_time","type":"datetime","name":"end_date_time","in":"body","_id":"56eafe50311a3e0e00f0a4c3","ref":""},{"desc":"Used to determine home team","default":"","type":"boolean","name":"team_1_is_home","in":"body","_id":"56eafa413633a60e007988bc","ref":"","required":false},{"name":"location_url","in":"body","_id":"56eafed347d9040e007c1656","ref":"","required":false,"desc":"Url of Location","default":"","type":"string"},{"default":"","type":"string","name":"location_url_protocol","in":"body","_id":"56eafed347d9040e007c1655","ref":"","required":false,"desc":"Protocol of location_url. Possible values are http://, https://, or mailto://."},{"in":"body","_id":"56eafed347d9040e007c1654","ref":"","required":false,"desc":"","default":"","type":"string","name":"description"},{"ref":"","required":false,"desc":"Timezone of Location","default":"Site timezone","type":"string","name":"local_timezone","in":"body","_id":"56eafed347d9040e007c1653"},{"required":false,"desc":"The Game affects the league standings","default":"true","type":"boolean","name":"affects_standings","in":"body","_id":"56eb029747d9040e007c165b","ref":""},{"desc":"Possible values are live, tabular, quick, or unscored.","default":"","type":"string","name":"scoring_type","in":"body","_id":"56eb029747d9040e007c165a","ref":"","required":false},{"name":"notes","in":"body","_id":"56eb029747d9040e007c165c","ref":"","required":false,"desc":"Notes about the Game","default":"","type":"string"},{"default":"{}","type":"object","name":"event","in":"body","_id":"56eaffa10e62750e0060d00e","ref":"","required":false,"desc":"Attributes of Event for Game"},{"_id":"56eaffa10e62750e0060d00d","ref":"","required":false,"desc":"ExtraGameDetails of Game","default":"","type":"object","name":"extra_game_details","in":"body"},{"_id":"56eaffa10e62750e0060d00c","ref":"","required":false,"desc":"Officials of Game","default":"","type":"array_object","name":"officials","in":"body"},{"_id":"56eaffa10e62750e0060d00b","ref":"","required":false,"desc":"QuickScore of Game","default":"","type":"object","name":"quick_score","in":"body"},{"in":"body","_id":"56eaffc5d326c30e007caa15","ref":"","required":false,"desc":"Properties of Game","default":"","type":"object","name":"properties"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 13557134,\n    \"team_1_id\": 1876243,\n    \"team_1_is_home\": true,\n    \"team_2_id\": 1876249,\n    \"team_2_name\": null,\n    \"subseason_id\": 291621,\n    \"event_id\": 307389556,\n    \"status\": \"scheduled\",\n    \"affects_standings\": 1,\n    \"referee_signoff\": null,\n    \"notes\": null,\n    \"submitted_on\": null,\n    \"created_at\": \"2016-04-07T11:12:41-07:00\",\n    \"updated_at\": \"2016-04-07T11:12:42-07:00\",\n    \"properties\": {\n        \"added_periods\": null,\n        \"my_num_non_overtime_periods\": null,\n        \"my_num_periods\": null,\n        \"overtime_intervals\": 2,\n        \"overtime_length\": \"5\",\n        \"quick_score_overtime\": false,\n        \"quick_score_shootout\": false,\n        \"regulation_time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ],\n        \"shootout_enabled\": false,\n        \"time_interval_name\": \"period\",\n        \"time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ]\n    },\n    \"enable_live_webcast\": true,\n    \"original_scorer_id\": null,\n    \"last_editor_id\": null,\n    \"image_id\": null,\n    \"sport_id\": 1,\n    \"game_id\": null,\n    \"embed_code\": null,\n    \"quick_score_id\": null,\n    \"extra_game_details_id\": 11352841,\n    \"scoring_type\": \"unscored\",\n    \"live_scoring_locked\": null,\n    \"division_override\": null,\n    \"field_of_play_enabled\": false,\n    \"game_stats_updated_at\": null,\n    \"team_1_division_id\": null,\n    \"team_2_division_id\": null,\n    \"home_team_id\": 1876243,\n    \"away_team_id\": 1876249,\n    \"home_team_name\": \"Boston Bears\",\n    \"home_team_abbrev\": \"Bos\",\n    \"home_team_button_title\": \"Boston\",\n    \"away_team_name\": \"Detroit Cyclists\",\n    \"away_team_abbrev\": \"Det\",\n    \"away_team_button_title\": \"Detroit\",\n    \"home_team_logo\": null,\n    \"away_team_logo\": null,\n    \"home_team_logo_large_square\": null,\n    \"away_team_logo_large_square\": null,\n    \"current_period\": 0,\n    \"time_remaining\": null,\n    \"score_by_time_interval\": [\n        \"scheduled\"\n    ],\n    \"home_team_score_api\": 0,\n    \"away_team_score_api\": 0,\n    \"comment_element_id\": 289414128,\n    \"total_interval_count\": 3,\n    \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n    \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"location\": \"Joe Louis Arena\",\n    \"overtime_game\": false,\n    \"half_point_scorable\": false,\n    \"local_timezone\": \"US/Central\"\n}","name":""}]},"settings":"","url":"/games"},"excerpt":"The Create method accepts a single Game (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","slug":"games-create","title":"Games Create","type":"post","body":"","hidden":false,"link_url":"","order":8,"updates":[],"__v":11,"category":"56cca51eca43550b00281403","editedParams2":true,"githubsync":"","link_external":false,"sync_unique":"","childrenPages":[]}

postGames Create

The Create method accepts a single Game (see attributes above) and creates a new record in SportsEngine.

Parameters


Body Params

team_1_id:
required
integer

Id of a TeamInstance

team_2_id:
required
integer

Id of a TeamInstance

subseason_id:
required
integer

Id of a Subseason

sport_id:
required
integer

Id of a Sport

location:
string

Location of Event

status:
required
string

Possible values are unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, or delayed.

start_date_time:
required
datetime

Start date and time of game

end_date_time:
datetimestart_date_time

End date and time of game

team_1_is_home:
boolean

Used to determine home team

location_url:
string

Url of Location

location_url_protocol:
string

Protocol of location_url. Possible values are http://, https://, or mailto://.

description:
string
local_timezone:
stringSite timezone

Timezone of Location

affects_standings:
booleantrue

The Game affects the league standings

scoring_type:
string

Possible values are live, tabular, quick, or unscored.

notes:
string

Notes about the Game

event:
object{}

Attributes of Event for Game

extra_game_details:
object

ExtraGameDetails of Game

officials:
array of objects

Officials of Game

quick_score:
object

QuickScore of Game

properties:
object

Properties of Game

Definition

https://api.sportngin.com/games

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"
}


{"_id":"56fc4ac8896b2c0e00715ef0","excerpt":"The Update method accepts a single Game (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","githubsync":"","isReference":true,"link_external":false,"parentDoc":null,"title":"Games Update","updates":[],"body":"","createdAt":"2016-03-30T21:53:12.337Z","slug":"games-update","type":"put","user":"569e96c56b4a2c0d007e9153","__v":1,"api":{"url":"/games/:id","auth":"required","examples":{"codes":[{"code":"curl -X PUT -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -d '{\n    \"game\": {\n        \"location\": \"TD Garden\"\n    }\n}' \"https://api.sportngin.com/games/13557134\"","language":"curl","name":null},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games/13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"game\\\": {\\n        \\\"location\\\": \\\"TD Garden\\\"\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"game\\\": {\\n        \\\"location\\\": \\\"TD Garden\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games/13557134\")\n  .put(body)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"in":"path","_id":"56fc4affe948b00e00a3f9ec","default":"","desc":"ID of Game","name":"id","ref":"","required":true,"type":"int"},{"default":"","desc":"ID of a TeamInstance","name":"team_1_id","ref":"","required":false,"type":"int","in":"body","_id":"56eafa0e9caa860e00922721"},{"desc":"ID of a TeamInstance","name":"team_2_id","ref":"","required":false,"type":"int","in":"body","_id":"56eafa0e9caa860e00922720","default":""},{"name":"subseason_id","ref":"","required":false,"type":"int","in":"body","_id":"56eafa0e9caa860e0092271f","default":"","desc":"ID of a Subseason"},{"default":"","desc":"ID of a Sport","name":"sport_id","ref":"","required":false,"type":"int","in":"body","_id":"56eafa0e9caa860e0092271e"},{"required":false,"desc":"Location of Event","default":"","type":"string","name":"location","in":"body","_id":"56eafa0e9caa860e0092271d","ref":""},{"name":"status","ref":"","required":false,"type":"string","in":"body","_id":"56eafa413633a60e007988be","default":"","desc":"Possible values are unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, or delayed."},{"type":"datetime","in":"body","_id":"56eafa413633a60e007988bd","default":"","desc":"Start date and time of game","name":"start_date_time","ref":"","required":false},{"desc":"End date and time of game","default":"start_date_time","type":"datetime","name":"end_date_time","in":"body","_id":"56eafe50311a3e0e00f0a4c3","ref":"","required":false},{"name":"team_1_is_home","in":"body","_id":"56eafa413633a60e007988bc","ref":"","required":false,"desc":"Used to determine home team","default":"","type":"boolean"},{"name":"location_url","ref":"","required":false,"type":"string","in":"body","_id":"56eafed347d9040e007c1656","default":"","desc":"URL of Location"},{"ref":"","required":false,"desc":"Protocol of location_url. Possible values are http://, https://, or mailto://.","default":"","type":"string","name":"location_url_protocol","in":"body","_id":"56eafed347d9040e007c1655"},{"required":false,"desc":"","default":"","type":"string","name":"description","in":"body","_id":"56eafed347d9040e007c1654","ref":""},{"desc":"Timezone of Location","default":"Site timezone","type":"string","name":"local_timezone","in":"body","_id":"56eafed347d9040e007c1653","ref":"","required":false},{"ref":"","required":false,"desc":"The Game affects the league standings","default":"true","type":"boolean","name":"affects_standings","in":"body","_id":"56eb029747d9040e007c165b"},{"required":false,"desc":"Possible values are live, tabular, quick, or unscored.","default":"","type":"string","name":"scoring_type","in":"body","_id":"56eb029747d9040e007c165a","ref":""},{"desc":"Notes about the Game","default":"","type":"string","name":"notes","in":"body","_id":"56eb029747d9040e007c165c","ref":"","required":false},{"ref":"","required":false,"desc":"Attributes of Event for Game","default":"{}","type":"object","name":"event","in":"body","_id":"56eaffa10e62750e0060d00e"},{"required":false,"desc":"ExtraGameDetails of Game","default":"","type":"object","name":"extra_game_details","in":"body","_id":"56eaffa10e62750e0060d00d","ref":""},{"default":"","type":"array_object","name":"officials","in":"body","_id":"56eaffa10e62750e0060d00c","ref":"","required":false,"desc":"Officials of Game"},{"_id":"56eaffa10e62750e0060d00b","ref":"","required":false,"desc":"QuickScore of Game","default":"","type":"object","name":"quick_score","in":"body"},{"_id":"56eaffc5d326c30e007caa15","ref":"","required":false,"desc":"Properties of Game","default":"","type":"object","name":"properties","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 13557134,\n    \"team_1_id\": 1876243,\n    \"team_1_is_home\": true,\n    \"team_2_id\": 1876249,\n    \"team_2_name\": null,\n    \"subseason_id\": 291621,\n    \"event_id\": 307389556,\n    \"status\": \"scheduled\",\n    \"affects_standings\": 1,\n    \"referee_signoff\": null,\n    \"notes\": null,\n    \"submitted_on\": null,\n    \"created_at\": \"2016-04-07T11:12:41-07:00\",\n    \"updated_at\": \"2016-04-07T11:17:20-07:00\",\n    \"properties\": {\n        \"added_periods\": null,\n        \"my_num_non_overtime_periods\": null,\n        \"my_num_periods\": null,\n        \"overtime_intervals\": 2,\n        \"overtime_length\": \"5\",\n        \"quick_score_overtime\": false,\n        \"quick_score_shootout\": false,\n        \"regulation_time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ],\n        \"shootout_enabled\": false,\n        \"time_interval_name\": \"period\",\n        \"time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ]\n    },\n    \"enable_live_webcast\": true,\n    \"original_scorer_id\": null,\n    \"last_editor_id\": null,\n    \"image_id\": null,\n    \"sport_id\": 1,\n    \"game_id\": null,\n    \"embed_code\": null,\n    \"quick_score_id\": null,\n    \"extra_game_details_id\": 11352841,\n    \"scoring_type\": \"unscored\",\n    \"live_scoring_locked\": null,\n    \"division_override\": null,\n    \"field_of_play_enabled\": false,\n    \"game_stats_updated_at\": null,\n    \"team_1_division_id\": null,\n    \"team_2_division_id\": null,\n    \"home_team_id\": 1876243,\n    \"away_team_id\": 1876249,\n    \"home_team_name\": \"Boston Bears\",\n    \"home_team_abbrev\": \"Bos\",\n    \"home_team_button_title\": \"Boston\",\n    \"away_team_name\": \"Detroit Cyclists\",\n    \"away_team_abbrev\": \"Det\",\n    \"away_team_button_title\": \"Detroit\",\n    \"home_team_logo\": null,\n    \"away_team_logo\": null,\n    \"home_team_logo_large_square\": null,\n    \"away_team_logo_large_square\": null,\n    \"current_period\": 0,\n    \"time_remaining\": null,\n    \"score_by_time_interval\": [\n        \"scheduled\"\n    ],\n    \"home_team_score_api\": 0,\n    \"away_team_score_api\": 0,\n    \"comment_element_id\": 289414128,\n    \"total_interval_count\": 0,\n    \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n    \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"location\": \"TD Garden\",\n    \"overtime_game\": false,\n    \"half_point_scorable\": false,\n    \"local_timezone\": \"US/Central\"\n}","name":""}]},"settings":""},"editedParams2":true,"link_url":"","order":9,"project":"5641217e0ee5370d00da636d","sync_unique":"","category":"56cca51eca43550b00281403","editedParams":true,"hidden":false,"version":"56cca51eca43550b002813fa","childrenPages":[]}

putGames Update

The Update method accepts a single Game (see attributes above) and updates the matching record in SportsEngine.

Parameters


Path Params

id:
required
integer

ID of Game

Body Params

team_1_id:
integer

ID of a TeamInstance

team_2_id:
integer

ID of a TeamInstance

subseason_id:
integer

ID of a Subseason

sport_id:
integer

ID of a Sport

location:
string

Location of Event

status:
string

Possible values are unscheduled, scheduled, in_progress, unofficial_final, completed, postponed, cancelled, or delayed.

start_date_time:
datetime

Start date and time of game

end_date_time:
datetimestart_date_time

End date and time of game

team_1_is_home:
boolean

Used to determine home team

location_url:
string

URL of Location

location_url_protocol:
string

Protocol of location_url. Possible values are http://, https://, or mailto://.

description:
string
local_timezone:
stringSite timezone

Timezone of Location

affects_standings:
booleantrue

The Game affects the league standings

scoring_type:
string

Possible values are live, tabular, quick, or unscored.

notes:
string

Notes about the Game

event:
object{}

Attributes of Event for Game

extra_game_details:
object

ExtraGameDetails of Game

officials:
array of objects

Officials of Game

quick_score:
object

QuickScore of Game

properties:
object

Properties of Game

Definition

https://api.sportngin.com/games/:id

Examples

curl -X PUT -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{
    "game": {
        "location": "TD Garden"
    }
}' "https://api.sportngin.com/games/13557134"

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"
}


{"_id":"56f187c53af4942b00bb3c3d","__v":0,"category":"56cca51eca43550b00281403","editedParams2":true,"githubsync":"","order":10,"title":"Games Delete","version":"56cca51eca43550b002813fa","createdAt":"2016-03-22T17:58:29.543Z","editedParams":true,"parentDoc":null,"project":"5641217e0ee5370d00da636d","api":{"params":[{"type":"string","in":"path","_id":"56f187c53af4942b00bb3c3e","default":"","desc":"","name":"id","ref":"","required":true}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 13557134,\n    \"team_1_id\": 1876243,\n    \"team_1_is_home\": true,\n    \"team_2_id\": 1876249,\n    \"team_2_name\": null,\n    \"subseason_id\": 291621,\n    \"event_id\": 307389556,\n    \"status\": \"scheduled\",\n    \"affects_standings\": 1,\n    \"referee_signoff\": null,\n    \"notes\": null,\n    \"submitted_on\": null,\n    \"created_at\": \"2016-04-07T11:12:41-07:00\",\n    \"updated_at\": \"2016-04-07T11:17:20-07:00\",\n    \"properties\": {\n        \"added_periods\": null,\n        \"my_num_non_overtime_periods\": null,\n        \"my_num_periods\": null,\n        \"overtime_intervals\": 2,\n        \"overtime_length\": \"5\",\n        \"quick_score_overtime\": false,\n        \"quick_score_shootout\": false,\n        \"regulation_time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ],\n        \"shootout_enabled\": false,\n        \"time_interval_name\": \"period\",\n        \"time_intervals\": [\n            \"20\",\n            \"20\",\n            \"20\"\n        ]\n    },\n    \"enable_live_webcast\": true,\n    \"original_scorer_id\": null,\n    \"last_editor_id\": null,\n    \"image_id\": null,\n    \"sport_id\": 1,\n    \"game_id\": null,\n    \"embed_code\": null,\n    \"quick_score_id\": null,\n    \"extra_game_details_id\": 11352841,\n    \"scoring_type\": \"unscored\",\n    \"live_scoring_locked\": null,\n    \"division_override\": null,\n    \"field_of_play_enabled\": false,\n    \"game_stats_updated_at\": null,\n    \"team_1_division_id\": null,\n    \"team_2_division_id\": null,\n    \"home_team_id\": 1876243,\n    \"away_team_id\": 1876249,\n    \"home_team_name\": \"Boston Bears\",\n    \"home_team_abbrev\": \"Bos\",\n    \"home_team_button_title\": \"Boston\",\n    \"away_team_name\": \"Detroit Cyclists\",\n    \"away_team_abbrev\": \"Det\",\n    \"away_team_button_title\": \"Detroit\",\n    \"home_team_logo\": null,\n    \"away_team_logo\": null,\n    \"home_team_logo_large_square\": null,\n    \"away_team_logo_large_square\": null,\n    \"current_period\": 0,\n    \"time_remaining\": null,\n    \"score_by_time_interval\": [\n        \"scheduled\"\n    ],\n    \"home_team_score_api\": 0,\n    \"away_team_score_api\": 0,\n    \"comment_element_id\": 289414128,\n    \"total_interval_count\": 0,\n    \"game_show_url\": \"http://apidemo.sportngin.com/game/show/13557134?subseason=291621\",\n    \"start_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"end_date_time\": \"2016-04-28T14:15:00-05:00\",\n    \"location\": \"TD Garden\",\n    \"overtime_game\": false,\n    \"half_point_scorable\": false,\n    \"local_timezone\": \"US/Central\",\n    \"permissions\": {\n        \"score\": true\n    },\n    \"live_scoring_url\": \"https://live.sportngin.com/live/ice_hockey/13557134?auth_token=CM9Vq15fC7JxyEwgmxs3\"\n}","name":"","status":200}]},"settings":"","url":"/games/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" \"https://api.sportngin.com/games/13557129\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games/13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/games/13557134\")\n  .delete(null)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete"},"body":"","hidden":false,"link_external":false,"sync_unique":"","type":"delete","user":"56e71f9edee212320019e731","excerpt":"The Delete method permanently deletes the associated Game record in SportsEngine.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","isReference":true,"link_url":"","slug":"games-delete","updates":[],"childrenPages":[]}

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

id:
required
string

Definition

https://api.sportngin.com/games/:id

Examples

curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" "https://api.sportngin.com/games/13557129"

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"
}


{"_id":"5704228c473f900e004d5a63","category":"56e85931c59c4a0e00d5d058","hidden":false,"parentDoc":null,"type":"basic","updates":[],"project":"5641217e0ee5370d00da636d","slug":"schedule-imports","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"createdAt":"2016-04-05T20:39:40.403Z","githubsync":"","isReference":true,"link_url":"","__v":4,"sync_unique":"","title":"Schedule Imports","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","body":"","excerpt":"The Schedule Import tool allows users to upload a file of [Events](https://sportnginv2.readme.io/docs/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](https://sportnginv2.readme.io/docs/mapping-codes-index).","link_external":false,"order":0,"childrenPages":[]}

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.


{"_id":"56f2f137a0de870e003b6d62","slug":"schedule-imports-index","updates":[],"api":{"auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/schedule_imports?site_id=11953\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/schedule_imports?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/schedule_imports?site_id=11953\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"type":"int","name":"site_id","in":"query","_id":"56f2f137a0de870e003b6d64","ref":"","required":true,"desc":"","default":""},{"type":"int","name":"page","in":"query","_id":"56f2f137a0de870e003b6d63","ref":"","required":false,"desc":"","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"commenting_enabled\": false,\n        \"content_type\": \"text/csv\",\n        \"created_at\": \"2016-04-14T12:33:32-07:00\",\n        \"filename\": \"schedule.csv\",\n        \"finished_at\": \"2016-04-14T12:33:33-07:00\",\n        \"id\": 146350,\n        \"ignore_previous_games\": null,\n        \"import_type\": \"tst\",\n        \"mass_replace\": false,\n        \"replace_own_events_only\": null,\n        \"site_id\": 11953,\n        \"size\": 174,\n        \"started_at\": \"2016-04-14T12:33:32-07:00\",\n        \"status\": \"complete\",\n        \"status_percentage\": 0,\n        \"total_number_of_records\": 21,\n        \"user_id\": 3156422,\n        \"status_message\": \"File Import Completing, please wait...\"\n    },\n    {\n        \"commenting_enabled\": false,\n        \"content_type\": \"text/csv\",\n        \"created_at\": \"2016-04-14T12:29:17-07:00\",\n        \"filename\": \"schedule.csv\",\n        \"finished_at\": \"2016-04-14T12:29:19-07:00\",\n        \"id\": 146349,\n        \"ignore_previous_games\": null,\n        \"import_type\": \"tst\",\n        \"mass_replace\": false,\n        \"replace_own_events_only\": null,\n        \"site_id\": 11953,\n        \"size\": 174,\n        \"started_at\": \"2016-04-14T12:29:19-07:00\",\n        \"status\": \"complete\",\n        \"status_percentage\": 0,\n        \"total_number_of_records\": 21,\n        \"user_id\": 3156422,\n        \"status_message\": \"File Import Completing, please wait...\"\n    }\n]","name":""}]},"settings":"","url":"/schedule_imports"},"githubsync":"","sync_unique":"","title":"Schedule Imports Index","excerpt":"The Index method returns an array of Schedule Import Statuses matching the given parameters.  The Status records represent the status of previously started imports.\n\n###Parameters","isReference":true,"project":"5641217e0ee5370d00da636d","hidden":false,"link_url":"","order":1,"parentDoc":null,"version":"56cca51eca43550b002813fa","__v":0,"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"site_id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"The id of the site events will be created for.\",\n    \"1-0\": \"mass_repalce\",\n    \"1-1\": \"Boolean\",\n    \"1-2\": \"1 to replace previously uploaded events\",\n    \"2-0\": \"ignore_previous\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"1 to ignore events prior to today's date(if mass replace is 1).\",\n    \"3-0\": \"commenting_enabled\",\n    \"3-1\": \"Boolean\",\n    \"3-2\": \"1 if comments should be enable d on created games.\",\n    \"4-0\": \"repalce_own_events_only\",\n    \"4-1\": \"Boolean\",\n    \"4-2\": \"1 to replace only events that were updated by the current user.\",\n    \"5-0\": \"file\",\n    \"5-1\": \"File\",\n    \"5-2\": \"A schedule uploaded file in a specific format.See http://help.sportngin.com/customer/portal/articles/619691.\",\n    \"6-0\": \"import_type\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Defaults to standard Sport Ngin Template. Set to \\\"max\\\" if MaxSolutions, Schedulewerks (Puck Systems), or Diamond Scheduler file format is being used.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]","editedParams":true,"link_external":false,"type":"get","user":"56e71f9edee212320019e731","category":"56e85931c59c4a0e00d5d058","createdAt":"2016-03-23T19:40:39.510Z","editedParams2":true,"childrenPages":[]}

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:
required
integer
page:
integer

Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/schedule_imports

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/schedule_imports?site_id=11953"

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..."
    }
]


{"_id":"56f2f24ac6d9e30e005904fe","title":"Schedule Imports Progress","__v":0,"createdAt":"2016-03-23T19:45:14.679Z","link_url":"","isReference":true,"link_external":false,"sync_unique":"","type":"get","user":"56e71f9edee212320019e731","category":"56e85931c59c4a0e00d5d058","editedParams2":true,"excerpt":"This specialized Progress method returns a single Schedule Import Progress for a given `id`.\n\n###Parameters","version":"56cca51eca43550b002813fa","project":"5641217e0ee5370d00da636d","editedParams":true,"githubsync":"","parentDoc":null,"hidden":false,"order":2,"slug":"schedule-imports-progress","updates":[],"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/schedule_imports/146350/progress\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/schedule_imports/146350/progress\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/schedule_imports/146350/progress\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"in":"path","_id":"56f2f24ac6d9e30e005904ff","ref":"","required":true,"desc":"","default":"","type":"int","name":"id"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n    \"filename\": \"schedule.csv\",\n    \"status\": \"complete\",\n    \"status_percentage\": 0,\n    \"total_number_of_records\": 21,\n    \"status_message\": \"File Import Completing, please wait...\"\n}"}]},"settings":"","url":"/schedule_imports/:id/progress"},"body":"Progress has the HTTP method of GET and requires the parameter of id.","childrenPages":[]}

getSchedule Imports Progress

This specialized Progress method returns a single Schedule Import Progress for a given id.

Parameters


Path Params

id:
required
integer

Progress has the HTTP method of GET and requires the parameter of id.

Definition

https://api.sportngin.com/schedule_imports/:id/progress

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/schedule_imports/146350/progress"

Result Format

{
    "filename": "schedule.csv",
    "status": "complete",
    "status_percentage": 0,
    "total_number_of_records": 21,
    "status_message": "File Import Completing, please wait..."
}


{"_id":"56f2f53d8299450e00ec761c","slug":"schedule-imports-create","sync_unique":"","user":"56e71f9edee212320019e731","__v":0,"parentDoc":null,"excerpt":"The Create method accepts a single File, and begins processing the file to create new [Event](https://sportnginv2.readme.io/docs/events) records in SportsEngine.\n\nThe import process is asynchronous.  You can check on the progress of your import using either the [Schedule Imports Index](https://sportnginv2.readme.io/docs/schedule-imports-index) or [Schedule Imports Progress](https://sportnginv2.readme.io/docs/schedule-imports-progress) endpoints.\n\n###Parameters","hidden":false,"isReference":true,"version":"56cca51eca43550b002813fa","api":{"method":"post","params":[{"desc":"The id of the site events will be created for","default":"","type":"int","name":"site_id","in":"body","_id":"56f2f53d8299450e00ec7623","ref":"","required":true},{"ref":"","required":true,"desc":"1 to replace previously uploaded events","default":"","type":"boolean","name":"mass_replace","in":"body","_id":"56f2f53d8299450e00ec7622"},{"type":"boolean","name":"ignore_previous","in":"body","_id":"56f2f53d8299450e00ec7621","ref":"","required":true,"desc":"1 to ignore events prior to today's date (if mass replace is 1)","default":""},{"required":true,"type":"boolean","in":"body","_id":"56f2f53d8299450e00ec7620","default":"","desc":"1 if comments should be enabled on created games.","name":"commenting_enabled","ref":""},{"type":"boolean","name":"replace_own_events_only","in":"body","_id":"56f2f53d8299450e00ec761f","ref":"","required":true,"desc":"1 to replace only events that were uploaded by the current user.","default":""},{"type":"file","name":"file","in":"body","_id":"56f2f53d8299450e00ec761e","ref":"","required":true,"desc":"A schedule upload file in a specific format. See http://help.sportngin.com/customer/portal/articles/619691.","default":""},{"ref":"","required":false,"type":"string","_id":"56f2f53d8299450e00ec761d","default":"","desc":"Defaults to standard SportsEngine Template. Set to \"max\" if MaxSolutions, Schedulewerks (Puck Systems), or Diamond Scheduler file format is being used.","in":"body","name":"import_type"}],"results":{"codes":[{"code":"{\n    \"commenting_enabled\": false,\n    \"content_type\": \"text/csv\",\n    \"created_at\": \"2016-04-14T12:33:32-07:00\",\n    \"filename\": \"schedule.csv\",\n    \"finished_at\": null,\n    \"id\": 146350,\n    \"ignore_previous_games\": null,\n    \"import_type\": \"tst\",\n    \"mass_replace\": false,\n    \"replace_own_events_only\": null,\n    \"site_id\": 11953,\n    \"size\": 174,\n    \"started_at\": null,\n    \"status\": null,\n    \"status_percentage\": 0,\n    \"total_number_of_records\": null,\n    \"user_id\": 3156422,\n    \"status_message\": \"Schedule upload in progress, please wait...\"\n}","name":"","status":200,"language":"json"}]},"settings":"","url":"/schedule_imports","auth":"required","examples":{"codes":[{"language":"curl","code":"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\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.stage.ngin-staging.com/schedule_imports\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'multipart/form-data; boundary=---011000010111000001101001'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"site_id\\\"\\r\\n\\r\\n11953\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"mass_replace\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"ignore_previous_games\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"commenting_enabled\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"replace_own_events_only\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"file\\\"; filename=\\\"[object Object]\\\"\\r\\nContent-Type: false\\r\\n\\r\\n\\r\\n-----011000010111000001101001--\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"multipart/form-data; boundary=---011000010111000001101001\");\nRequestBody body = RequestBody.create(mediaType, \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"site_id\\\"\\r\\n\\r\\n11953\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"mass_replace\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"ignore_previous_games\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"commenting_enabled\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"replace_own_events_only\\\"\\r\\n\\r\\n0\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"file\\\"; filename=\\\"[object Object]\\\"\\r\\nContent-Type: false\\r\\n\\r\\n\\r\\n-----011000010111000001101001--\");\nRequest request = new Request.Builder()\n  .url(\"https://api.stage.ngin-staging.com/schedule_imports\")\n  .post(body)\n  .addHeader(\"content-type\", \"multipart/form-data; boundary=---011000010111000001101001\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"createdAt":"2016-03-23T19:57:49.444Z","order":3,"title":"Schedule Imports Create","updates":[],"githubsync":"","editedParams":true,"editedParams2":true,"link_external":false,"link_url":"","project":"5641217e0ee5370d00da636d","type":"post","body":"","category":"56e85931c59c4a0e00d5d058","childrenPages":[]}

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

site_id:
required
integer

The id of the site events will be created for

mass_replace:
required
boolean

1 to replace previously uploaded events

ignore_previous:
required
boolean

1 to ignore events prior to today's date (if mass replace is 1)

commenting_enabled:
required
boolean

1 if comments should be enabled on created games.

replace_own_events_only:
required
boolean

1 to replace only events that were uploaded by the current user.

file:
required
file

A schedule upload file in a specific format.

import_type:
string

Defaults to standard SportsEngine Template. Set to "max" if MaxSolutions, Schedulewerks (Puck Systems), or Diamond Scheduler file format is being used.

Definition

https://api.sportngin.com/schedule_imports

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..."
}


{"_id":"56f1a01a0157b9200072defc","hidden":false,"isReference":true,"link_url":"","order":4,"sync_unique":"","api":{"method":"get","params":[{"ref":"","required":true,"type":"int","in":"query","_id":"56f1a01a0157b9200072defd","default":"","desc":"","name":"site_id"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"page_node_id\": 2394451,\n        \"node_id\": 645748,\n        \"node_type\": \"Page\",\n        \"page_title\": \"Home\"\n    },\n    {\n        \"page_node_id\": 2394452,\n        \"node_id\": 645749,\n        \"node_type\": \"Page\",\n        \"page_title\": \"Other Home Pages\"\n    },\n    {\n        \"page_node_id\": 2394453,\n        \"node_id\": 645750,\n        \"node_type\": \"Page\",\n        \"page_title\": \"DIY Home\"\n    },\n    {\n        \"page_node_id\": 2394456,\n        \"node_id\": 645752,\n        \"node_type\": \"Page\",\n        \"page_title\": \"Starter Home\"\n    },\n    {\n        \"page_node_id\": 2394458,\n        \"node_id\": 645754,\n        \"node_type\": \"Page\",\n        \"page_title\": \"Pro Home\"\n    },\n    {\n        \"page_node_id\": 2394465,\n        \"node_id\": 645758,\n        \"node_type\": \"Page\",\n        \"page_title\": \"Hockey League\"\n    },\n    {\n        \"page_node_id\": 2458063,\n        \"node_id\": 27737,\n        \"node_type\": \"League\",\n        \"page_title\": \"Eastern League (All Seasons)\"\n    },\n    {\n        \"page_node_id\": 2458062,\n        \"node_id\": 41683,\n        \"node_type\": \"LeagueInstance\",\n        \"page_title\": \"Eastern League\"\n    },\n    {\n        \"page_node_id\": 2458064,\n        \"node_id\": 291621,\n        \"node_type\": \"Subseason\",\n        \"page_title\": \"Regular Season\"\n    },\n    {\n        \"created_on\": \"2016-04-11T13:24:48-07:00\",\n        \"id\": 454038,\n        \"mapping_code\": \"map1234\",\n        \"page_node_id\": 2458074,\n        \"updated_on\": \"2016-04-11T13:24:48-07:00\",\n        \"node_id\": 181552,\n        \"node_type\": \"DivisionInstance\",\n        \"page_title\": \"Oceanic Division\",\n        \"subseason_name\": \"Regular Season\",\n        \"season_name\": \"2016\"\n    },\n    {\n        \"page_node_id\": 2458139,\n        \"node_id\": 1876243,\n        \"node_type\": \"TeamInstance\",\n        \"page_title\": \"Boston Bears\",\n        \"subseason_name\": \"Regular Season\",\n        \"season_name\": \"2016\"\n    },\n    {\n        \"page_node_id\": 2458140,\n        \"node_id\": 1876244,\n        \"node_type\": \"TeamInstance\",\n        \"page_title\": \"Buffalo Bison\",\n        \"subseason_name\": \"Regular Season\",\n        \"season_name\": \"2016\"\n    },\n    {\n        \"page_node_id\": 2458145,\n        \"node_id\": 1876249,\n        \"node_type\": \"TeamInstance\",\n        \"page_title\": \"Detroit Cyclists\",\n        \"subseason_name\": \"Regular Season\",\n        \"season_name\": \"2016\"\n    },\n   ...\n]","name":""}]},"settings":"","url":"/mapping_codes","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/mapping_codes?site_id=11953\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/mapping_codes?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/mapping_codes?site_id=11953\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"editedParams":true,"excerpt":"The Index method returns an array of Mapping Codes matching the given parameters.\n\n###Parameters","type":"get","updates":[],"body":"","githubsync":"","editedParams2":true,"link_external":false,"project":"5641217e0ee5370d00da636d","slug":"mapping-codes-index","title":"Mapping Codes Index","__v":0,"category":"56e85931c59c4a0e00d5d058","user":"56e71f9edee212320019e731","createdAt":"2016-03-22T19:42:18.624Z","parentDoc":null,"version":"56cca51eca43550b002813fa","childrenPages":[]}

getMapping Codes Index

The Index method returns an array of Mapping Codes matching the given parameters.

Parameters


Query Params

site_id:
required
integer

Definition

https://api.sportngin.com/mapping_codes

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/mapping_codes?site_id=11953"

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"
    },
   ...
]


{"_id":"56f1a257da0c573400baccfe","version":"56cca51eca43550b002813fa","__v":0,"editedParams2":true,"parentDoc":null,"project":"5641217e0ee5370d00da636d","title":"Mapping Codes Create","link_url":"","sync_unique":"","type":"post","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attributes\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"page_node_id\",\n    \"0-1\": \"Integer\",\n    \"1-0\": \"mapping_code\",\n    \"1-1\": \"String\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","createdAt":"2016-03-22T19:51:51.242Z","githubsync":"","link_external":false,"category":"56e85931c59c4a0e00d5d058","order":5,"updates":[],"slug":"mapping-codes-create","user":"56e71f9edee212320019e731","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"page_node_id\": 2458074,\n    \"mapping_code\": \"map1234\"\n}' \"https://api.sportngin.com/mapping_codes\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/mapping_codes\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"page_node_id\\\": 2458074,\\n    \\\"mapping_code\\\": \\\"map1234\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"page_node_id\\\": 2458074,\\n    \\\"mapping_code\\\": \\\"map1234\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/mapping_codes\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post","params":[{"default":"","desc":"","name":"page_node_id","ref":"","required":true,"type":"int","in":"body","_id":"56f1a257da0c573400bacd00"},{"desc":"","name":"mapping_code","ref":"","required":true,"type":"string","in":"body","_id":"56f1a257da0c573400baccff","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"created_on\": \"2016-04-11T13:27:36-07:00\",\n    \"id\": 457677,\n    \"mapping_code\": \"map1234\",\n    \"page_node_id\": 2458074,\n    \"site_id\": 11953,\n    \"subseason_id\": 291621,\n    \"team_instance_id\": null,\n    \"updated_on\": \"2016-04-11T13:27:36-07:00\"\n}","name":""}]},"settings":"","url":"/mapping_codes"},"editedParams":true,"excerpt":"The Create method accepts a single Mapping Code (see attributes above) and creates a new record in SportsEngine.\n\n###Parameters","hidden":false,"isReference":true,"childrenPages":[]}

postMapping Codes Create

The Create method accepts a single Mapping Code (see attributes above) and creates a new record in SportsEngine.

Parameters


Body Params

page_node_id:
required
integer
mapping_code:
required
string

Attributes

Attributes
Type
Notes

page_node_id

Integer

mapping_code

String

Definition

https://api.sportngin.com/mapping_codes

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 '{
    "page_node_id": 2458074,
    "mapping_code": "map1234"
}' "https://api.sportngin.com/mapping_codes"

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"
}


{"_id":"56f1a3e7da0c573400bacd03","parentDoc":null,"updates":[],"hidden":false,"isReference":true,"link_external":false,"order":6,"__v":0,"githubsync":"","user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","link_url":"","project":"5641217e0ee5370d00da636d","slug":"mapping-codes-update","sync_unique":"","category":"56e85931c59c4a0e00d5d058","editedParams":true,"editedParams2":true,"type":"put","title":"Mapping Codes Update","api":{"method":"put","params":[{"ref":"","required":true,"type":"int","in":"path","_id":"56f1a3e7da0c573400bacd04","default":"","desc":"","name":"id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"created_on\": \"2016-04-11T13:27:36-07:00\",\n    \"id\": 457677,\n    \"mapping_code\": \"map9876\",\n    \"page_node_id\": 2458074,\n    \"site_id\": 11953,\n    \"subseason_id\": 291621,\n    \"team_instance_id\": null,\n    \"updated_on\": \"2016-04-11T13:34:43-07:00\"\n}","name":""}]},"settings":"","url":"/mapping_codes/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"page_node_id\": 2458074,\n    \"mapping_code\": \"map9876\"\n}' \"https://api.sportngin.com/mapping_codes/457677\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/mapping_codes/457677\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"page_node_id\\\": 2458074,\\n    \\\"mapping_code\\\": \\\"map9876\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"page_node_id\\\": 2458074,\\n    \\\"mapping_code\\\": \\\"map9876\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/mapping_codes/457677\")\n  .put(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"body":"","createdAt":"2016-03-22T19:58:31.949Z","excerpt":"The Update method accepts a single Mapping Code (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","childrenPages":[]}

putMapping Codes Update

The Update method accepts a single Mapping Code (see attributes above) and updates the matching record in SportsEngine.

Parameters


Path Params

id:
required
integer

Definition

https://api.sportngin.com/mapping_codes/:id

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 '{
    "page_node_id": 2458074,
    "mapping_code": "map9876"
}' "https://api.sportngin.com/mapping_codes/457677"

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"
}


{"_id":"56f1a48cda0c573400bacd07","updates":[],"user":"56e71f9edee212320019e731","createdAt":"2016-03-22T20:01:16.800Z","editedParams2":true,"order":7,"slug":"mapping-codes-delete","sync_unique":"","__v":0,"category":"56e85931c59c4a0e00d5d058","githubsync":"","hidden":false,"title":"Mapping Codes Delete","parentDoc":null,"type":"delete","api":{"settings":"","url":"/mapping_codes/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '' \"https://api.sportngin.com/mapping_codes/457677\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/mapping_codes/457677\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/mapping_codes/457677\")\n  .delete(null)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"_id":"56f1a48cda0c573400bacd08","default":"","desc":"","name":"id","ref":"","required":true,"type":"string","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"created_on\": \"2016-04-11T13:27:36-07:00\",\n    \"id\": 457677,\n    \"mapping_code\": \"map9876\",\n    \"page_node_id\": 2458074,\n    \"site_id\": 11953,\n    \"subseason_id\": 291621,\n    \"team_instance_id\": null,\n    \"updated_on\": \"2016-04-11T13:34:43-07:00\"\n}","name":""}]}},"excerpt":"The Delete method permanently deletes the matching Mapping Code record in SportsEngine.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","link_external":false,"link_url":"","body":"Delete uses the HTTP method of DELETE and requires the parameter of id.","editedParams":true,"isReference":true,"project":"5641217e0ee5370d00da636d","version":"56cca51eca43550b002813fa","childrenPages":[]}

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

id:
required
string

Delete uses the HTTP method of DELETE and requires the parameter of id.

Definition

https://api.sportngin.com/mapping_codes/:id

Examples

curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '' "https://api.sportngin.com/mapping_codes/457677"

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"
}


{"_id":"570421bdecfca80e00998f9c","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"excerpt":"Quick Score is a method by which users can quickly update the status and final scores of a [Game](https://sportnginv2.readme.io/docs/games-show), but without having to alter stats, or enter scores by period.","isReference":true,"link_url":"","project":"5641217e0ee5370d00da636d","__v":6,"category":"56e8497c2fa4da0e0002c62d","createdAt":"2016-04-05T20:36:13.965Z","githubsync":"","hidden":false,"link_external":false,"title":"Quick Scores","user":"56548c568975c70d002ea4b4","order":0,"parentDoc":null,"sync_unique":"","version":"56cca51eca43550b002813fa","body":"","slug":"quick-scores","type":"basic","updates":[],"childrenPages":[]}

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.


{"_id":"56f413eb0f1f970e006e248f","version":"56cca51eca43550b002813fa","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"home_team_score\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Game score for home team\",\n    \"1-0\": \"away_team_score\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"Game score for away team\",\n    \"2-0\": \"game_status_game_id\",\n    \"2-1\": \"String\",\n    \"2-2\": \"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.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]","githubsync":"","link_external":false,"link_url":"","order":1,"type":"post","user":"56e71f9edee212320019e731","__v":0,"createdAt":"2016-03-24T16:20:59.909Z","editedParams":true,"editedParams2":true,"title":"Quick Scores Create","updates":[],"excerpt":"The Create method accepts a Quick Score (see attributes above) and creates a new record in SportsEngine associated to the given [Game](https://sportnginv2.readme.io/docs/games-show).\n\n###Parameters","project":"5641217e0ee5370d00da636d","api":{"settings":"","url":"/quick_scores","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -d '{\n    \"game_status_13557134\": \"in_progress\",\n    \"quick_score\":\n    {\n        \"13557134\":\n        {\n            \"home_team_score\": 2,\n            \"away_team_score\": 4\n        }\n    }\n    \n}' \"https://api.sportngin.com/quick_scores\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/quick_scores\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"game_status_13557134\\\": \\\"in_progress\\\",\\n    \\\"quick_score\\\":\\n    {\\n        \\\"13557134\\\":\\n        {\\n            \\\"home_team_score\\\": 2,\\n            \\\"away_team_score\\\": 4\\n        }\\n    }\\n    \\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"game_status_13557134\\\": \\\"in_progress\\\",\\n    \\\"quick_score\\\":\\n    {\\n        \\\"13557134\\\":\\n        {\\n            \\\"home_team_score\\\": 2,\\n            \\\"away_team_score\\\": 4\\n        }\\n    }\\n    \\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/quick_scores\")\n  .post(body)\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post","params":[{"ref":"","required":true,"type":"string","in":"body","_id":"56f413eb0f1f970e006e2491","default":"","desc":"Game Status (scheduled, in_progress, complete, etc.)","name":"game_status_[id]"},{"_id":"56f413eb0f1f970e006e2490","default":"","desc":"The score including the game_id","name":"quick_score","ref":"","required":true,"type":"object","in":"body"}],"results":{"codes":[{"language":"json","code":"{\n  \"success\": true\n}","name":"","status":200}]}},"category":"56e8497c2fa4da0e0002c62d","hidden":false,"isReference":true,"parentDoc":null,"slug":"quick-scores-create","sync_unique":"","childrenPages":[]}

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_[id]:
required
string

Game Status (scheduled, in_progress, complete, etc.)

quick_score:
required
object

The score including the game_id

Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/quick_scores

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
}


{"_id":"56f41cad7ea0091700f63aab","category":"56e8497c2fa4da0e0002c62d","updates":[],"githubsync":"","isReference":true,"link_url":"","project":"5641217e0ee5370d00da636d","slug":"quick-scores-update","excerpt":"The Update method accepts a single Quick Score (see attributes above) and overwrites the existing score with the new score.\n\n###Parameters","hidden":false,"title":"Quick Scores Update","__v":12,"api":{"auth":"required","examples":{"codes":[{"code":"curl -X POST -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -d '{\n    \"game_status_13557134\": \"in_progress\",\n    \"quick_score\":\n    {\n        \"13557134\":\n        {\n            \"home_team_score\": 3,\n            \"away_team_score\": 4\n        }\n    }\n    \n}' \"https://api.sportngin.com/quick_scores\"","language":"curl"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/quick_scores\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"game_status_13557134\\\": \\\"in_progress\\\",\\n    \\\"quick_score\\\":\\n    {\\n        \\\"13557134\\\":\\n        {\\n            \\\"home_team_score\\\": 3,\\n            \\\"away_team_score\\\": 4\\n        }\\n    }\\n    \\n}\"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"game_status_13557134\\\": \\\"in_progress\\\",\\n    \\\"quick_score\\\":\\n    {\\n        \\\"13557134\\\":\\n        {\\n            \\\"home_team_score\\\": 3,\\n            \\\"away_team_score\\\": 4\\n        }\\n    }\\n    \\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/quick_scores\")\n  .post(body)\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[{"in":"body","_id":"57230ee9b1f99d0e0008697d","ref":"","required":false,"desc":"Game Status (scheduled, in_progress, complete, etc.)","default":"","type":"string","name":"game_status_[id]"},{"default":"","desc":"The score including the game_id","name":"quick_score","ref":"","required":false,"type":"object","in":"body","_id":"57230ee9b1f99d0e0008697c"}],"results":{"codes":[{"status":200,"name":"","code":"{\n  \"success\": true\n}","language":"json"}]},"settings":"","url":"/quick_scores"},"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"*Game Status:* this parameter has the game id embedded in the parameter. An example is: `game_status_1234567=in_progress`\\n\\n*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`\"\n}\n[/block]","editedParams":true,"editedParams2":true,"sync_unique":"","type":"post","user":"56e71f9edee212320019e731","createdAt":"2016-03-24T16:58:21.623Z","link_external":false,"order":2,"parentDoc":null,"version":"56cca51eca43550b002813fa","childrenPages":[]}

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_[id]:
string

Game Status (scheduled, in_progress, complete, etc.)

quick_score:
object

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

https://api.sportngin.com/quick_scores

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
}


{"_id":"570423da8572520e00d38e78","link_external":false,"link_url":"","sync_unique":"","version":"56cca51eca43550b002813fa","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"githubsync":"","hidden":false,"order":0,"parentDoc":null,"project":"5641217e0ee5370d00da636d","title":"Standings","slug":"standings","type":"basic","__v":9,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"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.\"\n}\n[/block]","category":"56e7154af75ac63200e37a22","createdAt":"2016-04-05T20:45:14.509Z","excerpt":"Standings provides access to the [League](https://sportnginv2.readme.io/docs/leagues-show) standings information for a [Team](https://sportnginv2.readme.io/docs/teams-show) or [Division](https://sportnginv2.readme.io/docs/division-instances-index).\n\nThe attributes for standings will vary depending on the [Sport](https://sportnginv2.readme.io/docs/sports-index) and Standings type selected for that [Subseason](https://sportnginv2.readme.io/docs/subseasons-show).  Typically all standings will include `games_played`, `win_count`, `loss_count`, and `tie_count`.  Other Sport/Standings specific information will be included where appropriate.\n\nStandings data is returned in order of [Teams'](https://sportnginv2.readme.io/docs/teams-show) standings from best to worst within the [Division](ref:divisions).\n\nA Bracket is a tree diagram that represents a series of [Games](https://sportnginv2.readme.io/docs/games-show) to be played during a Tournament.\n\nFor Bracket standing type, Games that are in the same [Brackets](https://sportnginv2.readme.io/docs/brackets-show-1) are grouped together in an array.\n\n### Associations\nA Bracket belongs to a [Division Instance](https://sportnginv2.readme.io/docs/division-instances-index) and/or a [Subseason](https://sportnginv2.readme.io/docs/subseasons-show).  A Bracket has many `Bracket Nodes by Round`, `Bracket Rounds`, and `Bracket Nodes`. A Bracket can be associated with [Standings](https://sportnginv2.readme.io/docs/standings).","isReference":true,"user":"56548c568975c70d002ea4b4","childrenPages":[]}

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.

{"_id":"56ec42e78ea7ce0e00a3d8b8","editedParams":true,"editedParams2":true,"githubsync":"","parentDoc":null,"slug":"brackets-index","updates":[],"createdAt":"2016-03-18T18:03:19.541Z","hidden":false,"isReference":true,"order":1,"sync_unique":"","user":"56e71f9edee212320019e731","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\t\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/brackets?subseason_id=302608\""},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/brackets?subseason_id=302608\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/brackets?subseason_id=302608\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"subseason_id","ref":"","required":true,"type":"int","in":"query","_id":"56ec42e78ea7ce0e00a3d8b9","default":"","desc":"ID of subseason the brackets belong to"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"id\": 10843,\n        \"owner_id\": 192056,\n        \"owner_type\": \"DivisionInstance\",\n        \"created_at\": \"2016-05-02T10:04:12-07:00\",\n        \"updated_at\": \"2016-05-02T10:04:12-07:00\",\n        \"round_labels\": {},\n        \"hide_seed_number\": null,\n        \"owner_name\": \"Oceanic Division\"\n    },\n    {\n        \"id\": 10844,\n        \"owner_id\": 192057,\n        \"owner_type\": \"DivisionInstance\",\n        \"created_at\": \"2016-05-02T10:04:49-07:00\",\n        \"updated_at\": \"2016-05-02T10:04:49-07:00\",\n        \"round_labels\": {},\n        \"hide_seed_number\": null,\n        \"owner_name\": \"Cooke Division\"\n    }\n]","name":""}]},"settings":"","url":"/brackets"},"title":"Brackets Index","version":"56cca51eca43550b002813fa","project":"5641217e0ee5370d00da636d","type":"get","__v":0,"body":"","category":"56e7154af75ac63200e37a22","excerpt":"The Index method returns an array of brackets matching the given parameters.\n\n###Parameters","link_external":false,"link_url":"","childrenPages":[]}

getBrackets Index

The Index method returns an array of brackets matching the given parameters.

Parameters


Query Params

subseason_id:
required
integer

ID of subseason the brackets belong to

Definition

https://api.sportngin.com/brackets

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN	" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/brackets?subseason_id=302608"

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"
    }
]


{"_id":"56f2b1394e15c90e0069dc16","api":{"settings":"","url":"/brackets/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\t\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/brackets/10843\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/brackets/10843\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/brackets/10843\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"get","params":[{"required":false,"desc":"ID of the bracket to be returned","default":"","type":"int","name":"id","in":"path","_id":"57278b7ec0ebe10e005b48a4","ref":""},{"default":"","type":"int","name":"bracket_node_by_round","in":"query","_id":"56ec4b698ea7ce0e00a3d8d7","ref":"","required":true,"desc":""},{"in":"query","_id":"56ec4b698ea7ce0e00a3d8d6","ref":"","required":true,"desc":"","default":"","type":"int","name":"bracket_round"},{"name":"bracket_node","in":"query","_id":"56ec4b698ea7ce0e00a3d8d5","ref":"","required":true,"desc":"","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    [\n        {\n            \"id\": 79741,\n            \"bracket_id\": 10843,\n            \"round\": 1,\n            \"position\": 1,\n            \"parent_id\": 79739,\n            \"game_id\": 14089241,\n            \"top_seed\": 1,\n            \"bottom_seed\": 8,\n            \"game\": {\n                \"id\": 14089241,\n                \"team_1_id\": 1979872,\n                \"team_1_is_home\": true,\n                \"team_2_id\": 1979879,\n                \"team_2_name\": null,\n                \"subseason_id\": 302608,\n                \"event_id\": 319256773,\n                \"status\": \"scheduled\",\n                \"affects_standings\": 1,\n                \"referee_signoff\": null,\n                \"notes\": \"\",\n                \"submitted_on\": null,\n                \"created_at\": \"2016-05-02T10:04:14-07:00\",\n                \"updated_at\": \"2016-05-02T10:05:35-07:00\",\n                \"properties\": {\n                    \"added_periods\": null,\n                    \"my_num_non_overtime_periods\": null,\n                    \"my_num_periods\": null,\n                    \"overtime_intervals\": 2,\n                    \"overtime_length\": \"5\",\n                    \"quick_score_overtime\": false,\n                    \"quick_score_shootout\": false,\n                    \"regulation_time_intervals\": [\n                        \"20\",\n                        \"20\",\n                        \"20\"\n                    ],\n                    \"shootout_enabled\": false,\n                    \"time_interval_name\": \"period\",\n                    \"time_intervals\": [\n                        \"20\",\n                        \"20\",\n                        \"20\"\n                    ]\n                },\n                \"enable_live_webcast\": true,\n                \"image_id\": null,\n                \"sport_id\": 1,\n                \"game_id\": null,\n                \"embed_code\": \"\",\n                \"quick_score_id\": null,\n                \"extra_game_details_id\": 11884787,\n                \"scoring_type\": \"unscored\",\n                \"live_scoring_locked\": null,\n                \"division_override\": null,\n                \"field_of_play_enabled\": false,\n                \"game_stats_updated_at\": null,\n                \"team_1_division_id\": null,\n                \"team_2_division_id\": null,\n                \"home_team_id\": 1979872,\n                \"away_team_id\": 1979879,\n                \"home_team_name\": \"Boston Bears\",\n                \"home_team_abbrev\": \"Bos\",\n                \"home_team_button_title\": \"Boston\",\n                \"away_team_name\": \"Toronto Trees\",\n                \"away_team_abbrev\": \"Tor\",\n                \"away_team_button_title\": \"Toronto\",\n                \"home_team_logo\": null,\n                \"away_team_logo\": null,\n                \"home_team_logo_large_square\": null,\n                \"away_team_logo_large_square\": null,\n                \"current_period\": 0,\n                \"time_remaining\": null,\n                \"score_by_time_interval\": [\n                    \"scheduled\"\n                ],\n                \"home_team_score_api\": 0,\n                \"away_team_score_api\": 0,\n                \"comment_element_id\": 301487794,\n                \"total_interval_count\": 0,\n                \"game_show_url\": \"http://apidemo.sportngin.com/game/show/14089241?subseason=302608\",\n                \"start_date_time\": \"2016-06-30T10:00:00-05:00\",\n                \"end_date_time\": \"2016-06-30T10:00:00-05:00\",\n                \"location\": \"\",\n                \"overtime_game\": false,\n                \"half_point_scorable\": false,\n                \"local_timezone\": \"America/Chicago\"\n            }\n        },\n...\n]","name":""}]}},"body":"","createdAt":"2016-03-23T15:07:37.179Z","excerpt":"The Show method returns a single Bracket for a given `subseason_id`.\n\n###Parameters","githubsync":"","parentDoc":null,"slug":"brackets-show-1","version":"56cca51eca43550b002813fa","hidden":false,"order":2,"project":"5641217e0ee5370d00da636d","title":"Brackets Show","user":"56e71f9edee212320019e731","__v":1,"editedParams":true,"isReference":true,"sync_unique":"","category":"56e7154af75ac63200e37a22","link_external":false,"link_url":"","type":"get","updates":[],"editedParams2":true,"childrenPages":[]}

getBrackets Show

The Show method returns a single Bracket for a given subseason_id.

Parameters


Path Params

id:
integer

ID of the bracket to be returned

Query Params

bracket_node_by_round:
required
integer
bracket_round:
required
integer
bracket_node:
required
integer

Definition

https://api.sportngin.com/brackets/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN	" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/brackets/10843"

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"
            }
        },
...
]


{"_id":"56f432933d35720e00ba9823","body":"","type":"get","version":"56cca51eca43550b002813fa","title":"Standings Index","createdAt":"2016-03-24T18:31:47.708Z","editedParams":true,"editedParams2":true,"excerpt":"The Index method returns an array of Events matching the given parameters, including at least one of `division_instance_id` and `team_instance_id`.\n\n###Parameters","githubsync":"","order":4,"slug":"standings-index","user":"56e71f9edee212320019e731","__v":0,"api":{"method":"get","params":[{"desc":"","default":"","type":"int","name":"subseason_id","in":"query","_id":"56f432933d35720e00ba9826","ref":"","required":true},{"default":"","desc":"","name":"division_instance_id","ref":"","required":false,"type":"int","in":"query","_id":"56f432933d35720e00ba9825"},{"type":"int","name":"team_instance_id","in":"query","_id":"56f432933d35720e00ba9824","ref":"","required":false,"desc":"","default":""}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n    {\n        \"id\": 32402,\n        \"games_played\": 0,\n        \"win_count\": 0,\n        \"loss_count\": 0,\n        \"tie_count\": 0,\n        \"overtime_loss\": 0,\n        \"goals_for\": 0,\n        \"goals_against\": 0,\n        \"points\": 0,\n        \"created_at\": \"2016-03-22T13:19:12-07:00\",\n        \"updated_at\": \"2016-03-22T13:19:12-07:00\",\n        \"team_instance_id\": 1876243,\n        \"subseason_id\": 291621,\n        \"secondary_record\": \"0-0-0-0\",\n        \"shootout_loss\": 0,\n        \"sort_override\": 0,\n        \"team_instance\": {\n            \"id\": 1876243,\n            \"created_at\": \"2016-03-22T13:19:12-07:00\",\n            \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n            \"team_id\": 1373611,\n            \"affects_standings\": true,\n            \"name\": \"Boston Bears\",\n            \"roster_id\": 1837158,\n            \"opponent\": null,\n            \"parent_team_instance_id\": null,\n            \"image_id\": null,\n            \"abbrev\": \"Bos\",\n            \"primary_color\": \"000000\",\n            \"secondary_color\": \"000000\",\n            \"button_title\": \"Boston\",\n            \"gender\": \"male\",\n            \"management_team_id\": null,\n            \"team\": {\n                \"id\": 1373611,\n                \"name\": \"Boston Bears\",\n                \"button_title\": \"Boston\",\n                \"abbrev\": \"Bos\",\n                \"image_id\": null,\n                \"primary_color\": \"000000\",\n                \"secondary_color\": \"000000\",\n                \"gender\": \"male\",\n                \"created_at\": \"2016-03-22T13:06:41-07:00\",\n                \"updated_at\": \"2016-03-23T09:34:28-07:00\",\n                \"sport_id\": 1,\n                \"opponent\": null,\n                \"parent_team_id\": null,\n                \"ios_whitelabel_url\": null,\n                \"android_whitelabel_url\": null,\n                \"sites\": [\n                    {\n                        \"id\": 11953,\n                        \"domain_id\": 1149,\n                        \"domain_name\": \"sportngin.com\",\n                        \"subdomain\": \"apidemo\",\n                        \"product_id\": 14,\n                        \"name\": \"Sport Ngin API Demo Site\",\n                        \"short_name\": \"Sport Ngin API Demo Site\",\n                        \"created_on\": \"2016-02-24T06:32:26-08:00\",\n                        \"updated_on\": \"2016-04-08T10:04:54-07:00\",\n                        \"created_by_user_id\": 3156422,\n                        \"updated_by_user_id\": null,\n                        \"timezone\": \"US/Central\",\n                        \"twitter_user_id\": null,\n                        \"layout_theme_id\": 51,\n                        \"secure_subdomain\": \"apidemo\",\n                        \"address_id\": 4447713,\n                        \"membership_privacy\": \"open\",\n                        \"membership_grace_period\": 1,\n                        \"boss_billing_account_id\": null,\n                        \"boss_organization_id\": 27743\n                    }\n                ],\n                \"leagues\": [\n                    {\n                        \"id\": 27737,\n                        \"name\": \"Eastern League\",\n                        \"current_subseason_id\": 291621,\n                        \"site_id\": 11953,\n                        \"sport_id\": 1,\n                        \"image_id\": null,\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-03-24T07:20:49-07:00\",\n                        \"button_title\": \"Eastern\",\n                        \"primary_color\": \"00AEEF\",\n                        \"secondary_color\": \"666666\",\n                        \"gender\": \"male\",\n                        \"abbrev\": \"East\",\n                        \"score_ribbon\": false,\n                        \"tweet_games\": null,\n                        \"game_sheet_label\": \"gamesheet\"\n                    }\n                ],\n                \"thumbnails\": {},\n                \"thumbnails_ssl\": {},\n                \"current_subseason_ids\": [\n                    291621\n                ],\n                \"seasons\": [\n                    {\n                        \"id\": 267440,\n                        \"name\": \"2016\",\n                        \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                        \"solo_team_league_id\": null,\n                        \"has_metadata\": null,\n                        \"show_shared_schedule\": false,\n                        \"stat_preference\": {\n                            \"id\": 292407,\n                            \"updated_on\": \"2016-03-22T12:46:58-07:00\",\n                            \"created_on\": \"2016-03-22T12:46:58-07:00\",\n                            \"game_defaults\": {\n                                \"auto_navigate_to_play_details\": true,\n                                \"field_of_play_enabled\": false,\n                                \"game_misconduct_time\": 0,\n                                \"ice_hockey_goalie_order_by\": null,\n                                \"ice_hockey_goalie_order_by_secondary\": null,\n                                \"ice_hockey_goalie_order_dir\": null,\n                                \"ice_hockey_goalie_order_dir_secondary\": null,\n                                \"ice_hockey_goalie_stat_qualify_by\": null,\n                                \"ice_hockey_goalie_stat_qualify_val\": null,\n                                \"ice_hockey_skater_order_by\": null,\n                                \"ice_hockey_skater_order_by_secondary\": null,\n                                \"ice_hockey_skater_order_dir\": null,\n                                \"ice_hockey_skater_order_dir_secondary\": null,\n                                \"ice_hockey_skater_stat_qualify_by\": null,\n                                \"ice_hockey_skater_stat_qualify_val\": null,\n                                \"ice_hockey_team_scoring_order_by\": \"pts\",\n                                \"ice_hockey_team_scoring_order_by_secondary\": null,\n                                \"ice_hockey_team_scoring_order_dir\": \"desc\",\n                                \"ice_hockey_team_scoring_order_dir_secondary\": null,\n                                \"ice_hockey_team_scoring_stat_qualify_by\": null,\n                                \"ice_hockey_team_scoring_stat_qualify_val\": null,\n                                \"ice_hockey_team_stats_order_by\": null,\n                                \"ice_hockey_team_stats_order_by_secondary\": null,\n                                \"ice_hockey_team_stats_order_dir\": null,\n                                \"ice_hockey_team_stats_order_dir_secondary\": null,\n                                \"ice_hockey_team_stats_stat_qualify_by\": null,\n                                \"ice_hockey_team_stats_stat_qualify_val\": null,\n                                \"intermission_length\": 1,\n                                \"major_adjustment_time\": 0,\n                                \"major_penalty_time\": 5,\n                                \"match_penalty_time\": 5,\n                                \"max_goal_differential\": 0,\n                                \"max_player_major_penalties\": 2,\n                                \"max_player_penalties\": 5,\n                                \"max_team_penalties\": 15,\n                                \"minor_adjustment_time\": 0,\n                                \"minor_penalty_time\": 2,\n                                \"misconduct_time\": 10,\n                                \"overtime_intervals\": 2,\n                                \"overtime_length\": \"5\",\n                                \"post_live_updates\": true,\n                                \"regulation_time_intervals\": null,\n                                \"shootout_enabled\": false,\n                                \"stop_run_time\": true,\n                                \"time_interval_name\": \"period\",\n                                \"time_intervals\": [\n                                    \"20\",\n                                    \"20\",\n                                    \"20\"\n                                ],\n                                \"timeout_time\": 1,\n                                \"timeouts\": 1,\n                                \"track_goal_types\": true,\n                                \"track_player_sog\": true,\n                                \"warmup_length\": 5\n                            },\n                            \"season_id\": 267440,\n                            \"original_scorer_can_edit\": null,\n                            \"force_real_time_scoring\": false,\n                            \"stat_tool_id\": 1848623,\n                            \"stats_can_be_unlinked\": null,\n                            \"scoring_methods\": \"--- \\n- live\\n- mass\\n- tabular\\n- quick\\n\",\n                            \"can_edit_final\": \"league_owner\",\n                            \"traded_player_stats\": null,\n                            \"game_sheet_auto_summary_enabled\": true,\n                            \"visible_stats\": \"league_xor_division\"\n                        },\n                        \"subseasons\": [\n                            {\n                                \"id\": 291621,\n                                \"name\": \"Regular Season\",\n                                \"season_id\": 267440,\n                                \"position\": 1,\n                                \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                                \"updated_at\": \"2016-04-14T09:43:56-07:00\",\n                                \"snl_scoring_enabled\": true,\n                                \"statistic_grouping_id\": 417884,\n                                \"workers_completed\": null,\n                                \"standing_preference\": {\n                                    \"id\": 110425,\n                                    \"standing_tool_id\": 1848627,\n                                    \"standing_type_id\": 5,\n                                    \"standings_aggregation_level\": \"league\",\n                                    \"qualifiers\": null,\n                                    \"qualifier_limit\": null,\n                                    \"created_at\": \"2016-03-22T12:46:58-07:00\",\n                                    \"updated_at\": \"2016-03-22T12:46:58-07:00\",\n                                    \"winning_team_custom_points\": null,\n                                    \"losing_team_custom_points\": null,\n                                    \"tied_team_custom_points\": null,\n                                    \"label_mapping\": {},\n                                    \"extended_fields\": [\n                                        \"win_count\",\n                                        \"loss_count\",\n                                        \"tie_count\",\n                                        \"points\"\n                                    ],\n                                    \"order_rule\": 1,\n                                    \"overtime_win_custom_points\": null,\n                                    \"overtime_loss_custom_points\": null,\n                                    \"overtime_wins_include_in_wins\": true,\n                                    \"overtime_losses_include_in_losses\": true,\n                                    \"legacy_custom_points\": false\n                                },\n                                \"live_scoring_stat_configuration\": {\n                                    \"show_plus_minus\": null,\n                                    \"fair_play_points\": false\n                                }\n                            }\n                        ]\n                    }\n                ],\n                \"subseason_team_instance_mapping\": [\n                    {\n                        \"subseason_id\": 291621,\n                        \"team_instance_id\": 1876243\n                    }\n                ],\n                \"league_name\": \"Eastern League\",\n                \"site_name\": \"Sport Ngin API Demo Site\",\n                \"sport_name\": \"Ice Hockey\"\n            },\n            \"thumbnails\": {},\n            \"subseason_ids\": [\n                291621\n            ]\n        }\n    },\n...\n]"}]},"settings":"","url":"/standings","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/standings?subseason_id=291621&division_instance_id=181552\""},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/standings?subseason_id=291621&division_instance_id=181552\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/standings?subseason_id=291621&division_instance_id=181552\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"category":"56e7154af75ac63200e37a22","hidden":false,"link_url":"","updates":[],"isReference":true,"link_external":false,"parentDoc":null,"project":"5641217e0ee5370d00da636d","sync_unique":"","childrenPages":[]}

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

subseason_id:
required
integer
division_instance_id:
integer
team_instance_id:
integer

Definition

https://api.sportngin.com/standings

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/standings?subseason_id=291621&division_instance_id=181552"

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
            ]
        }
    },
...
]


{"_id":"5704222b8572520e00d38e6d","version":"56cca51eca43550b002813fa","createdAt":"2016-04-05T20:38:03.194Z","githubsync":"","link_external":false,"order":0,"slug":"rosters","title":"Rosters","type":"basic","body":"","excerpt":"A Roster is a group of [Roster Players](https://sportnginv2.readme.io/docs/roster_players-show) who play together on a [Team Instance](https://sportnginv2.readme.io/docs/team-instances-show) in a given [Season](https://sportnginv2.readme.io/docs/seasons-show).\n\nRetrieving an array of the members on the current Roster can be achieved by calling the [Rosters Show](https://sportnginv2.readme.io/docs/rosters-show) method, however the [Roster Players Index](https://sportnginv2.readme.io/docs/roster-players-index) method may be used to retrieve an array of Roster Players as well.\n\n###Associations\nA Roster belongs to a [Team Instance](https://sportnginv2.readme.io/docs/team-instances-show) (a [Team](https://sportnginv2.readme.io/docs/teams-show) by [Season](https://sportnginv2.readme.io/docs/seasons-show)) and contains an array of [Roster Players](https://sportnginv2.readme.io/docs/roster_players-show).","project":"5641217e0ee5370d00da636d","updates":[],"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"category":"56e04eff40ba8722006415d6","parentDoc":null,"__v":5,"hidden":false,"isReference":true,"link_url":"","sync_unique":"","user":"56548c568975c70d002ea4b4","childrenPages":[]}

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.


{"_id":"56e04f60903c7a29001d52c6","sync_unique":"","title":"Rosters Index","parentDoc":null,"project":"5641217e0ee5370d00da636d","updates":[],"user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","category":"56e04eff40ba8722006415d6","githubsync":"","type":"get","hidden":false,"isReference":true,"link_external":false,"link_url":"","slug":"rosters-index","api":{"url":"/rosters","auth":"required","examples":{"codes":[{"name":"cURL - team_instance_ids","language":"curl","code":"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\""},{"name":"Ruby - team_instance_ids","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/rosters?team_instance_ids=1876243\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java - team_instance_ids","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/rosters?team_instance_ids=1876243\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - team_id","language":"curl","code":"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_id=1373611\""},{"name":"Ruby - team_id","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/rosters?team_id=1373611\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java - team_id","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/rosters?team_id=1373611\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","type":"int","name":"team_instance_ids","in":"query","_id":"56e04f60903c7a29001d52c7","ref":"","required":false,"desc":"Ids of team instances for which rosters will be displayed"},{"_id":"56e198ba87eeb13200c17483","default":"","desc":"Id of team for which roster will be displayed along with each rosters'","name":"team_id","ref":"","required":false,"type":"int","in":"query"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"id\": 1837158,\n        \"updated_on\": \"2016-04-14T09:43:56-07:00\",\n        \"created_on\": \"2016-03-22T13:19:12-07:00\",\n        \"static_group_id\": 1055410,\n        \"opponent\": null,\n        \"name\": null,\n        \"survey_id\": null,\n        \"team_name\": \"Boston Bears\",\n        \"division_name\": \"Oceanic Division\",\n        \"league_name\": \"Eastern League\"\n    }\n]","name":"OK - team_instance_ids"},{"name":"OK - team_id","status":200,"language":"json","code":"{\n    \"id\": 1837158,\n    \"updated_on\": \"2016-04-14T09:43:56-07:00\",\n    \"created_on\": \"2016-03-22T13:19:12-07:00\",\n    \"static_group_id\": 1055410,\n    \"opponent\": null,\n    \"name\": null,\n    \"survey_id\": null,\n    \"team_name\": \"Boston Bears\",\n    \"division_name\": \"Oceanic Division\",\n    \"league_name\": \"Eastern League\",\n    \"roster_players\": [\n        {\n            \"id\": 11575453,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"1\",\n            \"updated_on\": \"2016-04-11T09:02:39-07:00\",\n            \"created_on\": \"2016-03-23T10:07:46-07:00\",\n            \"content_node_id\": 20168056,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Christopher\",\n            \"last_name\": \"Breen\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"abbreviation\": \"D\",\n                    \"sport_id\": 1,\n                    \"position\": 2,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\",\n                    \"created_on\": null\n                }\n            ],\n            \"persona_id\": 18922209,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575453\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575454,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"2\",\n            \"updated_on\": \"2016-03-28T12:02:15-07:00\",\n            \"created_on\": \"2016-03-23T10:07:47-07:00\",\n            \"content_node_id\": 20168057,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Craig\",\n            \"last_name\": \"Cunningham\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null\n                }\n            ],\n            \"persona_id\": 18922316,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575454\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575455,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"3\",\n            \"updated_on\": \"2016-03-28T12:02:37-07:00\",\n            \"created_on\": \"2016-03-23T10:07:48-07:00\",\n            \"content_node_id\": 20168058,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Justin\",\n            \"last_name\": \"Florek\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null\n                }\n            ],\n            \"persona_id\": 18922324,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575455\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575456,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"4\",\n            \"updated_on\": \"2016-03-28T12:02:46-07:00\",\n            \"created_on\": \"2016-03-23T10:07:52-07:00\",\n            \"content_node_id\": 20168060,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Alexander\",\n            \"last_name\": \"Khokhlachev\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null\n                }\n            ],\n            \"persona_id\": 18922330,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575456\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575457,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"5\",\n            \"updated_on\": \"2016-03-28T12:02:55-07:00\",\n            \"created_on\": \"2016-03-23T10:07:54-07:00\",\n            \"content_node_id\": 20168062,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Torey\",\n            \"last_name\": \"Krug\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"abbreviation\": \"D\",\n                    \"sport_id\": 1,\n                    \"position\": 2,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\",\n                    \"created_on\": null\n                }\n            ],\n            \"persona_id\": 18922338,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575457\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575458,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"6\",\n            \"updated_on\": \"2016-04-11T08:18:28-07:00\",\n            \"created_on\": \"2016-03-23T10:07:56-07:00\",\n            \"content_node_id\": 20168063,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Tuukka\",\n            \"last_name\": \"Rask\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 3,\n                    \"name\": \"Goalie\",\n                    \"abbreviation\": \"G\",\n                    \"sport_id\": 1,\n                    \"position\": 3,\n                    \"updated_on\": \"2007-03-07T13:39:55-08:00\",\n                    \"created_on\": null\n                }\n            ],\n            \"persona_id\": 18922347,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575458\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        }\n    ]\n}"}]},"settings":""},"editedParams":true,"editedParams2":true,"excerpt":"The Index method returns an array of Rosters matching the given parameters.\n\n###Parameters","order":1,"__v":1,"body":"","createdAt":"2016-03-09T16:29:20.323Z","childrenPages":[]}

getRosters Index

The Index method returns an array of Rosters matching the given parameters.

Parameters


Query Params

team_instance_ids:
integer

Ids of team instances for which rosters will be displayed

team_id:
integer

Id of team for which roster will be displayed along with each rosters'

Definition

https://api.sportngin.com/rosters

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"
    }
]


{"_id":"56d7212c1d6ac91500de1945","hidden":false,"order":2,"slug":"rosters-show","title":"Rosters Show","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"h-1\": \"Type\",\n    \"h-0\": \"Name\",\n    \"h-2\": \"Description\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Id of Roster\",\n    \"1-0\": \"updated_on\",\n    \"2-0\": \"created_on\",\n    \"3-0\": \"static_group_id\",\n    \"4-0\": \"opponent\",\n    \"5-0\": \"name\",\n    \"6-0\": \"survey_id\",\n    \"7-0\": \"team_name\",\n    \"8-0\": \"division_name\",\n    \"9-0\": \"league_name\",\n    \"10-0\": \"permissions\",\n    \"7-1\": \"String\",\n    \"7-2\": \"Name of the team that a roster belongs to (derived)\",\n    \"8-1\": \"String\",\n    \"9-1\": \"String\",\n    \"10-1\": \"Object\",\n    \"6-1\": \"Integer\",\n    \"5-1\": \"String\",\n    \"4-1\": \"Boolean\",\n    \"3-1\": \"Integer\",\n    \"2-1\": \"Timestamp\",\n    \"1-1\": \"Timestamp\",\n    \"1-2\": \"Timestamp of last update\",\n    \"2-2\": \"Timestamp when created\",\n    \"3-2\": \"Id of StaticGroup\",\n    \"4-2\": \"Determines if the team is an opponent for a SoloTeamLeague\",\n    \"5-2\": \"Name of an unattached roster created using the rostering tool\",\n    \"6-2\": \"Id of Survey that an unattached roster belongs to\",\n    \"8-2\": \"Name of the division that a roster belongs to (derived)\",\n    \"9-2\": \"Name of the league that a roster belongs to (derived)\",\n    \"10-2\": \"Permissions of the current user for this roster\"\n  },\n  \"cols\": 3,\n  \"rows\": 11\n}\n[/block]","editedParams2":true,"githubsync":"","isReference":true,"link_url":"","project":"5641217e0ee5370d00da636d","__v":1,"createdAt":"2016-03-02T17:21:48.858Z","parentDoc":null,"updates":[],"user":"569e96c56b4a2c0d007e9153","version":"56cca51eca43550b002813fa","excerpt":"The Show method returns an array of [Roster Players](https://sportnginv2.readme.io/docs/roster_players-show) matching the given parameters.  A Roster belongs to a [Team Instance](https://sportnginv2.readme.io/docs/team-instances-show), which is identified with the required parameter `team_instance_id`.\n\nOptionally, the Show method can return an array of [Roster Players](https://sportnginv2.readme.io/docs/roster_players-show) for a Game by passing the `game_id` parameter.\n\n###Parameters","editedParams":true,"link_external":false,"sync_unique":"","type":"get","api":{"settings":"","url":"/rosters/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"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\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/rosters/1837158\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/rosters/1837158\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"name":"cURL - for_game","language":"curl","code":"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?for_game=13557134\""},{"name":"Ruby - for_game","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/rosters/1837158?for_game=13557134\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java - for_game","language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/rosters/1837158?for_game=13557134\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","desc":"Id of a Roster","name":"id","ref":"","required":true,"type":"int","in":"path","_id":"56d7212c1d6ac91500de1947"},{"desc":"Id of a Game","name":"for_game","ref":"","required":false,"type":"int","in":"query","_id":"56d7212c1d6ac91500de1946","default":""},{"ref":"","required":false,"type":"int","in":"query","_id":"56d72a0f3513421d009342d6","default":"","desc":"Id of a TeamInstance","name":"team_instance_id"}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 1837158,\n    \"updated_on\": \"2016-04-14T09:43:56-07:00\",\n    \"created_on\": \"2016-03-22T13:19:12-07:00\",\n    \"static_group_id\": 1055410,\n    \"opponent\": null,\n    \"name\": null,\n    \"survey_id\": null,\n    \"team_name\": \"Boston Bears\",\n    \"division_name\": \"Oceanic Division\",\n    \"league_name\": \"Eastern League\",\n    \"roster_players\": [\n        {\n            \"id\": 11575453,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"1\",\n            \"updated_on\": \"2016-04-11T09:02:39-07:00\",\n            \"created_on\": \"2016-03-23T10:07:46-07:00\",\n            \"content_node_id\": 20168056,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Christopher\",\n            \"last_name\": \"Breen\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"abbreviation\": \"D\",\n                    \"sport_id\": 1,\n                    \"position\": 2,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575453\n                }\n            ],\n            \"persona_id\": 18922209,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575453\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575454,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"2\",\n            \"updated_on\": \"2016-03-28T12:02:15-07:00\",\n            \"created_on\": \"2016-03-23T10:07:47-07:00\",\n            \"content_node_id\": 20168057,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Craig\",\n            \"last_name\": \"Cunningham\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575454\n                }\n            ],\n            \"persona_id\": 18922316,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575454\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575455,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"3\",\n            \"updated_on\": \"2016-03-28T12:02:37-07:00\",\n            \"created_on\": \"2016-03-23T10:07:48-07:00\",\n            \"content_node_id\": 20168058,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Justin\",\n            \"last_name\": \"Florek\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575454\n                }\n            ],\n            \"persona_id\": 18922324,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575455\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575456,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"4\",\n            \"updated_on\": \"2016-03-28T12:02:46-07:00\",\n            \"created_on\": \"2016-03-23T10:07:52-07:00\",\n            \"content_node_id\": 20168060,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Alexander\",\n            \"last_name\": \"Khokhlachev\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575454\n                }\n            ],\n            \"persona_id\": 18922330,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575456\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575457,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"5\",\n            \"updated_on\": \"2016-03-28T12:02:55-07:00\",\n            \"created_on\": \"2016-03-23T10:07:54-07:00\",\n            \"content_node_id\": 20168062,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Torey\",\n            \"last_name\": \"Krug\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"abbreviation\": \"D\",\n                    \"sport_id\": 1,\n                    \"position\": 2,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575453\n                }\n            ],\n            \"persona_id\": 18922338,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575457\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575458,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"6\",\n            \"updated_on\": \"2016-04-11T08:18:28-07:00\",\n            \"created_on\": \"2016-03-23T10:07:56-07:00\",\n            \"content_node_id\": 20168063,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Tuukka\",\n            \"last_name\": \"Rask\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 3,\n                    \"name\": \"Goalie\",\n                    \"abbreviation\": \"G\",\n                    \"sport_id\": 1,\n                    \"position\": 3,\n                    \"updated_on\": \"2007-03-07T13:39:55-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575458\n                }\n            ],\n            \"persona_id\": 18922347,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575458\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        }\n    ],\n    \"permissions\": {\n        \"create\": true,\n        \"delete\": true\n    }\n}","name":"OK","status":200},{"language":"json","code":"{\n    \"id\": 1837158,\n    \"updated_on\": \"2016-04-14T09:43:56-07:00\",\n    \"created_on\": \"2016-03-22T13:19:12-07:00\",\n    \"static_group_id\": 1055410,\n    \"opponent\": null,\n    \"name\": null,\n    \"survey_id\": null,\n    \"roster_players\": [\n        {\n            \"id\": 11575453,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"1\",\n            \"updated_on\": \"2016-04-11T09:02:39-07:00\",\n            \"created_on\": \"2016-03-23T10:07:46-07:00\",\n            \"content_node_id\": 20168056,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": null,\n            \"first_name\": \"Christopher\",\n            \"last_name\": \"Breen\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"game_player\": null,\n            \"positions\": [\n                {\n                    \"abbreviation\": \"D\",\n                    \"ar_association_key_name\": 11575453,\n                    \"created_on\": null,\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"position\": 2,\n                    \"sport_id\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\"\n                }\n            ],\n            \"effective_status\": \"active\"\n        },\n        {\n            \"id\": 11575454,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"2\",\n            \"updated_on\": \"2016-03-28T12:02:15-07:00\",\n            \"created_on\": \"2016-03-23T10:07:47-07:00\",\n            \"content_node_id\": 20168057,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": null,\n            \"first_name\": \"Craig\",\n            \"last_name\": \"Cunningham\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"game_player\": null,\n            \"positions\": [\n                {\n                    \"abbreviation\": \"F\",\n                    \"ar_association_key_name\": 11575454,\n                    \"created_on\": null,\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"position\": 1,\n                    \"sport_id\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\"\n                }\n            ],\n            \"effective_status\": \"active\"\n        },\n        {\n            \"id\": 11575455,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"3\",\n            \"updated_on\": \"2016-03-28T12:02:37-07:00\",\n            \"created_on\": \"2016-03-23T10:07:48-07:00\",\n            \"content_node_id\": 20168058,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": null,\n            \"first_name\": \"Justin\",\n            \"last_name\": \"Florek\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"game_player\": null,\n            \"positions\": [\n                {\n                    \"abbreviation\": \"F\",\n                    \"ar_association_key_name\": 11575454,\n                    \"created_on\": null,\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"position\": 1,\n                    \"sport_id\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\"\n                }\n            ],\n            \"effective_status\": \"active\"\n        },\n        {\n            \"id\": 11575456,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"4\",\n            \"updated_on\": \"2016-03-28T12:02:46-07:00\",\n            \"created_on\": \"2016-03-23T10:07:52-07:00\",\n            \"content_node_id\": 20168060,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": null,\n            \"first_name\": \"Alexander\",\n            \"last_name\": \"Khokhlachev\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"game_player\": null,\n            \"positions\": [\n                {\n                    \"abbreviation\": \"F\",\n                    \"ar_association_key_name\": 11575454,\n                    \"created_on\": null,\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"position\": 1,\n                    \"sport_id\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\"\n                }\n            ],\n            \"effective_status\": \"active\"\n        },\n        {\n            \"id\": 11575457,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"5\",\n            \"updated_on\": \"2016-03-28T12:02:55-07:00\",\n            \"created_on\": \"2016-03-23T10:07:54-07:00\",\n            \"content_node_id\": 20168062,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": null,\n            \"first_name\": \"Torey\",\n            \"last_name\": \"Krug\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"game_player\": null,\n            \"positions\": [\n                {\n                    \"abbreviation\": \"D\",\n                    \"ar_association_key_name\": 11575453,\n                    \"created_on\": null,\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"position\": 2,\n                    \"sport_id\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\"\n                }\n            ],\n            \"effective_status\": \"active\"\n        },\n        {\n            \"id\": 11575458,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"6\",\n            \"updated_on\": \"2016-04-11T08:18:28-07:00\",\n            \"created_on\": \"2016-03-23T10:07:56-07:00\",\n            \"content_node_id\": 20168063,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": null,\n            \"first_name\": \"Tuukka\",\n            \"last_name\": \"Rask\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"game_player\": null,\n            \"positions\": [\n                {\n                    \"abbreviation\": \"G\",\n                    \"ar_association_key_name\": 11575458,\n                    \"created_on\": null,\n                    \"id\": 3,\n                    \"name\": \"Goalie\",\n                    \"position\": 3,\n                    \"sport_id\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:55-08:00\"\n                }\n            ],\n            \"effective_status\": \"active\"\n        }\n    ]\n}","name":"OK - for_game","status":200}]}},"category":"56e04eff40ba8722006415d6","childrenPages":[]}

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:
required
integer

Id of a Roster

Query Params

for_game:
integer

Id of a Game

team_instance_id:
integer

Id of a TeamInstance

Attributes

Name
Type
Description

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

https://api.sportngin.com/rosters/:id

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
    }
}


{"_id":"5707cd07ae06942b005d520a","excerpt":"The Index method returns an array of Roster Players matching the given parameters.\n\n###Parameters","link_external":false,"order":3,"project":"5641217e0ee5370d00da636d","sync_unique":"","title":"Roster Players Index","type":"get","user":"56e71f9edee212320019e731","__v":0,"editedParams":true,"githubsync":"","link_url":"","parentDoc":null,"version":"56cca51eca43550b002813fa","api":{"url":"/roster_players","auth":"required","examples":{"codes":[{"code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/roster_players?subseason_id=291621\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/roster_players?subseason_id=291621\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/roster_players?subseason_id=291621\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"in":"query","_id":"5707cd07ae06942b005d520c","default":"","desc":"","name":"subeason_id","ref":"","required":true,"type":"int"},{"default":"","desc":"For pagination; states which page from the set to return.","name":"page","ref":"","required":false,"type":"int","in":"query","_id":"5707cd07ae06942b005d520b"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"per_page\": 100,\n    \"current_page\": 1,\n    \"page_count\": 1,\n    \"roster_players\": [\n        {\n            \"id\": 11575453,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"1\",\n            \"updated_on\": \"2016-04-11T09:02:39-07:00\",\n            \"created_on\": \"2016-03-23T10:07:46-07:00\",\n            \"content_node_id\": 20168056,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Christopher\",\n            \"last_name\": \"Breen\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 2,\n                    \"name\": \"Defense\",\n                    \"abbreviation\": \"D\",\n                    \"sport_id\": 1,\n                    \"position\": 2,\n                    \"updated_on\": \"2007-03-07T13:39:44-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575453\n                }\n            ],\n            \"persona_id\": 18922209,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575453\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n        {\n            \"id\": 11575454,\n            \"roster_id\": 1837158,\n            \"jersey_number\": \"2\",\n            \"updated_on\": \"2016-03-28T12:02:15-07:00\",\n            \"created_on\": \"2016-03-23T10:07:47-07:00\",\n            \"content_node_id\": 20168057,\n            \"image_id\": null,\n            \"active_status\": true,\n            \"info\": [],\n            \"first_name\": \"Craig\",\n            \"last_name\": \"Cunningham\",\n            \"roster_type\": \"player\",\n            \"title\": null,\n            \"list_position\": 1,\n            \"inactive_info\": {},\n            \"status\": \"active\",\n            \"positions\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Forward\",\n                    \"abbreviation\": \"F\",\n                    \"sport_id\": 1,\n                    \"position\": 1,\n                    \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n                    \"created_on\": null,\n                    \"ar_association_key_name\": 11575454\n                }\n            ],\n            \"persona_id\": 18922316,\n            \"thumbnails\": {},\n            \"url_string\": \"http://apidemo.sportngin.com/roster_players/11575454\",\n            \"team_name\": \"Boston Bears\",\n            \"division_name\": \"Oceanic Division\",\n            \"league_name\": \"Eastern League\",\n            \"player_image_thumbnails\": [],\n            \"effective_status\": \"active\",\n            \"invite_status\": \"uninvited\",\n            \"invite_id\": null\n        },\n      ...","name":""}]},"settings":""},"category":"56e04eff40ba8722006415d6","createdAt":"2016-04-08T15:23:51.487Z","editedParams2":true,"isReference":true,"body":"","hidden":false,"slug":"roster-players-index","updates":[],"childrenPages":[]}

getRoster Players Index

The Index method returns an array of Roster Players matching the given parameters.

Parameters


Query Params

subeason_id:
required
integer
page:
integer

For pagination; states which page from the set to return.

Definition

https://api.sportngin.com/roster_players

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/roster_players?subseason_id=291621"

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
        },
      ...


{"_id":"56cca521ca43550b00281414","createdAt":"2016-01-20T19:08:43.830Z","hidden":false,"link_external":false,"slug":"roster_players-show","title":"Roster Players Show","version":"56cca51eca43550b002813fa","__v":0,"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Id of RosterPlayer\",\n    \"1-0\": \"roster_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"Id of Roster\",\n    \"2-0\": \"jersey_number\",\n    \"2-1\": \"String\",\n    \"3-0\": \"updated_on\",\n    \"3-1\": \"Timestamp\",\n    \"4-0\": \"created_on\",\n    \"4-1\": \"Timestamp\",\n    \"5-0\": \"content_node_id\",\n    \"5-1\": \"Integer\",\n    \"6-0\": \"image_id\",\n    \"6-1\": \"Integer\",\n    \"7-0\": \"active_status\",\n    \"7-1\": \"Boolean\",\n    \"8-0\": \"info\",\n    \"9-0\": \"first_name\",\n    \"10-0\": \"last_name\",\n    \"11-0\": \"roster_type\",\n    \"12-0\": \"title\",\n    \"13-0\": \"list_position\",\n    \"14-0\": \"inactive_info\",\n    \"15-0\": \"status\",\n    \"16-0\": \"positions\",\n    \"17-0\": \"thumbnails\",\n    \"18-0\": \"url_string\",\n    \"19-0\": \"team_name\",\n    \"20-0\": \"division_name\",\n    \"21-0\": \"league_name\",\n    \"22-0\": \"player_image_thumbnails\",\n    \"23-0\": \"effective_status\",\n    \"24-0\": \"invite_status\",\n    \"25-0\": \"invite_id\",\n    \"25-1\": \"Integer\",\n    \"25-2\": \"Id of OphanInvite\",\n    \"9-1\": \"String\",\n    \"10-1\": \"String\",\n    \"11-1\": \"String\",\n    \"11-2\": \"Type of player. This can be \\\"player\\\" or \\\"coach\\\".\",\n    \"12-1\": \"String\",\n    \"12-2\": \"Coach's title\",\n    \"8-1\": \"Array\",\n    \"8-2\": \"Metadata related to player\",\n    \"6-2\": \"Id of Image\",\n    \"5-2\": \"Id of ContentNode\",\n    \"3-2\": \"Timestamp of last update\",\n    \"4-2\": \"Timestamp when created\",\n    \"19-2\": \"Name of the team that a player belongs to (derived)\",\n    \"20-2\": \"Name of the division that a player belongs to (derived)\",\n    \"21-2\": \"Name of the league that a player belongs to (derived)\",\n    \"24-1\": \"String\",\n    \"24-2\": \"Status of OrphanInvite\",\n    \"23-1\": \"String\",\n    \"21-1\": \"String\",\n    \"20-1\": \"String\",\n    \"19-1\": \"String\",\n    \"18-1\": \"String\",\n    \"16-1\": \"Array\",\n    \"16-2\": \"Positions assigned to player\",\n    \"15-1\": \"String\",\n    \"13-1\": \"Integer\",\n    \"13-2\": \"Used to order players within the roster\",\n    \"14-1\": \"Object\",\n    \"9-2\": \"First name of player\",\n    \"10-2\": \"Last name of the player\",\n    \"2-2\": \"Number on the player's jersey\",\n    \"7-2\": \"Boolean representation of the status field (derived)\",\n    \"15-2\": \"Status of player. Can be \\\"active\\\", \\\"disabled\\\" or \\\"suspended\\\".\",\n    \"18-2\": \"Site specific url that the player can be viewed on\",\n    \"17-1\": \"Object\",\n    \"22-1\": \"Array\",\n    \"23-2\": \"Status with extra logic to determine if the player is suspended. (derived)\",\n    \"22-2\": \"Array of urls pointing to thumbnails of player image (derived)\",\n    \"17-2\": \"Object with relative links to large, medium, and small thumbnails (derived)\",\n    \"14-2\": \"Object with metadata related to an inactive player\"\n  },\n  \"cols\": 3,\n  \"rows\": 26\n}\n[/block]","category":"56e04eff40ba8722006415d6","project":"5641217e0ee5370d00da636d","type":"get","api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/roster_players/11958954\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/roster_players/11958954\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/roster_players/11958954\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"ref":"","required":true,"type":"int","in":"path","_id":"569fdb70c0864f1700565169","default":"","desc":"Id of roster player to be displayed","name":"id"}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 11958954,\n    \"roster_id\": 1837158,\n    \"jersey_number\": \"8\",\n    \"updated_on\": \"2016-04-14T12:06:07-07:00\",\n    \"created_on\": \"2016-04-14T12:00:57-07:00\",\n    \"content_node_id\": 20712240,\n    \"image_id\": null,\n    \"active_status\": true,\n    \"info\": [],\n    \"first_name\": \"Joe\",\n    \"last_name\": \"Sakik\",\n    \"roster_type\": \"player\",\n    \"title\": null,\n    \"list_position\": 1,\n    \"inactive_info\": {},\n    \"status\": \"active\",\n    \"positions\": [\n        {\n            \"id\": 1,\n            \"name\": \"Forward\",\n            \"abbreviation\": \"F\",\n            \"sport_id\": 1,\n            \"position\": 1,\n            \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n            \"created_on\": null\n        }\n    ],\n    \"persona_id\": 19415664,\n    \"thumbnails\": {},\n    \"url_string\": \"http://apidemo.sportngin.com/roster_players/11958954\",\n    \"team_name\": \"Boston Bears\",\n    \"division_name\": \"Oceanic Division\",\n    \"league_name\": \"Eastern League\",\n    \"player_image_thumbnails\": [],\n    \"effective_status\": \"active\",\n    \"invite_status\": \"uninvited\",\n    \"invite_id\": null\n}","name":"","status":200}]},"settings":"","url":"/roster_players/:id","auth":"required"},"excerpt":"The Show method returns a single Roster Player for a given `id`.\n\n###Parameters","githubsync":"","isReference":true,"order":4,"parentDoc":null,"sync_unique":"","user":"569e96c56b4a2c0d007e9153","editedParams":true,"editedParams2":true,"link_url":"","updates":[],"childrenPages":[]}

getRoster Players Show

The Show method returns a single Roster Player for a given id.

Parameters


Path Params

id:
required
integer

Id of roster player to be displayed

Attributes

Name
Type
Description

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

https://api.sportngin.com/roster_players/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/roster_players/11958954"

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
}


{"_id":"56e05039f97d422900d63987","githubsync":"","hidden":false,"project":"5641217e0ee5370d00da636d","user":"56548c568975c70d002ea4b4","__v":6,"api":{"settings":"","url":"/roster_players?:roster_id&:first_name&:last_name OR https://api.sportngin.com/roster_players?:site_id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"roster_id\": \"1837158\",\n    \"first_name\": \"Teemu\",\n    \"last_name\": \"Selane\",\n    \"jersey_number\": \"8\",\n    \"roster_player\": {\n        \"position_ids\": \"1\"\n    }\n}' \"https://api.sportngin.com/roster_players\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/roster_players\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"roster_id\\\": \\\"1837158\\\",\\n    \\\"first_name\\\": \\\"Teemu\\\",\\n    \\\"last_name\\\": \\\"Selane\\\",\\n    \\\"jersey_number\\\": \\\"8\\\",\\n    \\\"roster_player\\\": {\\n        \\\"position_ids\\\": \\\"1\\\"\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"roster_id\\\": \\\"1837158\\\",\\n    \\\"first_name\\\": \\\"Teemu\\\",\\n    \\\"last_name\\\": \\\"Selane\\\",\\n    \\\"jersey_number\\\": \\\"8\\\",\\n    \\\"roster_player\\\": {\\n        \\\"position_ids\\\": \\\"1\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://ssl.sportngin.com/roster_players\")\n  .post(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"code":"curl -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\"-d '{\n    \"roster_id\": \"1837158\",\n    \"persona_id\": \"15816231\",\n    \"survey_result_id\": \"16953112\"\n}' \"https://api.sportngin.com/roster_players?site_id=11953\"","language":"curl","name":"cURL - persona_id"},{"language":"ruby","name":"Ruby - persona_id","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/roster_players?site_id=11953\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"roster_id\\\": \\\"1837158\\\",\\n    \\\"persona_id\\\": \\\"15816231\\\"\\n    \\\"survey_result_id\\\": \\\"16953112\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"name":"Java - persona_id","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"roster_id\\\": \\\"1837158\\\",\\n    \\\"persona_id\\\": \\\"15816231\\\"\\n    \\\"survey_result_id\\\": \\\"16953112\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/roster_players?site_id=11953\")\n  .post(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[{"_id":"569fdb70c0864f1700565169","ref":"","in":"path","required":true,"desc":"Id of roster player to be displayed","default":"","type":"string","name":"roster_id"},{"_id":"56e0517d903c7a29001d52d6","ref":"","in":"path","required":true,"desc":"First name of player","default":"","type":"string","name":"first_name"},{"_id":"56e0517d903c7a29001d52d5","ref":"","in":"path","required":true,"desc":"Last name of player","default":"","type":"string","name":"last_name"},{"_id":"56e0517d903c7a29001d52d4","ref":"","in":"body","required":false,"desc":"Number of player's jersey","default":"","type":"string","name":"jersey_number"},{"_id":"56e0517d903c7a29001d52d3","ref":"","in":"body","required":false,"desc":"Ids of the positions of the player","default":"","type":"array_int","name":"position_ids"},{"_id":"56e0517d903c7a29001d52d2","ref":"","in":"body","required":false,"desc":"Metadata related to the player","default":"","type":"array_object","name":"info"},{"_id":"56e0517d903c7a29001d52d1","ref":"","in":"body","required":false,"desc":"Email of player","default":"","type":"string","name":"email"},{"_id":"56e0517d903c7a29001d52d0","ref":"","in":"body","required":false,"desc":"Base-64 representation of photo","default":"","type":"string","name":"photo"},{"_id":"56e0517d903c7a29001d52cf","ref":"","in":"body","required":false,"desc":"Date of birth of the player","default":"","type":"string","name":"date_of_birth"},{"_id":"56e0517d903c7a29001d52ce","ref":"","in":"body","required":false,"desc":"Gender of the player","default":"","type":"string","name":"gender"},{"_id":"587e5aae58666c2700965d10","ref":"","in":"path","required":false,"desc":"Id of persona to be rostered. If using persona_id, only the roster_id is required along with it","default":"","type":"string","name":"persona_id"},{"_id":"5ad7afa00cbbc80003232414","ref":"","in":"path","required":false,"desc":"Id of the survey result to tie the new roster play back to","default":"","type":"string","name":"survey_result_id"},{"_id":"5bc10121938ccd0003356315","ref":"","in":"path","required":false,"desc":"Id of the site to which the survey belongs","default":"","type":"string","name":"site_id"}],"results":{"codes":[{"name":"","code":"{\n    \"active_status\": true,\n    \"content_node_id\": 20712240,\n    \"created_on\": \"2016-04-14T12:00:57-07:00\",\n    \"first_name\": \"Teemu\",\n    \"id\": 11958954,\n    \"image_id\": null,\n    \"inactive_info\": {},\n    \"info\": [],\n    \"jersey_number\": \"8\",\n    \"last_name\": \"Selane\",\n    \"list_position\": 1,\n    \"roster_id\": 1837158,\n    \"roster_type\": \"player\",\n    \"status\": \"active\",\n    \"title\": null,\n    \"updated_on\": \"2016-04-14T12:00:57-07:00\",\n    \"positions\": [\n        {\n            \"abbreviation\": \"F\",\n            \"created_on\": null,\n            \"id\": 1,\n            \"name\": \"Forward\",\n            \"position\": 1,\n            \"sport_id\": 1,\n            \"updated_on\": \"2007-03-07T13:39:32-08:00\"\n        }\n    ],\n    \"player_image_thumbnails\": [],\n    \"effective_status\": \"active\",\n    \"invite_status\": \"uninvited\",\n    \"invite_id\": null\n}","language":"json","status":200}]}},"editedParams":true,"next":{"description":"","pages":[]},"parentDoc":null,"sync_unique":"","title":"Roster Players Create","type":"post","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Id of RosterPlayer\",\n    \"1-0\": \"roster_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"Id of Roster\",\n    \"2-0\": \"jersey_number\",\n    \"2-1\": \"String\",\n    \"3-0\": \"updated_on\",\n    \"3-1\": \"Timestamp\",\n    \"4-0\": \"created_on\",\n    \"4-1\": \"Timestamp\",\n    \"5-0\": \"content_node_id\",\n    \"5-1\": \"Integer\",\n    \"6-0\": \"image_id\",\n    \"6-1\": \"Integer\",\n    \"7-0\": \"active_status\",\n    \"7-1\": \"Boolean\",\n    \"8-0\": \"info\",\n    \"9-0\": \"first_name\",\n    \"10-0\": \"last_name\",\n    \"11-0\": \"roster_type\",\n    \"12-0\": \"title\",\n    \"13-0\": \"list_position\",\n    \"14-0\": \"inactive_info\",\n    \"15-0\": \"status\",\n    \"16-0\": \"positions\",\n    \"17-0\": \"thumbnails\",\n    \"18-0\": \"url_string\",\n    \"19-0\": \"team_name\",\n    \"20-0\": \"division_name\",\n    \"21-0\": \"league_name\",\n    \"22-0\": \"player_image_thumbnails\",\n    \"23-0\": \"effective_status\",\n    \"24-0\": \"invite_status\",\n    \"25-0\": \"invite_id\",\n    \"25-1\": \"Integer\",\n    \"25-2\": \"Id of OphanInvite\",\n    \"9-1\": \"String\",\n    \"10-1\": \"String\",\n    \"11-1\": \"String\",\n    \"11-2\": \"Type of player. This can be \\\"player\\\" or \\\"coach\\\".\",\n    \"12-1\": \"String\",\n    \"12-2\": \"Coach's title\",\n    \"8-1\": \"Array\",\n    \"8-2\": \"Metadata related to player\",\n    \"6-2\": \"Id of Image\",\n    \"5-2\": \"Id of ContentNode\",\n    \"3-2\": \"Timestamp of last update\",\n    \"4-2\": \"Timestamp when created\",\n    \"19-2\": \"Name of the team that a player belongs to (derived)\",\n    \"20-2\": \"Name of the division that a player belongs to (derived)\",\n    \"21-2\": \"Name of the league that a player belongs to (derived)\",\n    \"24-1\": \"String\",\n    \"24-2\": \"Status of OrphanInvite\",\n    \"23-1\": \"String\",\n    \"21-1\": \"String\",\n    \"20-1\": \"String\",\n    \"19-1\": \"String\",\n    \"18-1\": \"String\",\n    \"16-1\": \"Array\",\n    \"16-2\": \"Positions assigned to player\",\n    \"15-1\": \"String\",\n    \"13-1\": \"Integer\",\n    \"13-2\": \"Used to order players within the roster\",\n    \"14-1\": \"Object\",\n    \"9-2\": \"First name of player\",\n    \"10-2\": \"Last name of the player\",\n    \"2-2\": \"Number on the player's jersey\",\n    \"7-2\": \"Boolean representation of the status field (derived)\",\n    \"15-2\": \"Status of player. Can be \\\"active\\\", \\\"disabled\\\" or \\\"suspended\\\".\",\n    \"18-2\": \"Site specific url that the player can be viewed on\",\n    \"17-1\": \"Object\",\n    \"22-1\": \"Array\",\n    \"23-2\": \"Status with extra logic to determine if the player is suspended. (derived)\",\n    \"22-2\": \"Array of urls pointing to thumbnails of player image (derived)\",\n    \"17-2\": \"Object with relative links to large, medium, and small thumbnails (derived)\",\n    \"14-2\": \"Object with metadata related to an inactive player\"\n  },\n  \"cols\": 3,\n  \"rows\": 26\n}\n[/block]","updates":[],"version":"56cca51eca43550b002813fa","excerpt":"The Create method accepts a single Roster Player (see attributes above) and creates a new record in SportsEngine.\n\nA 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.\n\n###Parameters","link_external":false,"link_url":"","createdAt":"2016-03-09T16:32:57.588Z","editedParams2":true,"order":5,"slug":"roster-players-create","category":"56e04eff40ba8722006415d6","isReference":true,"childrenPages":[]}

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

roster_id:
required
string

Id of roster player to be displayed

first_name:
required
string

First name of player

last_name:
required
string

Last name of player

persona_id:
string

Id of persona to be rostered. If using persona_id, only the roster_id is required along with it

survey_result_id:
string

Id of the survey result to tie the new roster play back to

site_id:
string

Id of the site to which the survey belongs

Body Params

jersey_number:
string

Number of player's jersey

position_ids:
array of integers

Ids of the positions of the player

info:
array of objects

Metadata related to the player

email:
string

Email of player

photo:
string

Base-64 representation of photo

date_of_birth:
string

Date of birth of the player

gender:
string

Gender of the player

Attributes

Name
Type
Description

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

https://api.sportngin.com/roster_players?:roster_id&:first_name&:last_name OR https://api.sportngin.com/roster_players?:site_id

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
}


{"_id":"570fe99f79b89419005475be","api":{"settings":"","url":"/roster_players/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"roster_player\":{\n        \"first_name\": \"Joe\",\n        \"last_name\": \"Sakik\",\n        \"position_ids\": 1\n        }\n}' \"https://api.sportngin.com/roster_players/11958954\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/roster_players/11958954\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"roster_player\\\":{\\n        \\\"first_name\\\": \\\"Joe\\\",\\n        \\\"last_name\\\": \\\"Sakik\\\",\\n        \\\"position_ids\\\": 1\\n        }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"roster_player\\\":{\\n        \\\"first_name\\\": \\\"Joe\\\",\\n        \\\"last_name\\\": \\\"Sakik\\\",\\n        \\\"position_ids\\\": 1\\n        }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/roster_players/11958954\")\n  .post(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"default":"","type":"int","name":"id","in":"path","_id":"570feadbfda5082400ebcd02","ref":"","required":false,"desc":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 11958954,\n    \"roster_id\": 1837158,\n    \"jersey_number\": \"8\",\n    \"updated_on\": \"2016-04-14T12:06:07-07:00\",\n    \"created_on\": \"2016-04-14T12:00:57-07:00\",\n    \"content_node_id\": 20712240,\n    \"image_id\": null,\n    \"active_status\": true,\n    \"info\": [],\n    \"first_name\": \"Joe\",\n    \"last_name\": \"Sakik\",\n    \"roster_type\": \"player\",\n    \"title\": null,\n    \"list_position\": 1,\n    \"inactive_info\": {},\n    \"status\": \"active\",\n    \"positions\": [\n        {\n            \"id\": 1,\n            \"name\": \"Forward\",\n            \"abbreviation\": \"F\",\n            \"sport_id\": 1,\n            \"position\": 1,\n            \"updated_on\": \"2007-03-07T13:39:32-08:00\",\n            \"created_on\": null\n        }\n    ],\n    \"persona_id\": 19415664,\n    \"thumbnails\": {},\n    \"url_string\": \"http://apidemo.sportngin.com/roster_players/11958954\",\n    \"team_name\": \"Boston Bears\",\n    \"division_name\": \"Oceanic Division\",\n    \"league_name\": \"Eastern League\",\n    \"player_image_thumbnails\": [],\n    \"effective_status\": \"active\",\n    \"invite_status\": \"uninvited\",\n    \"invite_id\": null\n}","name":""}]}},"createdAt":"2016-04-14T19:03:59.191Z","editedParams":true,"editedParams2":true,"githubsync":"","title":"Roster Players Update","version":"56cca51eca43550b002813fa","body":"","link_external":false,"order":6,"updates":[],"user":"56548c568975c70d002ea4b4","isReference":true,"link_url":"","parentDoc":null,"project":"5641217e0ee5370d00da636d","slug":"roster-players-update","type":"put","__v":2,"category":"56e04eff40ba8722006415d6","excerpt":"The Update method accepts a single Roster Player (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","hidden":false,"sync_unique":"","childrenPages":[]}

putRoster Players Update

The Update method accepts a single Roster Player (see attributes above) and updates the matching record in SportsEngine.

Parameters


Path Params

id:
integer

Definition

https://api.sportngin.com/roster_players/:id

Examples

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
    "roster_player":{
        "first_name": "Joe",
        "last_name": "Sakik",
        "position_ids": 1
        }
}' "https://api.sportngin.com/roster_players/11958954"

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
}


{"_id":"570fee7c277cba22000c8850","isReference":true,"link_external":false,"slug":"roster-players-delete","sync_unique":"","api":{"url":"/roster_players/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/roster_players/11958882\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/roster_players/11958882\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/roster_players/11958882\")\n  .delete(null)\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"default":"","type":"int","name":"id","in":"path","_id":"570fee7c277cba22000c8851","ref":"","required":true,"desc":"Id of roster_player to delete"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 11958882,\n    \"roster_id\": 1837158,\n    \"jersey_number\": \"8\",\n    \"updated_on\": \"2016-04-14T11:59:18-07:00\",\n    \"created_on\": \"2016-04-14T11:59:18-07:00\",\n    \"content_node_id\": 20712139,\n    \"image_id\": null,\n    \"active_status\": true,\n    \"info\": [],\n    \"first_name\": \"Teemu\",\n    \"last_name\": \"ane\",\n    \"roster_type\": \"player\",\n    \"title\": null,\n    \"list_position\": 1,\n    \"inactive_info\": {},\n    \"status\": \"active\",\n    \"positions\": [],\n    \"persona_id\": null,\n    \"thumbnails\": {},\n    \"url_string\": \"http://apidemo.sportngin.com/roster_players/11958882\",\n    \"team_name\": \"Boston Bears\",\n    \"division_name\": \"Oceanic Division\",\n    \"league_name\": \"Eastern League\",\n    \"player_image_thumbnails\": [],\n    \"effective_status\": \"active\",\n    \"invite_status\": \"accepted\",\n    \"invite_id\": null\n}","name":""}]},"settings":""},"body":"","createdAt":"2016-04-14T19:24:44.345Z","editedParams":true,"updates":[],"user":"56548c568975c70d002ea4b4","hidden":false,"parentDoc":null,"__v":0,"editedParams2":true,"excerpt":"The Delete method permanently deletes the matching Roster Player record in SportsEngine.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","githubsync":"","link_url":"","project":"5641217e0ee5370d00da636d","type":"delete","version":"56cca51eca43550b002813fa","category":"56e04eff40ba8722006415d6","order":7,"title":"Roster Players Delete","childrenPages":[]}

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:
required
integer

Id of roster_player to delete

Definition

https://api.sportngin.com/roster_players/:id

Examples

curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/roster_players/11958882"

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
}


{"_id":"57002d0f215e0f0e007866d8","api":{"params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"","auth":"required"},"excerpt":"Game Players are the participants in a given Game.  A Game Player has [Positions](https://sportnginv2.readme.io/docs/positions-index), a `jersey_number`, `roster_player_id`, `team_id`, and a `game_id`.  [Positions](https://sportnginv2.readme.io/docs/positions-index) represent the various types of participants in a [Sport](ref:sports).\n\n###Associations\nA Game Player belongs to a [Game](https://sportnginv2.readme.io/docs/games-show) and a [Roster Player](https://sportnginv2.readme.io/docs/roster_players-show).","hidden":false,"project":"5641217e0ee5370d00da636d","category":"56e731d46997f52900f9ca42","isReference":true,"parentDoc":null,"type":"basic","updates":[],"user":"56cbf1419f4ae20b00644fde","version":"56cca51eca43550b002813fa","body":"","createdAt":"2016-04-02T20:35:27.127Z","githubsync":"","link_external":false,"order":0,"sync_unique":"","title":"Game Players","__v":8,"slug":"game-players","link_url":"","childrenPages":[]}

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.


{"_id":"56f19a6b3eb62a34003e9ffc","order":1,"slug":"game-players-index","editedParams":true,"githubsync":"","hidden":false,"isReference":true,"title":"Game Players Index","user":"56e71f9edee212320019e731","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/game_players?game_id=13557134&team_id=1876243\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/game_players?game_id=13557134&team_id=1876243\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"game_id\\\": \\\"13557134\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"game_id\\\": \\\"13557134\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/game_players?game_id=13557134&team_id=1876243\")\n  .get()\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"type":"int","in":"query","_id":"56f19a6b3eb62a34003e9ffe","default":"","desc":"","name":"game_id","ref":"","required":true},{"name":"team_id","ref":"","required":true,"type":"int","in":"query","_id":"56f19a6b3eb62a34003e9ffd","default":"","desc":"Team Instance ID"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n    {\n        \"created_at\": \"2016-04-11T09:02:35-07:00\",\n        \"game_id\": 13557134,\n        \"id\": 8754667,\n        \"jersey_number\": \"1\",\n        \"roster_player_id\": 11575453,\n        \"updated_at\": \"2016-04-11T09:02:35-07:00\",\n        \"positions\": [\n            {\n                \"abbreviation\": \"D\",\n                \"created_on\": null,\n                \"id\": 2,\n                \"name\": \"Defense\",\n                \"position\": 2,\n                \"sport_id\": 1,\n                \"updated_on\": \"2007-03-07T13:39:44-08:00\"\n            }\n        ],\n        \"roster_player\": {\n            \"active_status\": true,\n            \"content_node_id\": 20168056,\n            \"created_on\": \"2016-03-23T10:07:46-07:00\",\n            \"first_name\": \"Christopher\",\n            \"id\": 11575453,\n            \"image_id\": null,\n            \"inactive_info\": {},\n            \"info\": [],\n            \"jersey_number\": \"1\",\n            \"last_name\": \"Breen\",\n            \"list_position\": 1,\n            \"roster_id\": 1837158,\n            \"roster_type\": \"player\",\n            \"status\": \"active\",\n            \"title\": null,\n            \"updated_on\": \"2016-04-11T09:02:39-07:00\"\n        }\n    },\n    {\n        \"created_at\": \"2016-04-11T08:18:27-07:00\",\n        \"game_id\": 13557134,\n        \"id\": 8754539,\n        \"jersey_number\": \"6\",\n        \"roster_player_id\": 11575458,\n        \"updated_at\": \"2016-04-11T08:54:19-07:00\",\n        \"positions\": [\n            {\n                \"abbreviation\": \"G\",\n                \"created_on\": null,\n                \"id\": 3,\n                \"name\": \"Goalie\",\n                \"position\": 3,\n                \"sport_id\": 1,\n                \"updated_on\": \"2007-03-07T13:39:55-08:00\"\n            }\n        ],\n        \"roster_player\": {\n            \"active_status\": true,\n            \"content_node_id\": 20168063,\n            \"created_on\": \"2016-03-23T10:07:56-07:00\",\n            \"first_name\": \"Tuukka\",\n            \"id\": 11575458,\n            \"image_id\": null,\n            \"inactive_info\": {},\n            \"info\": [],\n            \"jersey_number\": \"6\",\n            \"last_name\": \"Rask\",\n            \"list_position\": 1,\n            \"roster_id\": 1837158,\n            \"roster_type\": \"player\",\n            \"status\": \"active\",\n            \"title\": null,\n            \"updated_on\": \"2016-04-11T08:18:28-07:00\"\n        }\n    }\n]"}]},"settings":"","url":"/game_players"},"body":"","link_external":false,"project":"5641217e0ee5370d00da636d","sync_unique":"","type":"get","createdAt":"2016-03-22T19:18:03.017Z","excerpt":"The Index method returns an array of Game Players matching the given parameters.\n\n###Parameters","link_url":"","parentDoc":null,"version":"56cca51eca43550b002813fa","__v":0,"category":"56e731d46997f52900f9ca42","editedParams2":true,"updates":[],"childrenPages":[]}

getGame Players Index

The Index method returns an array of Game Players matching the given parameters.

Parameters


Query Params

game_id:
required
integer
team_id:
required
integer

Team Instance ID

Definition

https://api.sportngin.com/game_players

Examples

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/game_players?game_id=13557134&team_id=1876243"

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"
        }
    }
]


{"_id":"56f19b1c4476fb2200795e41","hidden":false,"link_external":false,"parentDoc":null,"project":"5641217e0ee5370d00da636d","title":"Game Players Show","__v":0,"api":{"settings":"","url":"/game_players/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/game_players/8754539\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/game_players/8754539\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"roster_player_id\\\": \\\"11575458\\\",\\n    \\\"game_id\\\": \\\"13557134\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"roster_player_id\\\": \\\"11575458\\\",\\n    \\\"game_id\\\": \\\"13557134\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/game_players/8754539\")\n  .get()\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"default":"","desc":"","name":"id","ref":"","required":true,"type":"int","in":"path","_id":"56f19b1c4476fb2200795e42"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"created_at\": \"2016-04-11T08:18:27-07:00\",\n    \"game_id\": 13557134,\n    \"id\": 8754539,\n    \"jersey_number\": \"6\",\n    \"roster_player_id\": 11575458,\n    \"updated_at\": \"2016-04-11T08:18:27-07:00\",\n    \"positions\": [],\n    \"roster_player\": {\n        \"active_status\": true,\n        \"content_node_id\": 20168063,\n        \"created_on\": \"2016-03-23T10:07:56-07:00\",\n        \"first_name\": \"Tuukka\",\n        \"id\": 11575458,\n        \"image_id\": null,\n        \"inactive_info\": {},\n        \"info\": [],\n        \"jersey_number\": \"6\",\n        \"last_name\": \"Rask\",\n        \"list_position\": 1,\n        \"roster_id\": 1837158,\n        \"roster_type\": \"player\",\n        \"status\": \"active\",\n        \"title\": null,\n        \"updated_on\": \"2016-04-11T08:18:28-07:00\"\n    }\n}","name":""}]}},"excerpt":"The Show method returns a single Events for a given `id`, representing a `game_player_id`.\n\n###Parameters","type":"get","createdAt":"2016-03-22T19:21:00.205Z","editedParams":true,"githubsync":"","isReference":true,"link_url":"","updates":[],"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Unique ID assigned by NGIN\",\n    \"1-0\": \"home_team_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"ID of the home team_instance\",\n    \"2-0\": \"away_team_id\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"ID of the away team_instance\",\n    \"3-0\": \"roster_player_id\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"ID of the roster player\",\n    \"4-0\": \"positions\",\n    \"4-1\": \"Integer\",\n    \"5-0\": \"jersey_number\",\n    \"5-1\": \"Integer\",\n    \"6-0\": \"position_id\",\n    \"6-1\": \"Integer\",\n    \"7-1\": \"Integer\",\n    \"7-0\": \"roster_player\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]","user":"56e71f9edee212320019e731","order":2,"slug":"game-players-show","sync_unique":"","version":"56cca51eca43550b002813fa","category":"56e731d46997f52900f9ca42","editedParams2":true,"childrenPages":[]}

getGame Players Show

The Show method returns a single Events for a given id, representing a game_player_id.

Parameters


Path Params

id:
required
integer

Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/game_players/:id

Examples

curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/game_players/8754539"

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"
    }
}


{"_id":"56f19c81613767200094127c","link_url":"","user":"56e71f9edee212320019e731","isReference":true,"link_external":false,"category":"56e731d46997f52900f9ca42","editedParams2":true,"parentDoc":null,"project":"5641217e0ee5370d00da636d","updates":[],"__v":0,"body":"","editedParams":true,"excerpt":"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`.\n\n###Parameters","githubsync":"","order":3,"slug":"game-players-create","sync_unique":"","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"roster_player_id\": \"11575458\",\n    \"game_id\": \"13557134\"\n}' \"https://api.sportngin.com/game_players\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/game_players\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"roster_player_id\\\": \\\"11575458\\\",\\n    \\\"game_id\\\": \\\"13557134\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"roster_player_id\\\": \\\"11575458\\\",\\n    \\\"game_id\\\": \\\"13557134\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/game_players\")\n  .post(body)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post","params":[{"type":"int","in":"body","_id":"56f19c816137672000941280","default":"","desc":"","name":"roster_player_id","ref":"","required":true},{"ref":"","required":true,"type":"int","in":"body","_id":"56f19c81613767200094127f","default":"","desc":"","name":"game_id"},{"in":"body","_id":"56f19c81613767200094127e","default":"","desc":"","name":"team_instance_id","ref":"","required":false,"type":"int"},{"type":"int","in":"body","_id":"56f19c81613767200094127d","default":"","desc":"","name":"jersey_number","ref":"","required":false}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"created_at\": \"2016-04-11T08:18:27-07:00\",\n    \"game_id\": 13557134,\n    \"id\": 8754539,\n    \"jersey_number\": \"6\",\n    \"roster_player_id\": 11575458,\n    \"updated_at\": \"2016-04-11T08:18:27-07:00\",\n    \"positions\": [],\n    \"roster_player\": {\n        \"active_status\": true,\n        \"content_node_id\": 20168063,\n        \"created_on\": \"2016-03-23T10:07:56-07:00\",\n        \"first_name\": \"Tuukka\",\n        \"id\": 11575458,\n        \"image_id\": null,\n        \"inactive_info\": {},\n        \"info\": [],\n        \"jersey_number\": \"6\",\n        \"last_name\": \"Rask\",\n        \"list_position\": 1,\n        \"roster_id\": 1837158,\n        \"roster_type\": \"player\",\n        \"status\": \"active\",\n        \"title\": null,\n        \"updated_on\": \"2016-03-28T12:03:05-07:00\"\n    }\n}","name":""}]},"settings":"","url":"/game_players"},"type":"post","title":"Game Players Create","version":"56cca51eca43550b002813fa","createdAt":"2016-03-22T19:26:57.810Z","hidden":false,"childrenPages":[]}

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

roster_player_id:
required
integer
game_id:
required
integer
team_instance_id:
integer
jersey_number:
integer

Definition

https://api.sportngin.com/game_players

Examples

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
    "roster_player_id": "11575458",
    "game_id": "13557134"
}' "https://api.sportngin.com/game_players"

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"
    }
}


{"_id":"56f95211313dbf2900fe80a5","type":"put","__v":0,"excerpt":"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`.\n\n###Parameters","hidden":false,"isReference":true,"slug":"game-players-update-1","link_external":false,"sync_unique":"","project":"5641217e0ee5370d00da636d","user":"5678311948c8d00d0094b803","version":"56cca51eca43550b002813fa","body":"","editedParams2":true,"githubsync":"","link_url":"","order":4,"parentDoc":null,"title":"Game Players Update","updates":[],"api":{"settings":"","url":"/game_players/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"jersey_number\": \"123\"\n}' \"https://api.sportngin.com/game_players/8754539\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/game_players/8754539\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"jersey_number\\\": \\\"123\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"jersey_number\\\": \\\"123\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/game_players/8754539\")\n  .put(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"put","params":[{"default":"","type":"int","name":"jersey_number","in":"body","_id":"56f19d7e0157b9200072def7","ref":"","required":true,"desc":""},{"in":"body","_id":"56f19d7e0157b9200072def6","default":"","desc":"","name":"position_ids","ref":"","required":false,"type":"int"},{"default":"","desc":"","name":"positions","ref":"","required":false,"type":"int","in":"body","_id":"56f19d7e0157b9200072def5"},{"required":false,"type":"int","in":"body","_id":"56f19d7e0157b9200072def4","default":"","desc":"","name":"roster_players","ref":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"created_at\": \"2016-04-11T08:18:27-07:00\",\n    \"game_id\": 13557134,\n    \"id\": 8754539,\n    \"jersey_number\": \"123\",\n    \"roster_player_id\": 11575458,\n    \"updated_at\": \"2016-04-11T08:26:00-07:00\",\n    \"positions\": [],\n    \"roster_player\": {\n        \"active_status\": true,\n        \"content_node_id\": 20168063,\n        \"created_on\": \"2016-03-23T10:07:56-07:00\",\n        \"first_name\": \"Tuukka\",\n        \"id\": 11575458,\n        \"image_id\": null,\n        \"inactive_info\": {},\n        \"info\": [],\n        \"jersey_number\": \"6\",\n        \"last_name\": \"Rask\",\n        \"list_position\": 1,\n        \"roster_id\": 1837158,\n        \"roster_type\": \"player\",\n        \"status\": \"active\",\n        \"title\": null,\n        \"updated_on\": \"2016-04-11T08:18:28-07:00\"\n    }\n}","name":""}]}},"category":"56e731d46997f52900f9ca42","createdAt":"2016-03-28T15:47:29.551Z","editedParams":true,"childrenPages":[]}

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

jersey_number:
required
integer
position_ids:
integer
positions:
integer
roster_players:
integer

Definition

https://api.sportngin.com/game_players/:id

Examples

curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
    "jersey_number": "123"
}' "https://api.sportngin.com/game_players/8754539"

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"
    }
}


{"_id":"56f19e624476fb2200795e46","type":"delete","version":"56cca51eca43550b002813fa","category":"56e731d46997f52900f9ca42","order":5,"project":"5641217e0ee5370d00da636d","sync_unique":"","user":"56e71f9edee212320019e731","body":"","githubsync":"","hidden":false,"link_external":false,"title":"Game Players Delete","api":{"auth":"required","examples":{"codes":[{"code":"curl -X DELETE -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '' \"https://api.stage.ngin-staging.com/game_players/8738357?game_id=13529186&roster_player_id=11575454\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.stage.ngin-staging.com/game_players/8738357?game_id=13529186&roster_player_id=11575454\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.stage.ngin-staging.com/game_players/8738357?game_id=13529186&roster_player_id=11575454\")\n  .delete(null)\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"ref":"","required":true,"type":"int","in":"body","_id":"56f19e624476fb2200795e48","default":"","desc":"","name":"game_id"},{"in":"body","_id":"56f19e624476fb2200795e47","default":"","desc":"","name":"roster_player_id","ref":"","required":true,"type":"int"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n    \"created_at\": \"2016-04-11T09:09:07-07:00\",\n    \"game_id\": 13529186,\n    \"id\": 8738357,\n    \"jersey_number\": \"2\",\n    \"roster_player_id\": 11575454,\n    \"updated_at\": \"2016-04-11T09:09:07-07:00\"\n}"}]},"settings":"","url":"/game_players/:id"},"createdAt":"2016-03-22T19:34:58.912Z","editedParams":true,"isReference":true,"link_url":"","updates":[],"__v":0,"editedParams2":true,"excerpt":"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.*","parentDoc":null,"slug":"game-players-delete","childrenPages":[]}

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

game_id:
required
integer
roster_player_id:
required
integer

Definition

https://api.sportngin.com/game_players/:id

Examples

curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -d '' "https://api.stage.ngin-staging.com/game_players/8738357?game_id=13529186&roster_player_id=11575454"

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"
}


{"_id":"56f19f043af4942b00bb3c91","createdAt":"2016-03-22T19:37:40.414Z","parentDoc":null,"project":"5641217e0ee5370d00da636d","version":"56cca51eca43550b002813fa","title":"Game Players Assign Position ID","type":"post","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Content-Type: application/json\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -d '{\n    \"position_ids\": [3]\n}' \"https://api.sportngin.com/game_players/8754539\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/game_players/8754539\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest.body = \"{\\n    \\\"position_ids\\\": [3]\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"position_ids\\\": [3]\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/game_players/8754539\")\n  .put(body)\n  .addHeader(\"content-type\", \"application/json\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post","params":[{"_id":"56f19f043af4942b00bb3c92","default":"","desc":"","name":"positions_ids","ref":"","required":true,"type":"int","in":"body"}],"results":{"codes":[{"language":"json","code":"{\n    \"created_at\": \"2016-04-11T08:18:27-07:00\",\n    \"game_id\": 13557134,\n    \"id\": 8754539,\n    \"jersey_number\": \"6\",\n    \"roster_player_id\": 11575458,\n    \"updated_at\": \"2016-04-11T08:54:19-07:00\",\n    \"positions\": [\n        {\n            \"abbreviation\": \"G\",\n            \"created_on\": null,\n            \"id\": 3,\n            \"name\": \"Goalie\",\n            \"position\": 3,\n            \"sport_id\": 1,\n            \"updated_on\": \"2007-03-07T13:39:55-08:00\"\n        }\n    ],\n    \"roster_player\": {\n        \"active_status\": true,\n        \"content_node_id\": 20168063,\n        \"created_on\": \"2016-03-23T10:07:56-07:00\",\n        \"first_name\": \"Tuukka\",\n        \"id\": 11575458,\n        \"image_id\": null,\n        \"inactive_info\": {},\n        \"info\": [],\n        \"jersey_number\": \"6\",\n        \"last_name\": \"Rask\",\n        \"list_position\": 1,\n        \"roster_id\": 1837158,\n        \"roster_type\": \"player\",\n        \"status\": \"active\",\n        \"title\": null,\n        \"updated_on\": \"2016-04-11T08:18:28-07:00\"\n    }\n}","name":"","status":200}]},"settings":"","url":"/game_players/:id"},"category":"56e731d46997f52900f9ca42","link_external":false,"link_url":"","__v":0,"excerpt":"The Assign Position ID method is triggered for a given `id` (Game Player ID) by passing an array of `position_id`\n\n###Parameters","sync_unique":"","isReference":true,"order":6,"slug":"game-players-assign-position-id","body":"","editedParams":true,"editedParams2":true,"githubsync":"","hidden":false,"updates":[],"user":"56e71f9edee212320019e731","childrenPages":[]}

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

positions_ids:
required
integer

Definition

https://api.sportngin.com/game_players/:id

Examples

curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -d '{
    "position_ids": [3]
}' "https://api.sportngin.com/game_players/8754539"

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"
    }
}


{"_id":"56d76a86ad6eef25003f95c6","editedParams2":true,"hidden":false,"sync_unique":"","type":"get","api":{"url":"/positions","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/positions?sport_id=1\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/positions?sport_id=1\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/positions?sport_id=1\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"sport_id","ref":"","required":true,"type":"int","in":"query","_id":"56d76ac23513421d00934371","default":"","desc":"Id of the sport the position belongs to"}],"results":{"codes":[{"status":200,"name":"","code":"[\n    {\n        \"abbreviation\": \"F\",\n        \"created_on\": null,\n        \"id\": 1,\n        \"name\": \"Forward\",\n        \"position\": 1,\n        \"sport_id\": 1,\n        \"updated_on\": \"2007-03-07T13:39:32-08:00\"\n    },\n    {\n        \"abbreviation\": \"D\",\n        \"created_on\": null,\n        \"id\": 2,\n        \"name\": \"Defense\",\n        \"position\": 2,\n        \"sport_id\": 1,\n        \"updated_on\": \"2007-03-07T13:39:44-08:00\"\n    },\n    {\n        \"abbreviation\": \"G\",\n        \"created_on\": null,\n        \"id\": 3,\n        \"name\": \"Goalie\",\n        \"position\": 3,\n        \"sport_id\": 1,\n        \"updated_on\": \"2007-03-07T13:39:55-08:00\"\n    }\n]","language":"json"}]},"settings":""},"body":"Index uses the HTTP method of GET and has the required parameter of sport_id.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"Integer\",\n    \"0-2\": \"Id of position\",\n    \"1-0\": \"name\",\n    \"1-1\": \"String\",\n    \"2-0\": \"abbreviation\",\n    \"3-0\": \"sport_id\",\n    \"4-0\": \"position\",\n    \"5-0\": \"updated_on\",\n    \"6-0\": \"created_on\",\n    \"5-1\": \"Timestamp\",\n    \"6-1\": \"Timestamp\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"Number used to sort\",\n    \"3-2\": \"Id of Sport\",\n    \"3-1\": \"Integer\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Abbreviation of position\",\n    \"1-2\": \"Name of position\",\n    \"5-2\": \"Timestamp of last update\",\n    \"6-2\": \"Timestamp when created\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\nYou can get your team's sport_id from your League","excerpt":"The Index method returns an array of Positions that are valid for the given `sport_id`.\n\n###Parameters","parentDoc":null,"order":7,"project":"5641217e0ee5370d00da636d","slug":"positions-index","__v":2,"category":"56e731d46997f52900f9ca42","githubsync":"","isReference":true,"link_external":false,"title":"Positions Index","updates":[],"version":"56cca51eca43550b002813fa","createdAt":"2016-03-02T22:34:46.588Z","editedParams":true,"link_url":"","user":"569e96c56b4a2c0d007e9153","childrenPages":[]}

getPositions Index

The Index method returns an array of Positions that are valid for the given sport_id.

Parameters


Query Params

sport_id:
required
integer

Id of the sport the position belongs to

Index uses the HTTP method of GET and has the required parameter of sport_id.

Name
Type
Description

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

https://api.sportngin.com/positions

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/positions?sport_id=1"

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"
    }
]


{"_id":"570420bb8c69510e00b1de66","githubsync":"","project":"5641217e0ee5370d00da636d","user":"56548c568975c70d002ea4b4","version":"56cca51eca43550b002813fa","type":"basic","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]}},"excerpt":"Plays are actions in a [Game](https://sportnginv2.readme.io/docs/games-show) recorded by Sport NGIN Live.  A Play is composed of an array of [Play Actions](https://sportnginv2.readme.io/docs/play-actions-index).  [Play Actions](https://sportnginv2.readme.io/docs/play-actions-index) are the divided components of a Play.  _Play is a representation of the actual play _model_ defined in Sport NGIN Live._","hidden":false,"isReference":true,"parentDoc":null,"title":"Plays","__v":8,"body":"","createdAt":"2016-04-05T20:31:55.762Z","link_external":false,"link_url":"","slug":"plays","sync_unique":"","category":"56e848dac59c4a0e00d5d00b","order":0,"updates":[],"childrenPages":[]}

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._


{"_id":"56f2cf04c6d9e30e0059045b","__v":1,"editedParams2":true,"isReference":true,"parentDoc":null,"type":"get","updates":[],"createdAt":"2016-03-23T17:14:44.582Z","editedParams":true,"excerpt":"The Index method returns an array of Plays matching the given parameters.\n\n###Parameters","hidden":false,"order":1,"sync_unique":"","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"initial_screen\",\n    \"0-1\": \"String\",\n    \"1-0\": \"play_index\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"order of the play\",\n    \"2-0\": \"away_team_score\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"current score of the away team\",\n    \"3-0\": \"created_at\",\n    \"3-1\": \"Datetime\",\n    \"4-0\": \"Completed\",\n    \"4-1\": \"Boolean\",\n    \"4-2\": \"whether the play is completed\",\n    \"5-0\": \"ending_yard_line\",\n    \"5-1\": \"String\",\n    \"6-0\": \"updated_at\",\n    \"6-1\": \"Datetime\",\n    \"7-0\": \"time_interval\",\n    \"7-1\": \"Integer\",\n    \"7-2\": \"current period\",\n    \"8-0\": \"id\",\n    \"8-1\": \"String\",\n    \"8-2\": \"id of the play\",\n    \"9-0\": \"down_string\",\n    \"9-1\": \"String\",\n    \"10-0\": \"user_id\",\n    \"10-1\": \"Integer\",\n    \"11-0\": \"starting_yard_line\",\n    \"11-1\": \"String\",\n    \"12-0\": \"play_by_play_string_to_s\",\n    \"12-1\": \"String\",\n    \"12-2\": \"the description of the play\",\n    \"13-0\": \"play_type\",\n    \"13-1\": \"String\",\n    \"14-0\": \"home_team_score\",\n    \"14-1\": \"Integer\",\n    \"14-2\": \"current score of the home team\",\n    \"15-0\": \"ball_on_string\",\n    \"15-1\": \"String\",\n    \"16-0\": \"game_id\",\n    \"16-1\": \"Integer\",\n    \"17-0\": \"special_tags\",\n    \"17-1\": \"Array\",\n    \"18-0\": \"clock_time_string\",\n    \"18-1\": \"String\",\n    \"19-0\": \"pos_team_id\",\n    \"19-1\": \"Integer\",\n    \"20-0\": \"distance\",\n    \"20-1\": \"String\",\n    \"17-2\": \"tags for the play\"\n  },\n  \"cols\": 3,\n  \"rows\": 21\n}\n[/block]","category":"56e848dac59c4a0e00d5d00b","link_url":"","user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","api":{"method":"get","params":[{"_id":"56f2cf04c6d9e30e0059045c","ref":"","in":"query","required":true,"desc":"","default":"","type":"int","name":"game_id"}],"results":{"codes":[{"language":"json","code":"[\n    {\n        \"clock_time\": \"20:00\",\n        \"clock_time_string\": \"0:00\",\n        \"completed\": true,\n        \"created_at\": \"2016-04-20T16:41:27Z\",\n        \"game_id\": 13557129,\n        \"id\": \"5717b137951b911302000c0b\",\n        \"initial_screen\": \"play_screen\",\n        \"min\": 20,\n        \"nullified\": null,\n        \"off_team_id\": 1876249,\n        \"play_actions\": [\n            {\n                \"away_team_goalie\": \"11576555\",\n                \"away_team_score\": 0,\n                \"away_team_timeouts\": null,\n                \"clock_time\": \"20:00\",\n                \"created_at\": \"2016-04-20T16:41:27Z\",\n                \"def_team_id\": 1876243,\n                \"diffs\": {},\n                \"game_id\": 13557129,\n                \"home_team_goalie\": \"11575458\",\n                \"home_team_score\": 0,\n                \"home_team_timeouts\": null,\n                \"id\": \"5717b137951b911302000c0a\",\n                \"location\": null,\n                \"loser_id\": null,\n                \"min\": 20,\n                \"ngin_sport_id\": 1,\n                \"off_team_id\": 1876249,\n                \"participants_winner\": null,\n                \"play_action_index\": 0,\n                \"play_action_type\": \"faceoff\",\n                \"play_id\": \"5717b137951b911302000c0b\",\n                \"play_token\": \"984917e3-b1bb-4bec-a07e-d0511f408f2f\",\n                \"screen\": \"play_screen\",\n                \"sec\": 0,\n                \"starts_new_play\": false,\n                \"subseason_id\": 291621,\n                \"time_interval\": 1,\n                \"token\": \"c8d58d4e-9bd4-4830-a823-ab799aa889f4\",\n                \"type\": \"faceoff\",\n                \"updated_at\": \"2016-04-20T16:41:31Z\",\n                \"user_id\": 3156422,\n                \"winner_id\": null,\n                \"x_coord\": 49.77,\n                \"y_coord\": 50.81\n            },\n            {\n                \"away_team_goalie\": \"11576555\",\n                \"away_team_score\": 0,\n                \"away_team_timeouts\": null,\n                \"clock_time\": \"20:00\",\n                \"created_at\": \"2016-04-20T16:41:30Z\",\n                \"def_team_id\": null,\n                \"diffs\": {\n                    \"def_team_id\": {\n                        \"o\": 1876243\n                    },\n                    \"off_team_id\": {\n                        \"o\": 1876249\n                    }\n                },\n                \"game_id\": 13557129,\n                \"home_team_goalie\": \"11575458\",\n                \"home_team_score\": 0,\n                \"home_team_timeouts\": null,\n                \"id\": \"5717b13ae407147a390006a4\",\n                \"min\": 20,\n                \"ngin_sport_id\": 1,\n                \"off_team_id\": null,\n                \"play_action_index\": 1,\n                \"play_action_type\": \"next_play\",\n                \"play_id\": \"5717b137951b911302000c0b\",\n                \"play_token\": \"984917e3-b1bb-4bec-a07e-d0511f408f2f\",\n                \"screen\": \"next_play_screen\",\n                \"sec\": 0,\n                \"starts_new_play\": true,\n                \"subseason_id\": 291621,\n                \"time_interval\": 1,\n                \"token\": \"576871ce-3a9a-4ba6-b50b-ef03fb8a1542\",\n                \"type\": \"next_play\",\n                \"updated_at\": \"2016-04-20T16:41:30Z\",\n                \"user_id\": 3156422\n            }\n        ],\n        \"play_by_play_string\": \"Faceoff Won \",\n        \"play_index\": 1,\n        \"play_type\": \"Faceoff\",\n        \"position\": null,\n        \"primary_player_id\": \"\",\n        \"sec\": 0,\n        \"special_tags\": [],\n        \"sport_id\": null,\n        \"time_interval\": 1,\n        \"updated_at\": \"2016-04-20T16:41:30Z\",\n        \"user_id\": 3156422\n    },\n    ...\n    \n        ],\n        \"sport_id\": null,\n        \"time_interval\": 3,\n        \"token\": \"989e0584-d12a-4798-9bd7-7f7cfbbd266d\",\n        \"updated_at\": \"2016-04-20T16:45:00Z\",\n        \"user_id\": 3156422\n    }\n]","name":"","status":200}]},"settings":"","url":"/plays","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/plays?game_id=13557129\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/plays?game_id=13557129\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/plays?game_id=13557129\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"githubsync":"","link_external":false,"project":"5641217e0ee5370d00da636d","slug":"plays-index","title":"Plays Index","next":{"description":"","pages":[]},"childrenPages":[]}

getPlays Index

The Index method returns an array of Plays matching the given parameters.

Parameters


Query Params

game_id:
required
integer

Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/plays

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/plays?game_id=13557129"

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
    }
]


{"_id":"5717b5312be45f0e00cab334","githubsync":"","body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"initial_screen\",\n    \"0-1\": \"String\",\n    \"1-0\": \"play_index\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"order of the play\",\n    \"2-0\": \"away_team_score\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"current score of the away team\",\n    \"3-0\": \"created_at\",\n    \"3-1\": \"Datetime\",\n    \"4-0\": \"Completed\",\n    \"4-1\": \"Boolean\",\n    \"4-2\": \"whether the play is completed\",\n    \"5-0\": \"ending_yard_line\",\n    \"5-1\": \"String\",\n    \"6-0\": \"updated_at\",\n    \"6-1\": \"Datetime\",\n    \"7-0\": \"time_interval\",\n    \"7-1\": \"Integer\",\n    \"7-2\": \"current period\",\n    \"8-0\": \"id\",\n    \"8-1\": \"String\",\n    \"8-2\": \"id of the play\",\n    \"9-0\": \"down_string\",\n    \"9-1\": \"String\",\n    \"10-0\": \"user_id\",\n    \"10-1\": \"Integer\",\n    \"11-0\": \"starting_yard_line\",\n    \"11-1\": \"String\",\n    \"12-0\": \"play_by_play_string_to_s\",\n    \"12-1\": \"String\",\n    \"12-2\": \"the description of the play\",\n    \"13-0\": \"play_type\",\n    \"13-1\": \"String\",\n    \"14-0\": \"home_team_score\",\n    \"14-1\": \"Integer\",\n    \"14-2\": \"current score of the home team\",\n    \"15-0\": \"ball_on_string\",\n    \"15-1\": \"String\",\n    \"16-0\": \"game_id\",\n    \"16-1\": \"Integer\",\n    \"17-0\": \"special_tags\",\n    \"17-1\": \"Array\",\n    \"18-0\": \"clock_time_string\",\n    \"18-1\": \"String\",\n    \"19-0\": \"pos_team_id\",\n    \"19-1\": \"Integer\",\n    \"20-0\": \"distance\",\n    \"20-1\": \"String\",\n    \"17-2\": \"tags for the play\"\n  },\n  \"cols\": 3,\n  \"rows\": 21\n}\n[/block]","editedParams2":true,"excerpt":"The Show method returns a single Play for a given `id`, representing a [Game](https://sportnginv2.readme.io/docs/games-show).\n\n###Parameters","link_url":"","type":"get","updates":[],"user":"56548c568975c70d002ea4b4","__v":1,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"plays\":[\n    {\n        \"clock_time\": \"20:00\",\n        \"clock_time_string\": \"0:00\",\n        \"completed\": true,\n        \"created_at\": \"2016-04-20T16:41:27Z\",\n        \"game_id\": 13557129,\n        \"id\": \"5717b137951b911302000c0b\",\n        \"initial_screen\": \"play_screen\",\n        \"min\": 20,\n        \"nullified\": null,\n        \"off_team_id\": 1876249,\n        \"play_actions\": [\n            {\n                \"away_team_goalie\": \"11576555\",\n                \"away_team_score\": 0,\n                \"away_team_timeouts\": null,\n                \"clock_time\": \"20:00\",\n                \"created_at\": \"2016-04-20T16:41:27Z\",\n                \"def_team_id\": 1876243,\n                \"diffs\": {},\n                \"game_id\": 13557129,\n                \"home_team_goalie\": \"11575458\",\n                \"home_team_score\": 0,\n                \"home_team_timeouts\": null,\n                \"id\": \"5717b137951b911302000c0a\",\n                \"location\": null,\n                \"loser_id\": null,\n                \"min\": 20,\n                \"ngin_sport_id\": 1,\n                \"off_team_id\": 1876249,\n                \"participants_winner\": null,\n                \"play_action_index\": 0,\n                \"play_action_type\": \"faceoff\",\n                \"play_id\": \"5717b137951b911302000c0b\",\n                \"play_token\": \"984917e3-b1bb-4bec-a07e-d0511f408f2f\",\n                \"screen\": \"play_screen\",\n                \"sec\": 0,\n                \"starts_new_play\": false,\n                \"subseason_id\": 291621,\n                \"time_interval\": 1,\n                \"token\": \"c8d58d4e-9bd4-4830-a823-ab799aa889f4\",\n                \"type\": \"faceoff\",\n                \"updated_at\": \"2016-04-20T16:41:31Z\",\n                \"user_id\": 3156422,\n                \"winner_id\": null,\n                \"x_coord\": 49.77,\n                \"y_coord\": 50.81\n            },\n            {\n                \"away_team_goalie\": \"11576555\",\n                \"away_team_score\": 0,\n                \"away_team_timeouts\": null,\n                \"clock_time\": \"20:00\",\n                \"created_at\": \"2016-04-20T16:41:30Z\",\n                \"def_team_id\": null,\n                \"diffs\": {\n                    \"def_team_id\": {\n                        \"o\": 1876243\n                    },\n                    \"off_team_id\": {\n                        \"o\": 1876249\n                    }\n                },\n                \"game_id\": 13557129,\n                \"home_team_goalie\": \"11575458\",\n                \"home_team_score\": 0,\n                \"home_team_timeouts\": null,\n                \"id\": \"5717b13ae407147a390006a4\",\n                \"min\": 20,\n                \"ngin_sport_id\": 1,\n                \"off_team_id\": null,\n                \"play_action_index\": 1,\n                \"play_action_type\": \"next_play\",\n                \"play_id\": \"5717b137951b911302000c0b\",\n                \"play_token\": \"984917e3-b1bb-4bec-a07e-d0511f408f2f\",\n                \"screen\": \"next_play_screen\",\n                \"sec\": 0,\n                \"starts_new_play\": true,\n                \"subseason_id\": 291621,\n                \"time_interval\": 1,\n                \"token\": \"576871ce-3a9a-4ba6-b50b-ef03fb8a1542\",\n                \"type\": \"next_play\",\n                \"updated_at\": \"2016-04-20T16:41:30Z\",\n                \"user_id\": 3156422\n            }\n        ],\n        \"play_by_play_string\": \"Faceoff Won \",\n        \"play_index\": 1,\n        \"play_type\": \"Faceoff\",\n        \"position\": null,\n        \"primary_player_id\": \"\",\n        \"sec\": 0,\n        \"special_tags\": [],\n        \"sport_id\": null,\n        \"time_interval\": 1,\n        \"updated_at\": \"2016-04-20T16:41:30Z\",\n        \"user_id\": 3156422\n    },\n    ...\n        \"sport_id\": null,\n        \"time_interval\": 3,\n        \"token\": \"989e0584-d12a-4798-9bd7-7f7cfbbd266d\",\n        \"updated_at\": \"2016-04-20T16:45:00Z\",\n        \"user_id\": 3156422\n    }\n\t]\n}  ","name":""}]},"settings":"","url":"/plays/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/plays/13557129\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/plays/13557129\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\n\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/plays/13557129\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"_id":"56f2cf04c6d9e30e0059045c","ref":"","in":"path","required":true,"desc":"Game id","default":"","type":"int","name":"id"}]},"createdAt":"2016-04-20T16:58:25.483Z","editedParams":true,"version":"56cca51eca43550b002813fa","parentDoc":null,"sync_unique":"","order":2,"project":"5641217e0ee5370d00da636d","slug":"plays-show","title":"Plays Show","category":"56e848dac59c4a0e00d5d00b","hidden":false,"isReference":true,"link_external":false,"next":{"description":"","pages":[]},"childrenPages":[]}

getPlays Show

The Show method returns a single Play for a given id, representing a Game.

Parameters


Path Params

id:
required
integer

Game id

Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/plays/:id

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/plays/13557129"

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
    }
	]
}  


{"_id":"56f2eaf1c6d9e30e005904d2","isReference":true,"link_external":false,"createdAt":"2016-03-23T19:13:53.386Z","excerpt":"The Index method returns an array of Play Actions for the given `play_id`.\n\n###Parameters","parentDoc":null,"updates":[],"user":"56e71f9edee212320019e731","version":"56cca51eca43550b002813fa","order":3,"slug":"play-actions-index","category":"56e848dac59c4a0e00d5d00b","editedParams":true,"editedParams2":true,"githubsync":"","hidden":false,"link_url":"","sync_unique":"","type":"get","__v":0,"api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/play_actions?play_id=5717b137951b911302000c0b\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/play_actions?play_id=5717b137951b911302000c0b\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nresponse = http.request(request)\nputs response.read_body"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/play_actions?play_id=5717b137951b911302000c0b\")\n  .get()\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"get","params":[{"name":"play_id","ref":"","required":true,"type":"int","in":"query","_id":"56f2eaf1c6d9e30e005904d3","default":"","desc":"ID of the play of interest"}],"results":{"codes":[{"status":200,"language":"curl","code":"[\n    {\n        \"away_team_goalie\": \"11576555\",\n        \"away_team_score\": 0,\n        \"away_team_timeouts\": null,\n        \"clock_time\": \"20:00\",\n        \"created_at\": \"2016-04-20T16:41:27Z\",\n        \"def_team_id\": 1876243,\n        \"diffs\": {},\n        \"game_id\": 13557129,\n        \"home_team_goalie\": \"11575458\",\n        \"home_team_score\": 0,\n        \"home_team_timeouts\": null,\n        \"id\": \"5717b137951b911302000c0a\",\n        \"location\": null,\n        \"loser_id\": null,\n        \"min\": 20,\n        \"ngin_sport_id\": 1,\n        \"off_team_id\": 1876249,\n        \"participants_winner\": null,\n        \"play_action_index\": 0,\n        \"play_action_type\": \"faceoff\",\n        \"play_id\": \"5717b137951b911302000c0b\",\n        \"play_token\": \"984917e3-b1bb-4bec-a07e-d0511f408f2f\",\n        \"screen\": \"play_screen\",\n        \"sec\": 0,\n        \"sport_id\": 1,\n        \"starts_new_play\": false,\n        \"stat_values\": [\n            {\n                \"created_at\": null,\n                \"id\": \"5717b137951b911302000c0c\",\n                \"key\": \"hksfow\",\n                \"module_name\": \"ice_hockey_skater\",\n                \"player_id\": null,\n                \"stat\": \"hksfow\",\n                \"team_id\": 1876249,\n                \"team_value\": 1,\n                \"updated_at\": null,\n                \"value\": 1\n            },\n            {\n                \"created_at\": null,\n                \"id\": \"5717b137951b911302000c0d\",\n                \"key\": \"hksfol\",\n                \"module_name\": \"ice_hockey_skater\",\n                \"player_id\": null,\n                \"stat\": \"hksfol\",\n                \"team_id\": 1876243,\n                \"team_value\": 1,\n                \"updated_at\": null,\n                \"value\": 1\n            }\n        ],\n        \"subseason_id\": 291621,\n        \"time_interval\": 1,\n        \"token\": \"c8d58d4e-9bd4-4830-a823-ab799aa889f4\",\n        \"type\": \"faceoff\",\n        \"updated_at\": \"2016-04-20T16:41:31Z\",\n        \"user_id\": 3156422,\n        \"winner_id\": null,\n        \"x_coord\": 49.77,\n        \"y_coord\": 50.81\n    },\n    {\n        \"away_team_goalie\": \"11576555\",\n        \"away_team_score\": 0,\n        \"away_team_timeouts\": null,\n        \"clock_time\": \"20:00\",\n        \"created_at\": \"2016-04-20T16:41:30Z\",\n        \"def_team_id\": null,\n        \"diffs\": {\n            \"def_team_id\": {\n                \"o\": 1876243\n            },\n            \"off_team_id\": {\n                \"o\": 1876249\n            }\n        },\n        \"game_id\": 13557129,\n        \"home_team_goalie\": \"11575458\",\n        \"home_team_score\": 0,\n        \"home_team_timeouts\": null,\n        \"id\": \"5717b13ae407147a390006a4\",\n        \"min\": 20,\n        \"ngin_sport_id\": 1,\n        \"off_team_id\": null,\n        \"play_action_index\": 1,\n        \"play_action_type\": \"next_play\",\n        \"play_id\": \"5717b137951b911302000c0b\",\n        \"play_token\": \"984917e3-b1bb-4bec-a07e-d0511f408f2f\",\n        \"screen\": \"next_play_screen\",\n        \"sec\": 0,\n        \"sport_id\": 1,\n        \"starts_new_play\": true,\n        \"subseason_id\": 291621,\n        \"time_interval\": 1,\n        \"token\": \"576871ce-3a9a-4ba6-b50b-ef03fb8a1542\",\n        \"type\": \"next_play\",\n        \"updated_at\": \"2016-04-20T16:41:30Z\",\n        \"user_id\": 3156422\n    }\n]","name":null}]},"settings":"","url":"/play_actions","auth":"required"},"body":"###Attributes\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Notes\",\n    \"0-0\": \"initial_screen\",\n    \"0-1\": \"String\",\n    \"1-0\": \"play_index\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"order of the play\",\n    \"2-0\": \"away_team_score\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"current score of the away team\",\n    \"3-0\": \"created_at\",\n    \"3-1\": \"Datetime\",\n    \"4-0\": \"completed\",\n    \"4-1\": \"Boolean\",\n    \"4-2\": \"whether the play is completed\",\n    \"5-0\": \"ending_yard_line\",\n    \"5-1\": \"String\",\n    \"6-0\": \"updated_at\",\n    \"6-1\": \"Datetime\",\n    \"7-0\": \"time_interval\",\n    \"7-1\": \"Integer\",\n    \"7-2\": \"current period\",\n    \"8-0\": \"id\",\n    \"8-1\": \"String\",\n    \"8-2\": \"id of the play\",\n    \"9-0\": \"down_string\",\n    \"9-1\": \"String\",\n    \"10-0\": \"user_id\",\n    \"10-1\": \"Integer\",\n    \"11-0\": \"starting_yard_line\",\n    \"11-1\": \"String\",\n    \"12-0\": \"play_by_play_string_to_s\",\n    \"12-1\": \"String\",\n    \"12-2\": \"the description of the play\",\n    \"13-0\": \"play_type\",\n    \"13-1\": \"String\",\n    \"14-0\": \"home_team_score\",\n    \"14-1\": \"Integer\",\n    \"14-2\": \"current score of the home team\",\n    \"15-0\": \"ball_on_string\",\n    \"15-1\": \"String\",\n    \"16-0\": \"game_id\",\n    \"16-1\": \"Integer\",\n    \"17-0\": \"specia_tags\",\n    \"17-1\": \"Array\",\n    \"17-2\": \"tags for the play\",\n    \"18-0\": \"clock_time_string\",\n    \"18-1\": \"String\",\n    \"19-0\": \"pos_team_id\",\n    \"19-1\": \"Integer\",\n    \"20-0\": \"distance\",\n    \"20-1\": \"String\"\n  },\n  \"cols\": 3,\n  \"rows\": 21\n}\n[/block]","project":"5641217e0ee5370d00da636d","title":"Play Actions Index","childrenPages":[]}

getPlay Actions Index

The Index method returns an array of Play Actions for the given play_id.

Parameters


Query Params

play_id:
required
integer

ID of the play of interest

Attributes

Attribute
Type
Notes

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

https://api.sportngin.com/play_actions

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/play_actions?play_id=5717b137951b911302000c0b"

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
    }
]


{"_id":"56f2ecb28299450e00ec75e6","link_external":false,"order":4,"title":"Play Actions Create","api":{"auth":"required","examples":{"codes":[]},"method":"post","params":[{"_id":"56f2ecb28299450e00ec75ea","ref":"","required":true,"desc":"","default":"","type":"int","name":"game_id","in":"body"},{"in":"body","_id":"56f2ecb28299450e00ec75e9","ref":"","required":true,"desc":"","default":"","type":"int","name":"sport_id"},{"ref":"","required":true,"desc":"","default":"","type":"int","name":"current_user_id","in":"body","_id":"56f2ecb28299450e00ec75e8"},{"type":"int","name":"subseason_id","in":"body","_id":"56f2ecb28299450e00ec75e7","ref":"","required":true,"desc":"","default":""}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"hidden":false,"isReference":true,"parentDoc":null,"slug":"play-actions-create","version":"56cca51eca43550b002813fa","body":"","excerpt":"The Create method accepts a single Play Action (see attributes above) and creates a new record in SportsEngine associated with the given [Game](https://sportnginv2.readme.io/docs/games-show).\n\n###Parameters","githubsync":"","type":"post","updates":[],"__v":0,"editedParams":true,"editedParams2":true,"link_url":"","project":"5641217e0ee5370d00da636d","sync_unique":"","user":"56e71f9edee212320019e731","category":"56e848dac59c4a0e00d5d00b","createdAt":"2016-03-23T19:21:22.401Z","childrenPages":[]}

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


{"_id":"56f2edfc8299450e00ec75ee","title":"Play Actions Update","__v":0,"category":"56e848dac59c4a0e00d5d00b","createdAt":"2016-03-23T19:26:52.128Z","hidden":false,"order":5,"project":"5641217e0ee5370d00da636d","user":"56e71f9edee212320019e731","body":"","editedParams":true,"parentDoc":null,"sync_unique":"","updates":[],"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","examples":{"codes":[]},"method":"post","params":[{"ref":"","required":true,"desc":"","default":"","type":"int","name":"game_id","in":"body","_id":"56f2edfc8299450e00ec75f2"},{"type":"int","name":"sport_id","in":"body","_id":"56f2edfc8299450e00ec75f1","ref":"","required":true,"desc":"","default":""},{"type":"int","name":"current_user_id","in":"body","_id":"56f2edfc8299450e00ec75f0","ref":"","required":true,"desc":"","default":""},{"type":"int","name":"subseason_id","in":"body","_id":"56f2edfc8299450e00ec75ef","ref":"","required":true,"desc":"","default":""}]},"editedParams2":true,"link_url":"","version":"56cca51eca43550b002813fa","excerpt":"The Update method accepts a single Play Action (see attributes above) and updates the matching record in SportsEngine.\n\n###Parameters","githubsync":"","isReference":true,"link_external":false,"slug":"play-actions-update","type":"post","childrenPages":[]}

postPlay Actions Update

The Update method accepts a single Play Action (see attributes above) and updates the matching record in SportsEngine.

Parameters