{"_id":"57334f89b26eb71900f89cbc","excerpt":"The Sites API provides access to the Sitebuilder Sites that a particular User has access to.","githubsync":"","isReference":true,"link_url":"","slug":"sites","title":"Sites","type":"basic","updates":[],"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"It is currently not possible to create, update, or delete Sites through the API.  However, providing access to this information is useful for platform-level integrations where access has been granted to integrate against the data on behalf of multiple customers.\",\n  \"title\": \"Hint\"\n}\n[/block]","category":"57334f89b26eb71900f89bc3","createdAt":"2016-04-05T20:44:15.593Z","parentDoc":null,"user":"56548c568975c70d002ea4b4","__v":0,"api":{"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"project":"57334f89b26eb71900f89b9f","version":"57334f89b26eb71900f89ba0","hidden":false,"link_external":false,"order":0,"sync_unique":"","childrenPages":[]}

Sites

The Sites API provides access to the Sitebuilder Sites that a particular User has access to.

Hint

It is currently not possible to create, update, or delete Sites through the API. However, providing access to this information is useful for platform-level integrations where access has been granted to integrate against the data on behalf of multiple customers.

{"_id":"57334f89b26eb71900f89c1b","type":"get","user":"56e71f9edee212320019e731","editedParams":true,"excerpt":"The Index method returns an array of Sites for which the current user has access.  If you already know the ID of the site you are looking for, you may use the Show method below.\n\n###Parameters","isReference":true,"sync_unique":"","title":"Sites Index","link_external":false,"parentDoc":null,"link_url":"","order":1,"slug":"sites-index","body":"","category":"57334f89b26eb71900f89bc3","editedParams2":true,"githubsync":"","hidden":false,"updates":[],"version":"57334f89b26eb71900f89ba0","__v":0,"api":{"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/sites\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sites\")\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/sites\")\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 - membership","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/sites?membership=1\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sites?membership=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","name":"Ruby - membership"},{"code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/sites?membership=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":"Java - membership","language":"java"}]},"method":"get","params":[{"default":"","type":"int","name":"name","in":"query","_id":"56f419bf3d35720e00ba97c9","ref":"","required":false,"desc":""},{"in":"query","_id":"56f419bf3d35720e00ba97c8","ref":"","required":false,"desc":"Membership id that will filter results to display only sites the user is a member of.","default":"","type":"int","name":"membership"}],"results":{"codes":[{"code":"[\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]","name":"","status":200,"language":"json"}]},"settings":"","url":"/sites"},"createdAt":"2016-03-24T16:45:51.725Z","project":"57334f89b26eb71900f89b9f","childrenPages":[]}

getSites Index

The Index method returns an array of Sites for which the current user has access. If you already know the ID of the site you are looking for, you may use the Show method below. ###Parameters

Query Params

name:
integer
membership:
integer
Membership id that will filter results to display only sites the user is a member of.

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/sites"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/sites")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/sites")
  .get()
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .build();

Response response = client.newCall(request).execute();
curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/sites?membership=1"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/sites?membership=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/sites?membership=1")
  .get()
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

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


{"_id":"57334f89b26eb71900f89beb","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\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}","name":""}]},"settings":"","url":"/sites/: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/sites/11953\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/sites/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[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\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/sites/11953\")\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();","language":"java"}]},"method":"get","params":[{"required":false,"desc":"Id of the site to be displayed","default":"","type":"int","name":"id","in":"path","_id":"57110aed6def262b003bb5dc","ref":""}]},"category":"57334f89b26eb71900f89bc3","githubsync":"","link_url":"","order":2,"type":"get","__v":0,"editedParams":true,"link_external":false,"sync_unique":"","title":"Sites Show","version":"57334f89b26eb71900f89ba0","body":"","createdAt":"2016-03-24T16:47:03.906Z","editedParams2":true,"project":"57334f89b26eb71900f89b9f","slug":"sites-show","updates":[],"user":"56e71f9edee212320019e731","excerpt":"The Show method returns a single Site for a given `id`.  An error will be returned if the current user does not have access to the site specified.  If you do not know the ID of the site you are looking for, you may use the [Sites Index](https://sportnginsite.readme.io/v1/docs/sites-index) method above to find it.","hidden":false,"isReference":true,"parentDoc":null,"childrenPages":[]}

getSites Show

The Show method returns a single Site for a given `id`. An error will be returned if the current user does not have access to the site specified. If you do not know the ID of the site you are looking for, you may use the [Sites Index](https://sportnginsite.readme.io/v1/docs/sites-index) method above to find it.

Path Params

id:
integer
Id of the site to be displayed

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" "https://api.sportngin.com/sites/11953"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/sites/11953")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/sites/11953")
  .get()
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

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


{"_id":"57334f89b26eb71900f89c68","category":"57334f89b26eb71900f89bc3","link_url":"","isReference":true,"parentDoc":null,"version":"57334f89b26eb71900f89ba0","body":"","excerpt":"The Tags API is used to get a list of all available Page Nodes (also known as \"Tags\"), on a [Site](https://sportnginsite.readme.io/v1/docs/sites-show).  Tags belong to a Site and can be used to \"tag\" a [News Article](https://sportnginsite.readme.io/v1/docs/news-articles-show) or an [Event](https://sportnginsite.readme.io/v1/docs/events-show).","githubsync":"","updates":[],"api":{"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required"},"project":"57334f89b26eb71900f89b9f","title":"Tags","link_external":false,"order":3,"slug":"tags","sync_unique":"","type":"basic","__v":1,"createdAt":"2016-04-05T20:55:48.316Z","hidden":false,"user":"56548c568975c70d002ea4b4","childrenPages":[]}

Tags

The Tags API is used to get a list of all available Page Nodes (also known as "Tags"), on a [Site](https://sportnginsite.readme.io/v1/docs/sites-show). Tags belong to a Site and can be used to "tag" a [News Article](https://sportnginsite.readme.io/v1/docs/news-articles-show) or an [Event](https://sportnginsite.readme.io/v1/docs/events-show).

{"_id":"57334f89b26eb71900f89c98","githubsync":"","link_url":"","order":4,"project":"57334f89b26eb71900f89b9f","type":"get","__v":0,"body":"","category":"57334f89b26eb71900f89bc3","editedParams2":true,"isReference":true,"sync_unique":"","slug":"tags-index","title":"Tags Index","api":{"method":"get","params":[{"desc":"Id of site tags are associated with","default":"","type":"int","name":"site_id","in":"query","_id":"56f43f52f54aaf0e00abdf1b","ref":"","required":true},{"name":"scope","in":"query","_id":"56f43f52f54aaf0e00abdf1a","ref":"","required":true,"desc":"Valid values: `has_news` & `has_events`","default":"","type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"tags\": [\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2394451,\n            \"object\": {\n                \"page_title\": \"Home\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2394451-home\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2394452,\n            \"object\": {\n                \"page_title\": \"Other Home Pages\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2394452-other-home-pages\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2394453,\n            \"object\": {\n                \"page_title\": \"DIY Home\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2394453-diy-home\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2394456,\n            \"object\": {\n                \"page_title\": \"Starter Home\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2394456-starter-home\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2394458,\n            \"object\": {\n                \"page_title\": \"Pro Home\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2394458-pro-home\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2394465,\n            \"object\": {\n                \"page_title\": \"Hockey League\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2394465-hockey-league\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458063,\n            \"object\": {\n                \"page_title\": \"Eastern League (All Seasons)\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458063-eastern-league-all-seasons-\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458062,\n            \"object\": {\n                \"page_title\": \"Eastern League\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458062-eastern-2016-\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458064,\n            \"object\": {\n                \"page_title\": \"Regular Season\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458064-regular-season\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458074,\n            \"object\": {\n                \"page_title\": \"Oceanic Division\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458074-oceanic\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458139,\n            \"object\": {\n                \"page_title\": \"Boston Bears\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458139-boston\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458140,\n            \"object\": {\n                \"page_title\": \"Buffalo Bison\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458140-buffalo\"\n            }\n        },\n        {\n            \"tag_type\": \"PageNode\",\n            \"id\": 2458145,\n            \"object\": {\n                \"page_title\": \"Detroit Cyclists\",\n                \"uri\": \"http://apidemo.sportngin.com/api/page/show/2458145-detroit\"\n            }\n        },\n...\n    ]\n}","name":""}]},"settings":"","url":"/tags","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/tags?site_id=11953&scope=has_events\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/tags?site_id=11953&scope=has_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::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/tags?site_id=11953&scope=has_events\")\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 Tags (Page Nodes) matching the given parameters.\n\n###Parameters","hidden":false,"link_external":false,"parentDoc":null,"version":"57334f89b26eb71900f89ba0","createdAt":"2016-03-24T19:26:10.615Z","updates":[],"user":"56e71f9edee212320019e731","childrenPages":[]}

getTags Index

The Index method returns an array of Tags (Page Nodes) matching the given parameters. ###Parameters

Query Params

site_id:
required
integer
Id of site tags are associated with
scope:
required
string
Valid values: `has_news` & `has_events`

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/tags?site_id=11953&scope=has_events"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/tags?site_id=11953&scope=has_events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/tags?site_id=11953&scope=has_events")
  .get()
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "tags": [
        {
            "tag_type": "PageNode",
            "id": 2394451,
            "object": {
                "page_title": "Home",
                "uri": "http://apidemo.sportngin.com/api/page/show/2394451-home"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2394452,
            "object": {
                "page_title": "Other Home Pages",
                "uri": "http://apidemo.sportngin.com/api/page/show/2394452-other-home-pages"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2394453,
            "object": {
                "page_title": "DIY Home",
                "uri": "http://apidemo.sportngin.com/api/page/show/2394453-diy-home"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2394456,
            "object": {
                "page_title": "Starter Home",
                "uri": "http://apidemo.sportngin.com/api/page/show/2394456-starter-home"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2394458,
            "object": {
                "page_title": "Pro Home",
                "uri": "http://apidemo.sportngin.com/api/page/show/2394458-pro-home"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2394465,
            "object": {
                "page_title": "Hockey League",
                "uri": "http://apidemo.sportngin.com/api/page/show/2394465-hockey-league"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458063,
            "object": {
                "page_title": "Eastern League (All Seasons)",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458063-eastern-league-all-seasons-"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458062,
            "object": {
                "page_title": "Eastern League",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458062-eastern-2016-"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458064,
            "object": {
                "page_title": "Regular Season",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458064-regular-season"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458074,
            "object": {
                "page_title": "Oceanic Division",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458074-oceanic"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458139,
            "object": {
                "page_title": "Boston Bears",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458139-boston"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458140,
            "object": {
                "page_title": "Buffalo Bison",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458140-buffalo"
            }
        },
        {
            "tag_type": "PageNode",
            "id": 2458145,
            "object": {
                "page_title": "Detroit Cyclists",
                "uri": "http://apidemo.sportngin.com/api/page/show/2458145-detroit"
            }
        },
...
    ]
}


{"_id":"57334f89b26eb71900f89cae","githubsync":"","hidden":false,"link_external":false,"category":"57334f89b26eb71900f89bcf","isReference":true,"title":"Content Structure","user":"56e71f9edee212320019e731","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":""},"createdAt":"2016-04-06T15:26:27.413Z","link_url":"","order":0,"parentDoc":null,"sync_unique":"","updates":[],"__v":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"The width of the [Layout Column](https://sportnginsite.readme.io/v1/docs/layout-column-create) is determined by the `layout_type` field of the [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show), and the [Layout Column](ref:layout-column-create)'s position within the [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show). For example, a [Layout Column](https://sportnginsite.readme.io/v1/docs/layout-column-create) with `position = 3` in a [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show) with `layout_type = 'threeColumn255025'` will have a width equal to 25% of the layout.  Note that this `layout_type` would be parsed as 25%, 50%, 25%, so position three in this set would be 25%.\"\n}\n[/block]","excerpt":"A Content Node contains all content related to a resource such as a [News Article](https://sportnginsite.readme.io/v1/docs/news-articles-show).\n\n_Content Nodes are not directly accessible through the API._\n\n###Associations (Layout Structure)\nA Content Node has many [Layout Containers](https://sportnginsite.readme.io/v1/docs/layout-containers-show). A ContentNode can be placed on a Page of any kind, such as a [Team Instance](https://sportngiv2readme.io/v1/docs/team_instances-index) or an [Event](https://sportnginv2.readme.io/v1/docs/events).\n\n####Layout Containers\nA [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show) contains a block of content within a _resource_ such as a [News Article](https://sportnginsite.readme.io/v1/docs/news-articles-show).  [Layout Containers](https://sportnginsite.readme.io/v1/docs/layout-containers-show) may have between one and three [Layout Columns](https://sportnginsite.readme.io/v1/docs/layout-column-create).\n\n####Layout Column\nA [Layout Column](https://sportnginsite.readme.io/v1/docs/layout-column-create) organizes content within a [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show) vertically into columns.  [Layout Columns](https://sportnginsite.readme.io/v1/docs/layout-column-create) contain [Page Elements](https://sportnginsite.readme.io/v1/docs/page-elements) such as the `TextBlock` or `Photo` Elements.","project":"57334f89b26eb71900f89b9f","slug":"content-node","type":"basic","version":"57334f89b26eb71900f89ba0","childrenPages":[]}

Content Structure

A Content Node contains all content related to a resource such as a [News Article](https://sportnginsite.readme.io/v1/docs/news-articles-show). _Content Nodes are not directly accessible through the API._ ###Associations (Layout Structure) A Content Node has many [Layout Containers](https://sportnginsite.readme.io/v1/docs/layout-containers-show). A ContentNode can be placed on a Page of any kind, such as a [Team Instance](https://sportngiv2readme.io/v1/docs/team_instances-index) or an [Event](https://sportnginv2.readme.io/v1/docs/events). ####Layout Containers A [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show) contains a block of content within a _resource_ such as a [News Article](https://sportnginsite.readme.io/v1/docs/news-articles-show). [Layout Containers](https://sportnginsite.readme.io/v1/docs/layout-containers-show) may have between one and three [Layout Columns](https://sportnginsite.readme.io/v1/docs/layout-column-create). ####Layout Column A [Layout Column](https://sportnginsite.readme.io/v1/docs/layout-column-create) organizes content within a [Layout Container](https://sportnginsite.readme.io/v1/docs/layout-containers-show) vertically into columns. [Layout Columns](https://sportnginsite.readme.io/v1/docs/layout-column-create) contain [Page Elements](https://sportnginsite.readme.io/v1/docs/page-elements) such as the `TextBlock` or `Photo` Elements.

Hint

The width of the Layout Column is determined by the layout_type field of the Layout Container, and the Layout Column's position within the Layout Container. For example, a Layout Column with position = 3 in a Layout Container with layout_type = 'threeColumn255025' will have a width equal to 25% of the layout. Note that this layout_type would be parsed as 25%, 50%, 25%, so position three in this set would be 25%.

{"_id":"57334f89b26eb71900f89bd2","githubsync":"","slug":"layout-containers-create","version":"57334f89b26eb71900f89ba0","updates":[],"body":"","category":"57334f89b26eb71900f89bcf","createdAt":"2016-03-18T19:42:22.791Z","editedParams":true,"excerpt":"The Create method accepts a single Layout Container (see attributes above) and creates a new record in Sport Ngin.  The Layout Container will be created within the specified [Content Node](https://sportnginsite.readme.io/docs/content-node) on the specified [Site](https://sportnginsite.readme.io/docs/sites).\n\n###Parameters","isReference":true,"user":"56e71f9edee212320019e731","type":"post","__v":0,"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -d '{\n    \"layout_container\":\n        {\n            \"content_node_id\": 20151248,\n            \"layout_type\": \"oneColumn\",\n            \"position\": 1\n        },\n    \"site_id\": 11953\n}\n' \"https://api.sportngin.com/layout_containers\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/layout_containers\")\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 ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"layout_container\\\":\\n        {\\n            \\\"content_node_id\\\": 20151248,\\n            \\\"layout_type\\\": \\\"oneColumn\\\",\\n            \\\"position\\\": 1\\n        },\\n    \\\"site_id\\\": 11953\\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    \\\"layout_container\\\":\\n        {\\n            \\\"content_node_id\\\": 20151248,\\n            \\\"layout_type\\\": \\\"oneColumn\\\",\\n            \\\"position\\\": 1\\n        },\\n    \\\"site_id\\\": 11953\\n}\\n\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/layout_containers\")\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();"}]},"method":"post","params":[{"in":"body","_id":"56ec5a1e611730190000f264","ref":"","required":true,"desc":"","default":"","type":"int","name":"site_id"},{"name":"layout_container","in":"body","_id":"56ec5a1e611730190000f263","ref":"","required":true,"desc":"","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 23099345,\n    \"content_node_id\": 20151248,\n    \"layout_type\": \"oneColumn\",\n    \"locked\": false,\n    \"position\": 2,\n    \"created_at\": \"2016-04-11T09:46:21-07:00\",\n    \"updated_at\": \"2016-04-11T09:46:21-07:00\",\n    \"custom_css_class\": null,\n    \"mirror_target_id\": null,\n    \"name\": null,\n    \"layout_columns\": [\n        {\n            \"id\": 28092708,\n            \"layout_container_id\": 23099345,\n            \"position\": 1,\n            \"page_elements\": []\n        }\n    ]\n}","name":""}]},"settings":"","url":"/layout_containers"},"editedParams2":true,"hidden":false,"link_url":"","order":1,"title":"Layout Containers Create","link_external":false,"parentDoc":null,"project":"57334f89b26eb71900f89b9f","sync_unique":"","childrenPages":[]}

postLayout Containers Create

The Create method accepts a single Layout Container (see attributes above) and creates a new record in Sport Ngin. The Layout Container will be created within the specified [Content Node](https://sportnginsite.readme.io/docs/content-node) on the specified [Site](https://sportnginsite.readme.io/docs/sites). ###Parameters

Body Params

site_id:
required
integer
layout_container:
required
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X POST -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{
    "layout_container":
        {
            "content_node_id": 20151248,
            "layout_type": "oneColumn",
            "position": 1
        },
    "site_id": 11953
}
' "https://api.sportngin.com/layout_containers"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/layout_containers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["content-type"] = 'application/json'
request.body = "{\n    \"layout_container\":\n        {\n            \"content_node_id\": 20151248,\n            \"layout_type\": \"oneColumn\",\n            \"position\": 1\n        },\n    \"site_id\": 11953\n}\n"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"layout_container\":\n        {\n            \"content_node_id\": 20151248,\n            \"layout_type\": \"oneColumn\",\n            \"position\": 1\n        },\n    \"site_id\": 11953\n}\n");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/layout_containers")
  .post(body)
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 23099345,
    "content_node_id": 20151248,
    "layout_type": "oneColumn",
    "locked": false,
    "position": 2,
    "created_at": "2016-04-11T09:46:21-07:00",
    "updated_at": "2016-04-11T09:46:21-07:00",
    "custom_css_class": null,
    "mirror_target_id": null,
    "name": null,
    "layout_columns": [
        {
            "id": 28092708,
            "layout_container_id": 23099345,
            "position": 1,
            "page_elements": []
        }
    ]
}


{"_id":"57334f89b26eb71900f89c7e","link_url":"","project":"57334f89b26eb71900f89b9f","title":"Layout Containers Show","version":"57334f89b26eb71900f89ba0","__v":0,"editedParams":true,"githubsync":"","link_external":false,"slug":"layout-containers-show","createdAt":"2016-03-18T19:36:44.638Z","editedParams2":true,"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\": \"content_node_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"ID of content_node assigned by NGIN\",\n    \"2-0\": \"layout_type\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Describes arrangement of Layout Columns within the Layout Container. Possible values \\\"oneColumn\\\", \\\"twoColumn5050\\\", \\\"twoColumn6633\\\", \\\"twoColumn3366\\\", \\\"threeColumn333333\\\", \\\"threeColumn502525\\\", \\\"threeColumn255025\\\", \\\"threeColumn252550\\\". Defaults to \\\"oneColumn\\\"\",\n    \"3-0\": \"locked\",\n    \"3-1\": \"Boolean\",\n    \"3-2\": \"Sets weather Layout Column can be edited\",\n    \"4-0\": \"position\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"Relative position among all Layout Containers within Content Node.\",\n    \"5-0\": \"custom_css_class\",\n    \"5-1\": \"String\",\n    \"5-2\": \"CSS class to apply to Layout Container\",\n    \"6-0\": \"mirror_target_id\",\n    \"6-1\": \"Integer\",\n    \"6-2\": \"If set, Layout Container will mirror the content of another Layout Container with this id\",\n    \"7-0\": \"name\",\n    \"7-1\": \"String\",\n    \"8-0\": \"created_at\",\n    \"8-1\": \"Datetime\",\n    \"8-2\": \"Timestamp of creation date\",\n    \"9-0\": \"updated_at\",\n    \"9-1\": \"Datetime\",\n    \"9-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 10\n}\n[/block]","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X GET -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" \"https://api.sportngin.com/layout_containers/23099345\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/layout_containers/23099345\")\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[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"layout_container\\\":\\n        {\\n            \\\"content_node_id\\\": 20151248,\\n            \\\"layout_type\\\": \\\"oneColumn\\\",\\n            \\\"position\\\": 1\\n        },\\n    \\\"site_id\\\": 11953\\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    \\\"layout_container\\\":\\n        {\\n            \\\"content_node_id\\\": 20151248,\\n            \\\"layout_type\\\": \\\"oneColumn\\\",\\n            \\\"position\\\": 1\\n        },\\n    \\\"site_id\\\": 11953\\n}\\n\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/layout_containers/23099345\")\n  .get()\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":"get","params":[{"name":"id","in":"path","_id":"5722e4ca7b36300e00926bf9","ref":"","required":false,"desc":"The unique identifier of the layout container","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 23099345,\n    \"content_node_id\": 20151248,\n    \"layout_type\": \"oneColumn\",\n    \"locked\": false,\n    \"position\": 2,\n    \"created_at\": \"2016-04-11T09:46:21-07:00\",\n    \"updated_at\": \"2016-04-11T09:46:21-07:00\",\n    \"custom_css_class\": null,\n    \"mirror_target_id\": null,\n    \"name\": null,\n    \"layout_columns\": [\n        {\n            \"id\": 28092708,\n            \"layout_container_id\": 23099345,\n            \"position\": 1,\n            \"page_elements\": []\n        }\n    ]\n}","name":""}]},"settings":"","url":"/layout_containers/:id"},"category":"57334f89b26eb71900f89bcf","excerpt":"The Show method returns a single Layout Container for a given `id`.\n\n###Parameters","hidden":false,"isReference":true,"order":2,"parentDoc":null,"type":"get","updates":[],"user":"56e71f9edee212320019e731","sync_unique":"","childrenPages":[]}

getLayout Containers Show

The Show method returns a single Layout Container for a given `id`. ###Parameters

Path Params

id:
integer
The unique identifier of the layout container

Attributes

Attribute
Type
Notes

id

Integer

Unique ID assigned by NGIN

content_node_id

Integer

ID of content_node assigned by NGIN

layout_type

String

Describes arrangement of Layout Columns within the Layout Container. Possible values "oneColumn", "twoColumn5050", "twoColumn6633", "twoColumn3366", "threeColumn333333", "threeColumn502525", "threeColumn255025", "threeColumn252550". Defaults to "oneColumn"

locked

Boolean

Sets weather Layout Column can be edited

position

Integer

Relative position among all Layout Containers within Content Node.

custom_css_class

String

CSS class to apply to Layout Container

mirror_target_id

Integer

If set, Layout Container will mirror the content of another Layout Container with this id

name

String

created_at

Datetime

Timestamp of creation date

updated_at

Datetime

Timestamp of last update

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" "https://api.sportngin.com/layout_containers/23099345"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/layout_containers/23099345")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["content-type"] = 'application/json'
request.body = "{\n    \"layout_container\":\n        {\n            \"content_node_id\": 20151248,\n            \"layout_type\": \"oneColumn\",\n            \"position\": 1\n        },\n    \"site_id\": 11953\n}\n"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"layout_container\":\n        {\n            \"content_node_id\": 20151248,\n            \"layout_type\": \"oneColumn\",\n            \"position\": 1\n        },\n    \"site_id\": 11953\n}\n");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/layout_containers/23099345")
  .get()
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 23099345,
    "content_node_id": 20151248,
    "layout_type": "oneColumn",
    "locked": false,
    "position": 2,
    "created_at": "2016-04-11T09:46:21-07:00",
    "updated_at": "2016-04-11T09:46:21-07:00",
    "custom_css_class": null,
    "mirror_target_id": null,
    "name": null,
    "layout_columns": [
        {
            "id": 28092708,
            "layout_container_id": 23099345,
            "position": 1,
            "page_elements": []
        }
    ]
}


{"_id":"57334f89b26eb71900f89cac","isReference":true,"link_external":false,"link_url":"","__v":0,"createdAt":"2016-03-18T19:50:43.284Z","editedParams2":true,"githubsync":"","hidden":false,"parentDoc":null,"sync_unique":"","project":"57334f89b26eb71900f89b9f","title":"Layout Containers Update","api":{"method":"put","params":[{"desc":"","default":"","type":"int","name":"id","in":"path","_id":"56ec5c133441900e00ccf86b","ref":"","required":true},{"ref":"","required":false,"desc":"","default":"","type":"object","name":"layout_container","in":"body","_id":"5722e53efd2e3d0e00fa24cb"}],"results":{"codes":[{"code":"{\n    \"id\": 23099345,\n    \"content_node_id\": 20151248,\n    \"layout_type\": \"twoColumn5050\",\n    \"locked\": false,\n    \"position\": 2,\n    \"created_at\": \"2016-04-11T09:46:21-07:00\",\n    \"updated_at\": \"2016-04-11T09:58:48-07:00\",\n    \"custom_css_class\": null,\n    \"mirror_target_id\": null,\n    \"name\": null,\n    \"layout_columns\": [\n        {\n            \"id\": 28092708,\n            \"layout_container_id\": 23099345,\n            \"position\": 1,\n            \"page_elements\": []\n        },\n        {\n            \"id\": 28093130,\n            \"layout_container_id\": 23099345,\n            \"position\": 2,\n            \"page_elements\": []\n        }\n    ]\n}","name":"","status":200,"language":"json"}]},"settings":"","url":"/layout_containers/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"Content-Type: application/json\" -d '{\n    \"layout_container\":\n    {\n        \"layout_type\": \"twoColumn5050\"\n    }\n}' \"https://api.sportngin.com/layout_containers/23099345\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/layout_containers/23099345\")\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[\"accept\"] = 'application/json'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"layout_container\\\":\\n    {\\n        \\\"layout_type\\\": \\\"twoColumn5050\\\"\\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    \\\"layout_container\\\":\\n    {\\n        \\\"layout_type\\\": \\\"twoColumn5050\\\"\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/layout_containers/23099345\")\n  .put(body)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]}},"body":"","excerpt":"The Update method accepts a single Layout Container (see attributes above) and updates the matching record in Sport Ngin.\n\n###Parameters","order":3,"category":"57334f89b26eb71900f89bcf","updates":[],"user":"56e71f9edee212320019e731","editedParams":true,"slug":"layout-containers-update","type":"put","version":"57334f89b26eb71900f89ba0","childrenPages":[]}

putLayout Containers Update

The Update method accepts a single Layout Container (see attributes above) and updates the matching record in Sport Ngin. ###Parameters

Path Params

id:
required
integer

Body Params

layout_container:
object

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X PUT -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "layout_container":
    {
        "layout_type": "twoColumn5050"
    }
}' "https://api.sportngin.com/layout_containers/23099345"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/layout_containers/23099345")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\n    \"layout_container\":\n    {\n        \"layout_type\": \"twoColumn5050\"\n    }\n}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"layout_container\":\n    {\n        \"layout_type\": \"twoColumn5050\"\n    }\n}");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/layout_containers/23099345")
  .put(body)
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 23099345,
    "content_node_id": 20151248,
    "layout_type": "twoColumn5050",
    "locked": false,
    "position": 2,
    "created_at": "2016-04-11T09:46:21-07:00",
    "updated_at": "2016-04-11T09:58:48-07:00",
    "custom_css_class": null,
    "mirror_target_id": null,
    "name": null,
    "layout_columns": [
        {
            "id": 28092708,
            "layout_container_id": 23099345,
            "position": 1,
            "page_elements": []
        },
        {
            "id": 28093130,
            "layout_container_id": 23099345,
            "position": 2,
            "page_elements": []
        }
    ]
}


{"_id":"57334f89b26eb71900f89cc1","type":"post","version":"57334f89b26eb71900f89ba0","editedParams2":true,"order":5,"slug":"layout-containers-move","excerpt":"The Move method _moves_ the Layout Container into the specified [Content Node](https://sportnginsite.readme.io/docs/content-node).\n\n###Parameters","updates":[],"body":"","createdAt":"2016-03-18T19:58:47.065Z","editedParams":true,"category":"57334f89b26eb71900f89bcf","githubsync":"","link_external":false,"parentDoc":null,"project":"57334f89b26eb71900f89b9f","__v":0,"api":{"params":[{"ref":"","required":true,"desc":"ID of site the layout_container belongs to","default":"","type":"int","name":"site_id","in":"body","_id":"56ec5df77cbb890e00619ccd"},{"required":true,"desc":"","default":"","type":"int","name":"content_node_id","in":"body","_id":"56ec5df77cbb890e00619ccc","ref":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 21906459,\n    \"content_node_id\": 19546653,\n    \"layout_type\": \"twoColumn5050\",\n    \"locked\": false,\n    \"position\": 2,\n    \"created_at\": \"2016-02-24T06:32:29-06:00\",\n    \"updated_at\": \"2016-05-02T14:50:47-05:00\",\n    \"custom_css_class\": \"\",\n    \"mirror_target_id\": null,\n    \"name\": \"\",\n    \"layout_columns\": [\n        {\n            \"id\": 26627518,\n            \"layout_container_id\": 21906459,\n            \"position\": 1,\n            \"page_elements\": [\n                {\n                    \"id\": 311818188,\n                    \"element_type\": \"TextBlock\",\n                    \"element_id\": 5848921,\n                    \"position\": 1,\n                    \"updated_on\": \"2016-05-02T14:41:53-05:00\",\n                    \"created_on\": \"2016-05-02T14:41:53-05:00\",\n                    \"element_locked\": false,\n                    \"content_locked\": false,\n                    \"layout_column_id\": 26627518,\n                    \"mirror_enabled\": false,\n                    \"custom_css_class\": \"\",\n                    \"question_element_dependency_type\": \"any\",\n                    \"element\": {\n                        \"id\": 5848921,\n                        \"subtitle\": \"jijihuhyg\",\n                        \"content\": \"<p>hugtfrdrtdcgvbhbjnkml  </p>\\r\\n\\r\\n<p> </p>\\r\\n\\r\\n<p>njn</p>\\r\\n\",\n                        \"updated_on\": \"2016-05-02T14:41:53-05:00\",\n                        \"created_on\": \"2016-05-02T14:41:53-05:00\",\n                        \"display_size\": \"small\",\n                        \"alignment\": \"left\",\n                        \"url\": \"\",\n                        \"protocol\": \"http://\",\n                        \"has_url\": false,\n                        \"action\": \"1\",\n                        \"image_id\": null,\n                        \"created_without_fck\": false,\n                        \"subtitle_alignment\": \"left\",\n                        \"cutline\": \"\",\n                        \"thumbnails\": {}\n                    }\n                },\n                {\n                    \"id\": 311769232,\n                    \"element_type\": \"Photo\",\n                    \"element_id\": 2163125,\n                    \"position\": 2,\n                    \"updated_on\": \"2016-05-02T14:37:41-05:00\",\n                    \"created_on\": \"2016-04-26T14:14:20-05:00\",\n                    \"element_locked\": false,\n                    \"content_locked\": false,\n                    \"layout_column_id\": 26627518,\n                    \"mirror_enabled\": null,\n                    \"custom_css_class\": null,\n                    \"question_element_dependency_type\": \"any\",\n                    \"element\": {\n                        \"id\": 2163125,\n                        \"caption\": null,\n                        \"updated_on\": \"2016-04-26T14:14:20-05:00\",\n                        \"created_on\": \"2016-04-26T14:14:20-05:00\",\n                        \"url\": null,\n                        \"protocol\": null,\n                        \"has_url\": 0,\n                        \"action\": null,\n                        \"image_id\": 63695164,\n                        \"show_original\": false,\n                        \"enlargeable\": false,\n                        \"cutline\": \"We are the Elf Owls\",\n                        \"thumbnails\": {\n                            \"large\": \"/attachments/photo/6369/5164/SnowyOwlLanding_large.jpg\",\n                            \"medium\": \"/attachments/photo/6369/5164/SnowyOwlLanding_medium.jpg\",\n                            \"small\": \"/attachments/photo/6369/5164/SnowyOwlLanding_small.jpg\",\n                            \"thumb\": \"/attachments/photo/6369/5164/SnowyOwlLanding_thumb.jpg\"\n                        }\n                    }\n                }\n            ]\n        },\n        {\n            \"id\": 28644672,\n            \"layout_container_id\": 21906459,\n            \"position\": 2,\n            \"page_elements\": []\n        }\n    ]\n}","name":""}]},"settings":"","url":"/layout_containers/:id/move","auth":"required","examples":{"codes":[{"code":"curl -X PUT -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN  \" -H \"Accept: application/json\" -H \"Content-Type: application/json\" -d '{\n    \"content_node_id\": 19546653\n}' \"https://api.sportngin.com/layout_containers/21906459/move?site_id=11953\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/layout_containers/21906459/move?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::Put.new(url)\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"content_node_id\\\": 19546653\\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    \\\"content_node_id\\\": 19546653\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/layout_containers/21906459/move?site_id=11953\")\n  .put(body)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"post"},"sync_unique":"","title":"Layout Containers Move","user":"56e71f9edee212320019e731","hidden":false,"isReference":true,"link_url":"","childrenPages":[]}

postLayout Containers Move

The Move method _moves_ the Layout Container into the specified [Content Node](https://sportnginsite.readme.io/docs/content-node). ###Parameters

Body Params

site_id:
required
integer
ID of site the layout_container belongs to
content_node_id:
required
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X PUT -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN  " -H "Accept: application/json" -H "Content-Type: application/json" -d '{
    "content_node_id": 19546653
}' "https://api.sportngin.com/layout_containers/21906459/move?site_id=11953"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/layout_containers/21906459/move?site_id=11953")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\n    \"content_node_id\": 19546653\n}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"content_node_id\": 19546653\n}");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/layout_containers/21906459/move?site_id=11953")
  .put(body)
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 21906459,
    "content_node_id": 19546653,
    "layout_type": "twoColumn5050",
    "locked": false,
    "position": 2,
    "created_at": "2016-02-24T06:32:29-06:00",
    "updated_at": "2016-05-02T14:50:47-05:00",
    "custom_css_class": "",
    "mirror_target_id": null,
    "name": "",
    "layout_columns": [
        {
            "id": 26627518,
            "layout_container_id": 21906459,
            "position": 1,
            "page_elements": [
                {
                    "id": 311818188,
                    "element_type": "TextBlock",
                    "element_id": 5848921,
                    "position": 1,
                    "updated_on": "2016-05-02T14:41:53-05:00",
                    "created_on": "2016-05-02T14:41:53-05:00",
                    "element_locked": false,
                    "content_locked": false,
                    "layout_column_id": 26627518,
                    "mirror_enabled": false,
                    "custom_css_class": "",
                    "question_element_dependency_type": "any",
                    "element": {
                        "id": 5848921,
                        "subtitle": "jijihuhyg",
                        "content": "<p>hugtfrdrtdcgvbhbjnkml  </p>\r\n\r\n<p> </p>\r\n\r\n<p>njn</p>\r\n",
                        "updated_on": "2016-05-02T14:41:53-05:00",
                        "created_on": "2016-05-02T14:41:53-05:00",
                        "display_size": "small",
                        "alignment": "left",
                        "url": "",
                        "protocol": "http://",
                        "has_url": false,
                        "action": "1",
                        "image_id": null,
                        "created_without_fck": false,
                        "subtitle_alignment": "left",
                        "cutline": "",
                        "thumbnails": {}
                    }
                },
                {
                    "id": 311769232,
                    "element_type": "Photo",
                    "element_id": 2163125,
                    "position": 2,
                    "updated_on": "2016-05-02T14:37:41-05:00",
                    "created_on": "2016-04-26T14:14:20-05:00",
                    "element_locked": false,
                    "content_locked": false,
                    "layout_column_id": 26627518,
                    "mirror_enabled": null,
                    "custom_css_class": null,
                    "question_element_dependency_type": "any",
                    "element": {
                        "id": 2163125,
                        "caption": null,
                        "updated_on": "2016-04-26T14:14:20-05:00",
                        "created_on": "2016-04-26T14:14:20-05:00",
                        "url": null,
                        "protocol": null,
                        "has_url": 0,
                        "action": null,
                        "image_id": 63695164,
                        "show_original": false,
                        "enlargeable": false,
                        "cutline": "We are the Elf Owls",
                        "thumbnails": {
                            "large": "/attachments/photo/6369/5164/SnowyOwlLanding_large.jpg",
                            "medium": "/attachments/photo/6369/5164/SnowyOwlLanding_medium.jpg",
                            "small": "/attachments/photo/6369/5164/SnowyOwlLanding_small.jpg",
                            "thumb": "/attachments/photo/6369/5164/SnowyOwlLanding_thumb.jpg"
                        }
                    }
                }
            ]
        },
        {
            "id": 28644672,
            "layout_container_id": 21906459,
            "position": 2,
            "page_elements": []
        }
    ]
}


{"_id":"57334f89b26eb71900f89c1a","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}{\n    \"id\": 22926314,\n    \"content_node_id\": 20151248,\n    \"layout_type\": \"twoColumn5050\",\n    \"locked\": false,\n    \"position\": 2,\n    \"created_at\": \"2016-04-11T09:45:29-07:00\",\n    \"updated_at\": \"2016-04-11T09:58:19-07:00\",\n    \"custom_css_class\": null,\n    \"mirror_target_id\": null,\n    \"name\": null,\n    \"layout_columns\": []\n}","name":""}]},"settings":"","url":"/layout_containers/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X DELETE -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"Content-Type: application/json\" \"https://api.sportngin.com/layout_containers/22926314\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/layout_containers/22926314\")\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'\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/layout_containers/22926314\")\n  .delete(null)\n  .addHeader(\"ngin-api-version\", \"0.1\")\n  .addHeader(\"authorization\", \"Bearer ACCESS_TOKEN\")\n  .addHeader(\"accept\", \"application/json\")\n  .addHeader(\"content-type\", \"application/json\")\n  .build();\n\nResponse response = client.newCall(request).execute();"}]},"method":"delete","params":[{"required":true,"desc":"","default":"","type":"int","name":"layout_container_id","in":"body","_id":"56ec5d02611730190000f26b","ref":""}]},"createdAt":"2016-03-18T19:54:42.535Z","editedParams2":true,"githubsync":"","project":"57334f89b26eb71900f89b9f","sync_unique":"","type":"delete","user":"56e71f9edee212320019e731","body":"","category":"57334f89b26eb71900f89bcf","editedParams":true,"hidden":false,"parentDoc":null,"version":"57334f89b26eb71900f89ba0","title":"Layout Containers Delete","updates":[],"excerpt":"The Delete method permanently deletes the matching Layout Container record in Sport Ngin.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","isReference":true,"link_external":false,"link_url":"","__v":0,"order":6,"slug":"layout-containers-delete","childrenPages":[]}

deleteLayout Containers Delete

The Delete method permanently deletes the matching Layout Container record in Sport Ngin. *This method takes action upon initial invocation and cannot be reversed.* ###Parameters

Body Params

layout_container_id:
required
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X DELETE -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" "https://api.sportngin.com/layout_containers/22926314"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/layout_containers/22926314")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/layout_containers/22926314")
  .delete(null)
  .addHeader("ngin-api-version", "0.1")
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{}{
    "id": 22926314,
    "content_node_id": 20151248,
    "layout_type": "twoColumn5050",
    "locked": false,
    "position": 2,
    "created_at": "2016-04-11T09:45:29-07:00",
    "updated_at": "2016-04-11T09:58:19-07:00",
    "custom_css_class": null,
    "mirror_target_id": null,
    "name": null,
    "layout_columns": []
}


{"_id":"57334f89b26eb71900f89cb6","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"createdAt":"2016-04-05T20:19:41.670Z","link_url":"","title":"Page Elements","user":"56548c568975c70d002ea4b4","excerpt":"A Page Element represents a container for content that displays on the page. Each Page Element has an Element, where the Page Element represents the placement on the page within Sitebuilder, and the Element can be one of several different types, such as a `TextBlock` or a `Photo` which contains the actual content displayed in the Page Element on your site.\n\n[Page Element Types](https://sportnginsite.readme.io/docs/page-element-types-index) provides an array of Page Elements that are available to a given user.\n\n###Associations\nA Page Element belongs to a [Layout Column](https://sportnginsite.readme.io/docs/layout-column-create), a  [Layout Container](https://sportnginsite.readme.io/docs/layout-containers-show), and a  [Content Node](https://sportnginsite.readme.io/docs/content-node). A Page Element has one Element, which can be one of several different types: `Comment Stream`, `Link`, `PageDivider`, `Photo`, `TableBuilder`, `TextBlock`, `Video`, `Mirror`, `News Aggregator`, `ExternalVideo`, or `UploadedVideo`.","hidden":false,"link_external":false,"parentDoc":null,"order":7,"type":"basic","__v":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"Page Elements are created and deleted _concurrently_ with their Elements.\"\n}\n[/block]","category":"57334f89b26eb71900f89bcf","githubsync":"","sync_unique":"","updates":[],"version":"57334f89b26eb71900f89ba0","isReference":true,"project":"57334f89b26eb71900f89b9f","slug":"page-elements","childrenPages":[]}

Page Elements

A Page Element represents a container for content that displays on the page. Each Page Element has an Element, where the Page Element represents the placement on the page within Sitebuilder, and the Element can be one of several different types, such as a `TextBlock` or a `Photo` which contains the actual content displayed in the Page Element on your site. [Page Element Types](https://sportnginsite.readme.io/docs/page-element-types-index) provides an array of Page Elements that are available to a given user. ###Associations A Page Element belongs to a [Layout Column](https://sportnginsite.readme.io/docs/layout-column-create), a [Layout Container](https://sportnginsite.readme.io/docs/layout-containers-show), and a [Content Node](https://sportnginsite.readme.io/docs/content-node). A Page Element has one Element, which can be one of several different types: `Comment Stream`, `Link`, `PageDivider`, `Photo`, `TableBuilder`, `TextBlock`, `Video`, `Mirror`, `News Aggregator`, `ExternalVideo`, or `UploadedVideo`.

Hint

Page Elements are created and deleted concurrently with their Elements.

{"_id":"57334f89b26eb71900f89ca9","isReference":true,"link_url":"","createdAt":"2016-03-24T17:09:53.773Z","editedParams":true,"editedParams2":true,"parentDoc":null,"user":"56e71f9edee212320019e731","title":"Page Elements Create","__v":0,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 312776211,\n    \"element_type\": \"TextBlock\",\n    \"element_id\": 5859973,\n    \"position\": 1,\n    \"updated_on\": \"2016-04-28T10:05:45-07:00\",\n    \"created_on\": \"2016-04-28T10:05:45-07:00\",\n    \"element_locked\": false,\n    \"content_locked\": false,\n    \"layout_column_id\": 26627518,\n    \"mirror_enabled\": null,\n    \"custom_css_class\": null,\n    \"question_element_dependency_type\": \"any\",\n    \"element\": {\n        \"id\": 5859973,\n        \"subtitle\": null,\n        \"content\": \"Come see the Elf Owls, the're so awesome!\",\n        \"updated_on\": \"2016-04-28T10:14:28-07:00\",\n        \"created_on\": \"2016-04-28T10:05:45-07:00\",\n        \"display_size\": null,\n        \"alignment\": null,\n        \"url\": null,\n        \"protocol\": null,\n        \"has_url\": false,\n        \"action\": null,\n        \"image_id\": null,\n        \"created_without_fck\": false,\n        \"subtitle_alignment\": \"left\",\n        \"cutline\": null,\n        \"thumbnails\": {}\n    }\n}","name":""}]},"settings":"","url":"/page_elements","auth":"required","examples":{"codes":[{"name":"cURL - TextBlock Page Element","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_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Elf Owls...they are the best!\"\n        }\n    }\n}' \"https://api.sportngin.com/page_elements\""},{"name":"Ruby - TextBlock Page Element","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/page_elements\")\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_element\\\":\\n    {\\n        \\\"layout_column_id\\\": 26627518,\\n        \\\"page_element_type\\\": \\\"TextBlock\\\",\\n        \\\"element\\\":\\n        {\\n            \\\"content\\\": \\\"Come see the Snow Owls...they are the best!\\\"\\n        }\\n    }\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"name":null,"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"page_element\\\":\\n    {\\n        \\\"layout_column_id\\\": 26627518,\\n        \\\"page_element_type\\\": \\\"TextBlock\\\",\\n        \\\"element\\\":\\n        {\\n            \\\"content\\\": \\\"Come see the Snow Owls...they are the best!\\\"\\n        }\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/page_elements\")\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":[{"ref":"","required":true,"desc":"Id of the column where the page_element will be placed","default":"","type":"int","name":"layout_column_id","in":"body","_id":"572259db1bfc8a0e00bcd67a"},{"type":"string","name":"page_element_type","in":"body","_id":"572259db1bfc8a0e00bcd679","ref":"","required":true,"desc":"Type of page_element to be created","default":""},{"type":"string","name":"after_pe","in":"body","_id":"572259db1bfc8a0e00bcd678","ref":"","required":false,"desc":"page_element ID this element will be displayed after vertically.","default":""},{"type":"boolean","name":"element_locked","in":"body","_id":"572259db1bfc8a0e00bcd677","ref":"","required":false,"desc":"Defaults to false. If true, page element cannot be moved or deleted","default":""},{"required":false,"desc":"Defaults to false. If true, content cannot be changed.","default":"","type":"boolean","name":"content_locked","in":"body","_id":"572259db1bfc8a0e00bcd676","ref":""},{"desc":"Not valid for NewsArticles. Should be set to NULL","default":"","type":"int","name":"dependent_type","in":"body","_id":"572259db1bfc8a0e00bcd675","ref":"","required":false},{"ref":"","required":false,"desc":"Defaults to false. If true, page element can be mirrored.","default":"","type":"boolean","name":"mirror_enabled","in":"body","_id":"572259db1bfc8a0e00bcd674"},{"type":"string","name":"custom_css_class","in":"body","_id":"572259db1bfc8a0e00bcd673","ref":"","required":false,"desc":"Max length 255. Applies extra css classes to this page element.","default":""}]},"body":"","link_external":false,"order":8,"project":"57334f89b26eb71900f89b9f","sync_unique":"","version":"57334f89b26eb71900f89ba0","updates":[],"category":"57334f89b26eb71900f89bcf","excerpt":"The Create method accepts a single Page Element (see attributes above) and creates a new record in Sport Ngin.  This method requires `layout_column_id`, `page_element`, and `element`, and `after_pe` is optional.\n\n###Parameters","githubsync":"","hidden":false,"slug":"page-elements-create","type":"post","childrenPages":[]}

postPage Elements Create

The Create method accepts a single Page Element (see attributes above) and creates a new record in Sport Ngin. This method requires `layout_column_id`, `page_element`, and `element`, and `after_pe` is optional. ###Parameters

Body Params

layout_column_id:
required
integer
Id of the column where the page_element will be placed
page_element_type:
required
string
Type of page_element to be created
after_pe:
string
page_element ID this element will be displayed after vertically.
element_locked:
boolean
Defaults to false. If true, page element cannot be moved or deleted
content_locked:
boolean
Defaults to false. If true, content cannot be changed.
dependent_type:
integer
Not valid for NewsArticles. Should be set to NULL
mirror_enabled:
boolean
Defaults to false. If true, page element can be mirrored.
custom_css_class:
string
Max length 255. Applies extra css classes to this page element.

Definition

{{ api_url }}{{ page_api_url }}

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_element":
    {
        "layout_column_id": 26627518,
        "page_element_type": "TextBlock",
        "element":
        {
            "content": "Come see the Elf Owls...they are the best!"
        }
    }
}' "https://api.sportngin.com/page_elements"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/page_elements")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n    \"page_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Snow Owls...they are the best!\"\n        }\n    }\n}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"page_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Snow Owls...they are the best!\"\n        }\n    }\n}");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/page_elements")
  .post(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 312776211,
    "element_type": "TextBlock",
    "element_id": 5859973,
    "position": 1,
    "updated_on": "2016-04-28T10:05:45-07:00",
    "created_on": "2016-04-28T10:05:45-07:00",
    "element_locked": false,
    "content_locked": false,
    "layout_column_id": 26627518,
    "mirror_enabled": null,
    "custom_css_class": null,
    "question_element_dependency_type": "any",
    "element": {
        "id": 5859973,
        "subtitle": null,
        "content": "Come see the Elf Owls, the're so awesome!",
        "updated_on": "2016-04-28T10:14:28-07:00",
        "created_on": "2016-04-28T10:05:45-07:00",
        "display_size": null,
        "alignment": null,
        "url": null,
        "protocol": null,
        "has_url": false,
        "action": null,
        "image_id": null,
        "created_without_fck": false,
        "subtitle_alignment": "left",
        "cutline": null,
        "thumbnails": {}
    }
}


{"_id":"57334f89b26eb71900f89ca6","user":"56e71f9edee212320019e731","category":"57334f89b26eb71900f89bcf","hidden":false,"isReference":true,"order":9,"slug":"page-elements-show","sync_unique":"","title":"Page Elements Show","editedParams2":true,"excerpt":"The Show method returns a single Page Elements for a given `id`.\n\n###Parameters","link_external":false,"type":"get","updates":[],"__v":0,"api":{"examples":{"codes":[{"name":"cURL - TextBlock Page Element","language":"curl","code":"curl -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" \"https://api.sportngin.com/page_elements/312776211\""},{"name":"Ruby - TextBlock Page Element","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/page_elements/312776211\")\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'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"page_element\\\":\\n    {\\n        \\\"layout_column_id\\\": 26627518,\\n        \\\"page_element_type\\\": \\\"TextBlock\\\",\\n        \\\"element\\\":\\n        {\\n            \\\"content\\\": \\\"Come see the Snow Owls, it's cold outside!\\\"\\n        }\\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    \\\"page_element\\\":\\n    {\\n        \\\"layout_column_id\\\": 26627518,\\n        \\\"page_element_type\\\": \\\"TextBlock\\\",\\n        \\\"element\\\":\\n        {\\n            \\\"content\\\": \\\"Come see the Snow Owls, it's cold outside!\\\"\\n        }\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/page_elements/312776211\")\n  .get()\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 - TextBlock Page Element","language":"java"}]},"method":"get","params":[{"default":"","type":"int","name":"id","in":"path","_id":"56f41d397ea0091700f63ab0","ref":"","required":true,"desc":"Id of the page element to be returned"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 312776211,\n    \"element_type\": \"TextBlock\",\n    \"element_id\": 5859973,\n    \"position\": 1,\n    \"updated_on\": \"2016-04-28T10:05:45-07:00\",\n    \"created_on\": \"2016-04-28T10:05:45-07:00\",\n    \"element_locked\": false,\n    \"content_locked\": false,\n    \"layout_column_id\": 26627518,\n    \"mirror_enabled\": null,\n    \"custom_css_class\": null,\n    \"question_element_dependency_type\": \"any\",\n    \"element\": {\n        \"id\": 5859973,\n        \"subtitle\": null,\n        \"content\": \"Come see the Elf Owls, it's cold outside!\",\n        \"updated_on\": \"2016-04-28T10:14:29-07:00\",\n        \"created_on\": \"2016-04-28T10:05:45-07:00\",\n        \"display_size\": null,\n        \"alignment\": null,\n        \"url\": null,\n        \"protocol\": null,\n        \"has_url\": false,\n        \"action\": null,\n        \"image_id\": null,\n        \"created_without_fck\": false,\n        \"subtitle_alignment\": \"left\",\n        \"cutline\": null,\n        \"thumbnails\": {}\n    }\n}","name":""}]},"settings":"","url":"/page_elements/:id","auth":"required"},"createdAt":"2016-03-24T17:00:41.717Z","editedParams":true,"link_url":"","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\": \"page_element_type\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Describes type of element\",\n    \"2-0\": \"element_id\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"id of element\",\n    \"3-0\": \"layout_column_id\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"ID of LayoutColumn\",\n    \"4-0\": \"after_pe\",\n    \"4-1\": \"Integer\",\n    \"4-2\": \"Page element id this element will be displayed after vertically.\",\n    \"5-0\": \"element_locked\",\n    \"5-1\": \"Boolean\",\n    \"5-2\": \"Defaults to false. If true, page element cannot be moved or deleted\",\n    \"6-0\": \"content_locked\",\n    \"6-1\": \"Boolean\",\n    \"6-2\": \"Defaults to false. If true, content cannot be changed.\",\n    \"7-0\": \"dependent_type\",\n    \"7-1\": \"Integer\",\n    \"7-2\": \"Not valid for NewsArticles. Should be set to NULL\",\n    \"8-0\": \"mirror_enabled\",\n    \"8-1\": \"Boolean\",\n    \"8-2\": \"Defaults to false. If true, page element can be mirrored.\",\n    \"9-0\": \"custom_css_class\",\n    \"9-1\": \"String\",\n    \"9-2\": \"Max length 255. Applies extra css classes to this page element.\",\n    \"10-0\": \"created_on\",\n    \"10-1\": \"Datetime\",\n    \"10-2\": \"read only\",\n    \"11-2\": \"read only\",\n    \"11-1\": \"Datetime\",\n    \"11-0\": \"updated_on\"\n  },\n  \"cols\": 3,\n  \"rows\": 12\n}\n[/block]","githubsync":"","parentDoc":null,"project":"57334f89b26eb71900f89b9f","version":"57334f89b26eb71900f89ba0","childrenPages":[]}

getPage Elements Show

The Show method returns a single Page Elements for a given `id`. ###Parameters

Path Params

id:
required
integer
Id of the page element to be returned

Attributes

Attributes
Type
Notes

id

Integer

Unique id assign by NGIN

page_element_type

String

Describes type of element

element_id

Integer

id of element

layout_column_id

Integer

ID of LayoutColumn

after_pe

Integer

Page element id this element will be displayed after vertically.

element_locked

Boolean

Defaults to false. If true, page element cannot be moved or deleted

content_locked

Boolean

Defaults to false. If true, content cannot be changed.

dependent_type

Integer

Not valid for NewsArticles. Should be set to NULL

mirror_enabled

Boolean

Defaults to false. If true, page element can be mirrored.

custom_css_class

String

Max length 255. Applies extra css classes to this page element.

created_on

Datetime

read only

updated_on

Datetime

read only

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" "https://api.sportngin.com/page_elements/312776211"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/page_elements/312776211")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n    \"page_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Snow Owls, it's cold outside!\"\n        }\n    }\n}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"page_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Snow Owls, it's cold outside!\"\n        }\n    }\n}");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/page_elements/312776211")
  .get()
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 312776211,
    "element_type": "TextBlock",
    "element_id": 5859973,
    "position": 1,
    "updated_on": "2016-04-28T10:05:45-07:00",
    "created_on": "2016-04-28T10:05:45-07:00",
    "element_locked": false,
    "content_locked": false,
    "layout_column_id": 26627518,
    "mirror_enabled": null,
    "custom_css_class": null,
    "question_element_dependency_type": "any",
    "element": {
        "id": 5859973,
        "subtitle": null,
        "content": "Come see the Elf Owls, it's cold outside!",
        "updated_on": "2016-04-28T10:14:29-07:00",
        "created_on": "2016-04-28T10:05:45-07:00",
        "display_size": null,
        "alignment": null,
        "url": null,
        "protocol": null,
        "has_url": false,
        "action": null,
        "image_id": null,
        "created_without_fck": false,
        "subtitle_alignment": "left",
        "cutline": null,
        "thumbnails": {}
    }
}


{"_id":"57334f89b26eb71900f89ca7","__v":0,"api":{"auth":"required","examples":{"codes":[{"name":"cURL - TextBlock Page Element","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_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Elf Owls, it's cold outside!\"\n        }\n    }\n}' \"https://api.sportngin.com/page_elements/312776211\""},{"name":"Ruby - TextBlock Page Element","language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/page_elements/312776211\")\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_element\\\":\\n    {\\n        \\\"layout_column_id\\\": 26627518,\\n        \\\"page_element_type\\\": \\\"TextBlock\\\",\\n        \\\"element\\\":\\n        {\\n            \\\"content\\\": \\\"Come see the Snow Owls, it's cold outside!\\\"\\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    \\\"page_element\\\":\\n    {\\n        \\\"layout_column_id\\\": 26627518,\\n        \\\"page_element_type\\\": \\\"TextBlock\\\",\\n        \\\"element\\\":\\n        {\\n            \\\"content\\\": \\\"Come see the Snow Owls, it's cold outside!\\\"\\n        }\\n    }\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/page_elements/312776211\")\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();","name":"Java - TextBlock Page Element"}]},"method":"post","params":[{"required":true,"desc":"Id of the element to update","default":"","type":"int","name":"id","in":"path","_id":"56f420023d35720e00ba97de","ref":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 312776211,\n    \"element_type\": \"TextBlock\",\n    \"element_id\": 5859973,\n    \"position\": 1,\n    \"updated_on\": \"2016-04-28T10:05:45-07:00\",\n    \"created_on\": \"2016-04-28T10:05:45-07:00\",\n    \"element_locked\": false,\n    \"content_locked\": false,\n    \"layout_column_id\": 26627518,\n    \"mirror_enabled\": null,\n    \"custom_css_class\": null,\n    \"question_element_dependency_type\": \"any\",\n    \"element\": {\n        \"id\": 5859973,\n        \"subtitle\": null,\n        \"content\": \"Come see the Elf Owls, it's cold outside!\",\n        \"updated_on\": \"2016-04-28T10:14:29-07:00\",\n        \"created_on\": \"2016-04-28T10:05:45-07:00\",\n        \"display_size\": null,\n        \"alignment\": null,\n        \"url\": null,\n        \"protocol\": null,\n        \"has_url\": false,\n        \"action\": null,\n        \"image_id\": null,\n        \"created_without_fck\": false,\n        \"subtitle_alignment\": \"left\",\n        \"cutline\": null,\n        \"thumbnails\": {}\n    }\n}","name":""}]},"settings":"","url":"/page_elements/:id"},"category":"57334f89b26eb71900f89bcf","editedParams2":true,"excerpt":"The Update method accepts a single Page Element (see attributes above) and updates the matching record in Sport Ngin.  This method requires `page_element` and `element`.\n\n###Parameters","project":"57334f89b26eb71900f89b9f","slug":"page-elements-update","title":"Page Elements Update","updates":[],"user":"56e71f9edee212320019e731","body":"","editedParams":true,"hidden":false,"sync_unique":"","version":"57334f89b26eb71900f89ba0","createdAt":"2016-03-24T17:12:34.042Z","githubsync":"","link_url":"","order":10,"isReference":true,"link_external":false,"parentDoc":null,"type":"post","childrenPages":[]}

postPage Elements Update

The Update method accepts a single Page Element (see attributes above) and updates the matching record in Sport Ngin. This method requires `page_element` and `element`. ###Parameters

Path Params

id:
required
integer
Id of the element to update

Definition

{{ api_url }}{{ page_api_url }}

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_element":
    {
        "layout_column_id": 26627518,
        "page_element_type": "TextBlock",
        "element":
        {
            "content": "Come see the Elf Owls, it's cold outside!"
        }
    }
}' "https://api.sportngin.com/page_elements/312776211"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/page_elements/312776211")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n    \"page_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Snow Owls, it's cold outside!\"\n        }\n    }\n}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"page_element\":\n    {\n        \"layout_column_id\": 26627518,\n        \"page_element_type\": \"TextBlock\",\n        \"element\":\n        {\n            \"content\": \"Come see the Snow Owls, it's cold outside!\"\n        }\n    }\n}");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/page_elements/312776211")
  .put(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 312776211,
    "element_type": "TextBlock",
    "element_id": 5859973,
    "position": 1,
    "updated_on": "2016-04-28T10:05:45-07:00",
    "created_on": "2016-04-28T10:05:45-07:00",
    "element_locked": false,
    "content_locked": false,
    "layout_column_id": 26627518,
    "mirror_enabled": null,
    "custom_css_class": null,
    "question_element_dependency_type": "any",
    "element": {
        "id": 5859973,
        "subtitle": null,
        "content": "Come see the Elf Owls, it's cold outside!",
        "updated_on": "2016-04-28T10:14:29-07:00",
        "created_on": "2016-04-28T10:05:45-07:00",
        "display_size": null,
        "alignment": null,
        "url": null,
        "protocol": null,
        "has_url": false,
        "action": null,
        "image_id": null,
        "created_without_fck": false,
        "subtitle_alignment": "left",
        "cutline": null,
        "thumbnails": {}
    }
}


{"_id":"57334f89b26eb71900f89ca8","editedParams2":true,"link_external":false,"parentDoc":null,"sync_unique":"","version":"57334f89b26eb71900f89ba0","__v":0,"body":"","editedParams":true,"link_url":"","api":{"params":[{"name":"id","in":"path","_id":"56f4207e54c3ff2000533fc0","ref":"","required":true,"desc":"Id of the page_element to be deleted","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 312802931,\n    \"element_type\": \"TextBlock\",\n    \"element_id\": 5860514,\n    \"position\": 1,\n    \"updated_on\": \"2016-04-28T11:14:29-07:00\",\n    \"created_on\": \"2016-04-28T11:14:29-07:00\",\n    \"element_locked\": false,\n    \"content_locked\": false,\n    \"layout_column_id\": 26627518,\n    \"mirror_enabled\": null,\n    \"custom_css_class\": null,\n    \"question_element_dependency_type\": \"any\",\n    \"element\": {\n        \"id\": 5860514,\n        \"subtitle\": null,\n        \"content\": \"This will be deleted.\",\n        \"updated_on\": \"2016-04-28T11:14:29-07:00\",\n        \"created_on\": \"2016-04-28T11:14:29-07:00\",\n        \"display_size\": null,\n        \"alignment\": null,\n        \"url\": null,\n        \"protocol\": null,\n        \"has_url\": false,\n        \"action\": null,\n        \"image_id\": null,\n        \"created_without_fck\": false,\n        \"subtitle_alignment\": \"left\",\n        \"cutline\": null,\n        \"thumbnails\": {}\n    }\n}","name":""}]},"settings":"","url":"/page_elements/: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/page_elements/312802931\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/page_elements/312802931\")\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/page_elements/312802931\")\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"},"createdAt":"2016-03-24T17:14:38.426Z","hidden":false,"isReference":true,"order":11,"project":"57334f89b26eb71900f89b9f","slug":"page-elements-delete","title":"Page Elements Delete","category":"57334f89b26eb71900f89bcf","excerpt":"The Delete method permanently deletes the matching Page Element record in Sport Ngin.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","githubsync":"","type":"delete","updates":[],"user":"56e71f9edee212320019e731","childrenPages":[]}

deletePage Elements Delete

The Delete method permanently deletes the matching Page Element record in Sport Ngin. *This method takes action upon initial invocation and cannot be reversed.* ###Parameters

Path Params

id:
required
integer
Id of the page_element to be deleted

Definition

{{ api_url }}{{ page_api_url }}

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/page_elements/312802931"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/page_elements/312802931")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/page_elements/312802931")
  .delete(null)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 312802931,
    "element_type": "TextBlock",
    "element_id": 5860514,
    "position": 1,
    "updated_on": "2016-04-28T11:14:29-07:00",
    "created_on": "2016-04-28T11:14:29-07:00",
    "element_locked": false,
    "content_locked": false,
    "layout_column_id": 26627518,
    "mirror_enabled": null,
    "custom_css_class": null,
    "question_element_dependency_type": "any",
    "element": {
        "id": 5860514,
        "subtitle": null,
        "content": "This will be deleted.",
        "updated_on": "2016-04-28T11:14:29-07:00",
        "created_on": "2016-04-28T11:14:29-07:00",
        "display_size": null,
        "alignment": null,
        "url": null,
        "protocol": null,
        "has_url": false,
        "action": null,
        "image_id": null,
        "created_without_fck": false,
        "subtitle_alignment": "left",
        "cutline": null,
        "thumbnails": {}
    }
}


{"_id":"57334f89b26eb71900f89cbd","excerpt":"The Move method _moves_ the Page Element into the specified [Content Node](https://sportnginsite.readme.io/docs/content-node).\n\n###Parameters","githubsync":"","isReference":true,"updates":[],"version":"57334f89b26eb71900f89ba0","api":{"settings":"","url":"/page_elements/:id/move","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    \"layout_column_id\": 26627516\n}\n' \"https://api.sportngin.com/page_elements/312776211/move?site_id=11953\""},{"language":"java","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/page_elements/312776211/move?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::Put.new(url)\nrequest[\"authorization\"] = 'Bearer ACCESS_TOKEN'\nrequest[\"accept\"] = 'application/json'\nrequest[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest[\"cache-control\"] = 'no-cache'\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    \\\"layout_column_id\\\": 26627516\\n}\\n\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/page_elements/312776211/move?site_id=11953\")\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":"post","params":[{"name":"id","in":"path","_id":"56f420e754c3ff2000533fc4","ref":"","required":true,"desc":"Id of the page_element to be moved","default":"","type":"int"},{"desc":"Id of the site where the page_element resides","default":"","type":"int","name":"site_id","in":"body","_id":"57238b4d4f7eaa0e00ea9162","ref":"","required":true},{"name":"layout_column_id","in":"body","_id":"5722fd44b1f99d0e00086968","ref":"","required":true,"desc":"Id of the layout_column to move the page_element to","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"layout_container\": \"{\\\"id\\\":312776211,\\\"element_type\\\":\\\"TextBlock\\\",\\\"element_id\\\":5806327,\\\"position\\\":4,\\\"updated_on\\\":\\\"2016-04-29T08:30:05-07:00\\\",\\\"created_on\\\":\\\"2016-04-29T08:29:07-07:00\\\",\\\"element_locked\\\":false,\\\"content_locked\\\":false,\\\"layout_column_id\\\":26627516,\\\"mirror_enabled\\\":null,\\\"custom_css_class\\\":null,\\\"question_element_dependency_type\\\":\\\"any\\\",\\\"element\\\":{\\\"id\\\":5806327,\\\"subtitle\\\":null,\\\"content\\\":\\\"Come see the Elf Owls...they hdiijdie!\\\",\\\"updated_on\\\":\\\"2016-04-29T08:29:07-07:00\\\",\\\"created_on\\\":\\\"2016-04-29T08:29:07-07:00\\\",\\\"display_size\\\":null,\\\"alignment\\\":null,\\\"url\\\":null,\\\"protocol\\\":null,\\\"has_url\\\":false,\\\"action\\\":null,\\\"image_id\\\":null,\\\"created_without_fck\\\":false,\\\"subtitle_alignment\\\":\\\"left\\\",\\\"cutline\\\":null,\\\"thumbnails\\\":{}}}\"\n}","name":""}]}},"category":"57334f89b26eb71900f89bcf","editedParams":true,"parentDoc":null,"sync_unique":"","__v":0,"slug":"page-elements-move","link_external":false,"link_url":"","order":12,"body":"","createdAt":"2016-03-24T17:16:23.929Z","editedParams2":true,"hidden":false,"project":"57334f89b26eb71900f89b9f","title":"Page Elements Move","type":"post","user":"56e71f9edee212320019e731","childrenPages":[]}

postPage Elements Move

The Move method _moves_ the Page Element into the specified [Content Node](https://sportnginsite.readme.io/docs/content-node). ###Parameters

Path Params

id:
required
integer
Id of the page_element to be moved

Body Params

site_id:
required
integer
Id of the site where the page_element resides
layout_column_id:
required
integer
Id of the layout_column to move the page_element to

Definition

{{ api_url }}{{ page_api_url }}

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 '{
    "layout_column_id": 26627516
}
' "https://api.sportngin.com/page_elements/312776211/move?site_id=11953"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/page_elements/312776211/move?site_id=11953")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request["cache-control"] = 'no-cache'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"layout_column_id\": 26627516\n}\n");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/page_elements/312776211/move?site_id=11953")
  .put(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "layout_container": "{\"id\":312776211,\"element_type\":\"TextBlock\",\"element_id\":5806327,\"position\":4,\"updated_on\":\"2016-04-29T08:30:05-07:00\",\"created_on\":\"2016-04-29T08:29:07-07:00\",\"element_locked\":false,\"content_locked\":false,\"layout_column_id\":26627516,\"mirror_enabled\":null,\"custom_css_class\":null,\"question_element_dependency_type\":\"any\",\"element\":{\"id\":5806327,\"subtitle\":null,\"content\":\"Come see the Elf Owls...they hdiijdie!\",\"updated_on\":\"2016-04-29T08:29:07-07:00\",\"created_on\":\"2016-04-29T08:29:07-07:00\",\"display_size\":null,\"alignment\":null,\"url\":null,\"protocol\":null,\"has_url\":false,\"action\":null,\"image_id\":null,\"created_without_fck\":false,\"subtitle_alignment\":\"left\",\"cutline\":null,\"thumbnails\":{}}}"
}


{"_id":"57334f89b26eb71900f89cc3","__v":1,"createdAt":"2016-05-03T18:29:23.473Z","excerpt":"A Page represents a container for content to be housed on the site. Each Page has at least one `LayoutContainer`.\n\n###Associations\nA Page belongs to a [Site](https://sportnginsite.readme.io/docs/sites). A Page holds at least one [LayoutContainer](https://sportnginsite.readme.io/docs/layout-containers-create), which contains at least one `LayoutColumn`.","hidden":false,"slug":"pages","sync_unique":"","title":"Pages","isReference":true,"order":17,"project":"57334f89b26eb71900f89b9f","updates":[],"version":"57334f89b26eb71900f89ba0","githubsync":"","link_external":false,"type":"basic","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]}},"body":"","category":"57334f89b26eb71900f89bcf","link_url":"","parentDoc":null,"user":"56548c568975c70d002ea4b4","childrenPages":[]}

Pages

A Page represents a container for content to be housed on the site. Each Page has at least one `LayoutContainer`. ###Associations A Page belongs to a [Site](https://sportnginsite.readme.io/docs/sites). A Page holds at least one [LayoutContainer](https://sportnginsite.readme.io/docs/layout-containers-create), which contains at least one `LayoutColumn`.

{"_id":"57334f89b26eb71900f89cc2","__v":0,"isReference":true,"type":"post","api":{"url":"/pages","auth":"required","examples":{"codes":[{"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    \"site_id\": 11953,\n    \"button_title\": \"Page Create\",\n    \"page_title\": \"API Page Creation!!\",\n    \"parent_id\": 2394451,\n    \"display_status\": \"public\",\n    \"layout_template\": \"two_panel\"\n}' \"https://api.sportngin.com/pages\"","language":"curl"},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/pages\")\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    \\\"site_id\\\": 11953,\\n    \\\"button_title\\\": \\\"Page Create\\\",\\n    \\\"page_title\\\": \\\"API Page Creation!!\\\",\\n    \\\"parent_id\\\": 2394451,\\n    \\\"display_status\\\": \\\"public\\\",\\n    \\\"layout_template\\\": \\\"two_panel\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"site_id\\\": 11953,\\n    \\\"button_title\\\": \\\"Page Create\\\",\\n    \\\"page_title\\\": \\\"API Page Creation!!\\\",\\n    \\\"parent_id\\\": 2394451,\\n    \\\"display_status\\\": \\\"public\\\",\\n    \\\"layout_template\\\": \\\"two_panel\\\"\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/pages\")\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":[{"type":"int","name":"site_id","in":"body","_id":"5728b7ce219c1619008da163","ref":"","required":true,"desc":"ID of the site the page will be built on","default":""},{"required":true,"desc":"Name to be displayed on page","default":"","type":"string","name":"page_title","in":"body","_id":"5728bc1051a8c90e00bdb7bb","ref":""},{"desc":"Name to display on buttons leading to page","default":"","type":"string","name":"button_title","in":"body","_id":"5728bc1051a8c90e00bdb7ba","ref":"","required":true},{"ref":"","required":false,"desc":"ID of the parent page_node if applicable","default":"","type":"int","name":"parent_id","in":"body","_id":"5728bc1051a8c90e00bdb7bc"},{"type":"string","name":"extended_button_title","in":"body","_id":"5728bc1051a8c90e00bdb7b9","ref":"","required":false,"desc":"Name displayed in site tree when managing permissions","default":""},{"required":false,"desc":"Status of page (disabled, private, public)","default":"","type":"string","name":"display_status","in":"body","_id":"5728bc1051a8c90e00bdb7b7","ref":""},{"default":"","type":"string","name":"layout_template","in":"body","_id":"5728bc1051a8c90e00bdb7b6","ref":"","required":false,"desc":"Layout of page (one_panel, two_panel, three_panel)"}],"results":{"codes":[{"code":"{\n    \"id\": 2574267,\n    \"site_id\": 11953,\n    \"content_node_id\": 21223221,\n    \"lft\": 23,\n    \"rgt\": 24,\n    \"parent_id\": 2394451,\n    \"button_title\": \"Page Create\",\n    \"page_title\": \"API Page Creation!!\",\n    \"display_status\": \"public\",\n    \"updated_on\": \"2016-05-03T11:20:33-07:00\",\n    \"created_on\": \"2016-05-03T11:20:33-07:00\",\n    \"in_trash\": false,\n    \"css_id\": null,\n    \"node_type\": \"Page\",\n    \"node_id\": 681422,\n    \"has_events\": false,\n    \"has_news\": false,\n    \"extended_button_title\": \"API Page Creation!!\",\n    \"header_code\": null,\n    \"image_id\": null,\n    \"cascade_header_code\": null,\n    \"layout_template\": \"two_panel\",\n    \"page_element_lock_for_edit_access\": null,\n    \"uses_sport_header\": false,\n    \"cache_timeout\": 7200,\n    \"ads_doubleclick_zone_id\": null,\n    \"friendly_name\": \"api-test-page\",\n    \"deleted_tree_id\": null\n}","language":"json","status":200,"name":""}]},"settings":""},"editedParams2":true,"excerpt":"The Create method accepts a single Page and creates a new record in Sport Ngin.  The Page will be created on the specified [Site](https://sportnginsite.readme.io/docs/sites) under a Parent Page if specified.\n\n###Parameters","githubsync":"","hidden":false,"link_external":false,"sync_unique":"","editedParams":true,"parentDoc":null,"slug":"pages-create","title":"Pages Create","version":"57334f89b26eb71900f89ba0","body":"","category":"57334f89b26eb71900f89bcf","createdAt":"2016-05-03T14:38:06.971Z","link_url":"","order":18,"project":"57334f89b26eb71900f89b9f","updates":[],"user":"56548c568975c70d002ea4b4","childrenPages":[]}

postPages Create

The Create method accepts a single Page and creates a new record in Sport Ngin. The Page will be created on the specified [Site](https://sportnginsite.readme.io/docs/sites) under a Parent Page if specified. ###Parameters

Body Params

site_id:
required
integer
ID of the site the page will be built on
page_title:
required
string
Name to be displayed on page
button_title:
required
string
Name to display on buttons leading to page
parent_id:
integer
ID of the parent page_node if applicable
extended_button_title:
string
Name displayed in site tree when managing permissions
display_status:
string
Status of page (disabled, private, public)
layout_template:
string
Layout of page (one_panel, two_panel, three_panel)

Definition

{{ api_url }}{{ page_api_url }}

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 '{
    "site_id": 11953,
    "button_title": "Page Create",
    "page_title": "API Page Creation!!",
    "parent_id": 2394451,
    "display_status": "public",
    "layout_template": "two_panel"
}' "https://api.sportngin.com/pages"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/pages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n    \"site_id\": 11953,\n    \"button_title\": \"Page Create\",\n    \"page_title\": \"API Page Creation!!\",\n    \"parent_id\": 2394451,\n    \"display_status\": \"public\",\n    \"layout_template\": \"two_panel\"\n}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"site_id\": 11953,\n    \"button_title\": \"Page Create\",\n    \"page_title\": \"API Page Creation!!\",\n    \"parent_id\": 2394451,\n    \"display_status\": \"public\",\n    \"layout_template\": \"two_panel\"\n}");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/pages")
  .post(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 2574267,
    "site_id": 11953,
    "content_node_id": 21223221,
    "lft": 23,
    "rgt": 24,
    "parent_id": 2394451,
    "button_title": "Page Create",
    "page_title": "API Page Creation!!",
    "display_status": "public",
    "updated_on": "2016-05-03T11:20:33-07:00",
    "created_on": "2016-05-03T11:20:33-07:00",
    "in_trash": false,
    "css_id": null,
    "node_type": "Page",
    "node_id": 681422,
    "has_events": false,
    "has_news": false,
    "extended_button_title": "API Page Creation!!",
    "header_code": null,
    "image_id": null,
    "cascade_header_code": null,
    "layout_template": "two_panel",
    "page_element_lock_for_edit_access": null,
    "uses_sport_header": false,
    "cache_timeout": 7200,
    "ads_doubleclick_zone_id": null,
    "friendly_name": "api-test-page",
    "deleted_tree_id": null
}


{"_id":"57334f89b26eb71900f89cb7","excerpt":"A News Article is primarily composed indirectly of [Page Elements](https://sportnginsite.readme.io/docs/page-elements) such as [Photos](https://sportnginsite.readme.io/docs/photo).\n\nA News Article can also belong to a [Game](ref:games-show) which is achieved using the [Games News Articles Create](https://sportnginsite.readme.io/docs/games-news-articles-create) endpoint.\n\n###Associations\nA News Article has one [Content Nodes](https://sportnginsite.readme.io/docs/content-node), which has [Layout Containers](https://sportnginsite.readme.io/docs/layout-containers), which have [Layout Columns](https://sportnginsite.readme.io/docs/layout-column), which contain [Page Elements](https://sportnginsite.readme.io/docs/page-elements).","link_external":false,"type":"basic","updates":[],"sync_unique":"","title":"News Articles","version":"57334f89b26eb71900f89ba0","__v":1,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Hint\",\n  \"body\": \"On creation of a News Article, a [Content Node](https://sportnginsite.readme.io/docs/content-node), with one [Layout Container](https://sportnginsite.readme.io/docs/layout-containers-show) and one [Layout Column](https://sportnginsite.readme.io/docs/layout-column-create), is automatically created.\"\n}\n[/block]","link_url":"","user":"56cbf1419f4ae20b00644fde","category":"57334f89b26eb71900f89bd1","createdAt":"2016-04-03T16:45:33.963Z","isReference":true,"parentDoc":null,"project":"57334f89b26eb71900f89b9f","slug":"news-articles","githubsync":"","hidden":false,"order":0,"childrenPages":[]}

News Articles

A News Article is primarily composed indirectly of [Page Elements](https://sportnginsite.readme.io/docs/page-elements) such as [Photos](https://sportnginsite.readme.io/docs/photo). A News Article can also belong to a [Game](ref:games-show) which is achieved using the [Games News Articles Create](https://sportnginsite.readme.io/docs/games-news-articles-create) endpoint. ###Associations A News Article has one [Content Nodes](https://sportnginsite.readme.io/docs/content-node), which has [Layout Containers](https://sportnginsite.readme.io/docs/layout-containers), which have [Layout Columns](https://sportnginsite.readme.io/docs/layout-column), which contain [Page Elements](https://sportnginsite.readme.io/docs/page-elements).

Hint

On creation of a News Article, a Content Node, with one Layout Container and one Layout Column, is automatically created.

{"_id":"57334f89b26eb71900f89c84","sync_unique":"","title":"News Articles Index","type":"get","updates":[],"body":"","category":"57334f89b26eb71900f89bd1","editedParams":true,"link_external":false,"parentDoc":null,"slug":"news-articles-index","user":"56e71f9edee212320019e731","editedParams2":true,"excerpt":"The Index method returns an array of News Articles (including information about their placement in the page structure) matching the given parameters.\n\n###Parameters","githubsync":"","project":"57334f89b26eb71900f89b9f","version":"57334f89b26eb71900f89ba0","createdAt":"2016-03-22T21:33:50.979Z","isReference":true,"link_url":"","hidden":false,"order":1,"__v":0,"api":{"url":"/news_articles","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/news_articles?connections[team][]=1373611&includes=page_elements\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/news_articles?connections%5Bteam%5D%5B%5D=1373611&includes=page_elements\")\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/news_articles?connections%5Bteam%5D%5B%5D=1373611&includes=page_elements\")\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":"connections","in":"query","_id":"56f1ba3e9791b22d0077ba59","ref":"","required":true,"desc":""},{"in":"query","_id":"56f1ba3e9791b22d0077ba58","ref":"","required":false,"desc":"","default":"","type":"int","name":"page"},{"name":"limit","in":"query","_id":"56f1ba3e9791b22d0077ba57","ref":"","required":false,"desc":"","default":"","type":"int"},{"desc":"","default":"","type":"int","name":"page_elements","in":"query","_id":"56f1ba3e9791b22d0077ba56","ref":"","required":false}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"id\": 634672,\n        \"title\": \"Bears to Play Cyclists!!\",\n        \"teaser\": \"Don't Miss This One!!!\",\n        \"author\": \"Clark Kent\",\n        \"news_date\": \"2016-04-06T13:00:00-05:00\",\n        \"updated_on\": \"2016-04-08T09:31:23-07:00\",\n        \"created_on\": \"2016-04-08T09:04:54-07:00\",\n        \"image_id\": null,\n        \"content_node_id\": 20528244,\n        \"status\": \"published\",\n        \"preview_text\": null,\n        \"show_image_with_article\": true,\n        \"show_image_in_aggregator\": true,\n        \"show_preview_text_with_article\": true,\n        \"show_preview_text_in_aggregator\": true,\n        \"article_type\": \"ngin\",\n        \"news_expiration_date\": null,\n        \"content_node\": {\n            \"id\": 20528244,\n            \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n            \"created_on\": \"2016-04-08T09:04:54-07:00\",\n            \"resource_type\": \"NewsArticle\",\n            \"layout_containers\": [\n                {\n                    \"id\": 23018184,\n                    \"content_node_id\": 20528244,\n                    \"layout_type\": \"oneColumn\",\n                    \"locked\": false,\n                    \"position\": 1,\n                    \"created_at\": \"2016-04-08T09:04:54-07:00\",\n                    \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n                    \"custom_css_class\": null,\n                    \"mirror_target_id\": null,\n                    \"name\": null,\n                    \"layout_columns\": [\n                        {\n                            \"id\": 27998042,\n                            \"layout_container_id\": 23018184,\n                            \"position\": 1,\n                            \"page_elements\": []\n                        }\n                    ]\n                }\n            ]\n        },\n        \"comment_element\": {\n            \"id\": 289847569,\n            \"login_required\": false,\n            \"approval_required\": false,\n            \"created_at\": \"2016-04-08T09:04:54-07:00\",\n            \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n            \"title\": \"Comments\",\n            \"ascending_sort_order\": false,\n            \"site_id\": 11953,\n            \"enabled\": true,\n            \"source_id\": 634672,\n            \"source_type\": \"NewsArticle\",\n            \"comments\": []\n        },\n        \"url_string\": \"http://apidemo.sportngin.com/news_article/show/634672\",\n        \"thumbnails\": {},\n        \"sanitized_content\": \"\"\n    }\n]","name":""}]},"settings":""},"childrenPages":[]}

getNews Articles Index

The Index method returns an array of News Articles (including information about their placement in the page structure) matching the given parameters. ###Parameters

Query Params

connections:
required
integer
page:
integer
limit:
integer
page_elements:
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/news_articles?connections[team][]=1373611&includes=page_elements"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/news_articles?connections%5Bteam%5D%5B%5D=1373611&includes=page_elements")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/news_articles?connections%5Bteam%5D%5B%5D=1373611&includes=page_elements")
  .get()
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .build();

Response response = client.newCall(request).execute();

Result Format

[
    {
        "id": 634672,
        "title": "Bears to Play Cyclists!!",
        "teaser": "Don't Miss This One!!!",
        "author": "Clark Kent",
        "news_date": "2016-04-06T13:00:00-05:00",
        "updated_on": "2016-04-08T09:31:23-07:00",
        "created_on": "2016-04-08T09:04:54-07:00",
        "image_id": null,
        "content_node_id": 20528244,
        "status": "published",
        "preview_text": null,
        "show_image_with_article": true,
        "show_image_in_aggregator": true,
        "show_preview_text_with_article": true,
        "show_preview_text_in_aggregator": true,
        "article_type": "ngin",
        "news_expiration_date": null,
        "content_node": {
            "id": 20528244,
            "updated_on": "2016-04-08T09:04:54-07:00",
            "created_on": "2016-04-08T09:04:54-07:00",
            "resource_type": "NewsArticle",
            "layout_containers": [
                {
                    "id": 23018184,
                    "content_node_id": 20528244,
                    "layout_type": "oneColumn",
                    "locked": false,
                    "position": 1,
                    "created_at": "2016-04-08T09:04:54-07:00",
                    "updated_at": "2016-04-08T09:04:54-07:00",
                    "custom_css_class": null,
                    "mirror_target_id": null,
                    "name": null,
                    "layout_columns": [
                        {
                            "id": 27998042,
                            "layout_container_id": 23018184,
                            "position": 1,
                            "page_elements": []
                        }
                    ]
                }
            ]
        },
        "comment_element": {
            "id": 289847569,
            "login_required": false,
            "approval_required": false,
            "created_at": "2016-04-08T09:04:54-07:00",
            "updated_at": "2016-04-08T09:04:54-07:00",
            "title": "Comments",
            "ascending_sort_order": false,
            "site_id": 11953,
            "enabled": true,
            "source_id": 634672,
            "source_type": "NewsArticle",
            "comments": []
        },
        "url_string": "http://apidemo.sportngin.com/news_article/show/634672",
        "thumbnails": {},
        "sanitized_content": ""
    }
]


{"_id":"57334f89b26eb71900f89c18","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\": \"content_node_id\",\n    \"1-1\": \"Integer\",\n    \"1-2\": \"ID of content_node assigned by NGIN\",\n    \"2-0\": \"title\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Title of the news article. Max length is 300.\",\n    \"3-0\": \"author\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Author of the news article. Max Length 100.\",\n    \"4-0\": \"news_date\",\n    \"4-1\": \"Datetime\",\n    \"4-2\": \"The date and time the article was published.\",\n    \"5-0\": \"status\",\n    \"5-1\": \"enumerated string\",\n    \"5-2\": \"Possible values: \\\"draft\\\", \\\"published\\\". Defaults to \\\"draft\\\"\",\n    \"6-0\": \"teaser\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Very short description of news article. Max length is 300.\",\n    \"7-0\": \"preview_text\",\n    \"7-1\": \"Text\",\n    \"7-2\": \"Short description of news article that will show up on on the article and/or news aggregators depending on the values of show_preview_text_with_article and show_preview_text_in_aggregator. Max length is 30,000.\",\n    \"8-0\": \"show_image_with_article\",\n    \"8-1\": \"Boolean\",\n    \"8-2\": \"Defaults to true. If true then show the preview image with the article\",\n    \"9-0\": \"show_image_in_aggregator\",\n    \"9-1\": \"Boolean\",\n    \"9-2\": \"Defaults to true. If true then show the preview image in news aggregators\",\n    \"10-0\": \"show_preview_text_with_article\",\n    \"10-1\": \"Boolean\",\n    \"10-2\": \"Defaults to true. If true then show the preview_text with the article\",\n    \"11-0\": \"show_preview_text_in_aggregator\",\n    \"11-1\": \"Boolean\",\n    \"11-2\": \"Defaults to true. If true then show the preview_text in news aggregators\",\n    \"12-0\": \"page_node_ids\",\n    \"12-1\": \"String\",\n    \"12-2\": \"Comma separated list of page node ids (i.e. tag ids). Required when creating or updating\",\n    \"13-0\": \"created_on\",\n    \"13-1\": \"Datetime\",\n    \"14-1\": \"Datetime\",\n    \"13-2\": \"Read only\",\n    \"14-2\": \"Read only\",\n    \"14-0\": \"updated_on\",\n    \"15-0\": \"uploaded_data\",\n    \"15-1\": \"File\",\n    \"15-2\": \"Image data. Create or update requests only.\"\n  },\n  \"cols\": 3,\n  \"rows\": 16\n}\n[/block]","githubsync":"","order":2,"sync_unique":"","title":"News Articles Show","__v":1,"link_external":false,"parentDoc":null,"type":"get","version":"57334f89b26eb71900f89ba0","api":{"settings":"","url":"/news_articles/: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/news_articles/634672\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/news_articles/634672\")\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/news_articles/634672\")\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":[],"results":{"codes":[{"status":200,"name":"","code":"{\n    \"id\": 634672,\n    \"title\": \"Bears to Play Cyclists!!\",\n    \"teaser\": \"This is going to be one for the ages!!!\",\n    \"author\": \"Clark Kent\",\n    \"news_date\": \"2016-04-06T13:00:00-07:00\",\n    \"updated_on\": \"2016-04-08T09:04:55-07:00\",\n    \"created_on\": \"2016-04-08T09:04:54-07:00\",\n    \"image_id\": null,\n    \"content_node_id\": 20528244,\n    \"status\": \"published\",\n    \"preview_text\": null,\n    \"show_image_with_article\": true,\n    \"show_image_in_aggregator\": true,\n    \"show_preview_text_with_article\": true,\n    \"show_preview_text_in_aggregator\": true,\n    \"article_type\": \"ngin\",\n    \"news_expiration_date\": null,\n    \"content_node\": {\n        \"id\": 20528244,\n        \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n        \"created_on\": \"2016-04-08T09:04:54-07:00\",\n        \"resource_type\": \"NewsArticle\",\n        \"layout_containers\": [\n            {\n                \"id\": 23018184,\n                \"content_node_id\": 20528244,\n                \"layout_type\": \"oneColumn\",\n                \"locked\": false,\n                \"position\": 1,\n                \"created_at\": \"2016-04-08T09:04:54-07:00\",\n                \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n                \"custom_css_class\": null,\n                \"mirror_target_id\": null,\n                \"name\": null,\n                \"layout_columns\": [\n                    {\n                        \"id\": 27998042,\n                        \"layout_container_id\": 23018184,\n                        \"position\": 1,\n                        \"page_elements\": []\n                    }\n                ]\n            }\n        ]\n    },\n    \"comment_element\": {\n        \"id\": 289847569,\n        \"login_required\": false,\n        \"approval_required\": false,\n        \"created_at\": \"2016-04-08T09:04:54-07:00\",\n        \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n        \"title\": \"Comments\",\n        \"ascending_sort_order\": false,\n        \"site_id\": 11953,\n        \"enabled\": true,\n        \"source_id\": 634672,\n        \"source_type\": \"NewsArticle\",\n        \"comments\": []\n    },\n    \"url_string\": \"http://apidemo.sportngin.com/news_article/show/634672\",\n    \"thumbnails\": {},\n    \"sanitized_content\": \"\"\n}","language":"json"}]}},"createdAt":"2016-03-22T21:21:20.304Z","excerpt":"The Show method returns a single News Articles for a given `id`.  You may provide optional parameters `plain_text=true` and `basic_html=true`.","isReference":true,"slug":"news-articles-show","user":"56e71f9edee212320019e731","category":"57334f89b26eb71900f89bd1","hidden":false,"link_url":"","project":"57334f89b26eb71900f89b9f","updates":[],"childrenPages":[]}

getNews Articles Show

The Show method returns a single News Articles for a given `id`. You may provide optional parameters `plain_text=true` and `basic_html=true`.

Attributes

Attribute
Type
Notes

id

Integer

Unique id assigned by NGIN

content_node_id

Integer

ID of content_node assigned by NGIN

title

String

Title of the news article. Max length is 300.

author

String

Author of the news article. Max Length 100.

news_date

Datetime

The date and time the article was published.

status

enumerated string

Possible values: "draft", "published". Defaults to "draft"

teaser

String

Very short description of news article. Max length is 300.

preview_text

Text

Short description of news article that will show up on on the article and/or news aggregators depending on the values of show_preview_text_with_article and show_preview_text_in_aggregator. Max length is 30,000.

show_image_with_article

Boolean

Defaults to true. If true then show the preview image with the article

show_image_in_aggregator

Boolean

Defaults to true. If true then show the preview image in news aggregators

show_preview_text_with_article

Boolean

Defaults to true. If true then show the preview_text with the article

show_preview_text_in_aggregator

Boolean

Defaults to true. If true then show the preview_text in news aggregators

page_node_ids

String

Comma separated list of page node ids (i.e. tag ids). Required when creating or updating

created_on

Datetime

Read only

updated_on

Datetime

Read only

uploaded_data

File

Image data. Create or update requests only.

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X GET -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/news_articles/634672"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/news_articles/634672")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/news_articles/634672")
  .get()
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 634672,
    "title": "Bears to Play Cyclists!!",
    "teaser": "This is going to be one for the ages!!!",
    "author": "Clark Kent",
    "news_date": "2016-04-06T13:00:00-07:00",
    "updated_on": "2016-04-08T09:04:55-07:00",
    "created_on": "2016-04-08T09:04:54-07:00",
    "image_id": null,
    "content_node_id": 20528244,
    "status": "published",
    "preview_text": null,
    "show_image_with_article": true,
    "show_image_in_aggregator": true,
    "show_preview_text_with_article": true,
    "show_preview_text_in_aggregator": true,
    "article_type": "ngin",
    "news_expiration_date": null,
    "content_node": {
        "id": 20528244,
        "updated_on": "2016-04-08T09:04:54-07:00",
        "created_on": "2016-04-08T09:04:54-07:00",
        "resource_type": "NewsArticle",
        "layout_containers": [
            {
                "id": 23018184,
                "content_node_id": 20528244,
                "layout_type": "oneColumn",
                "locked": false,
                "position": 1,
                "created_at": "2016-04-08T09:04:54-07:00",
                "updated_at": "2016-04-08T09:04:54-07:00",
                "custom_css_class": null,
                "mirror_target_id": null,
                "name": null,
                "layout_columns": [
                    {
                        "id": 27998042,
                        "layout_container_id": 23018184,
                        "position": 1,
                        "page_elements": []
                    }
                ]
            }
        ]
    },
    "comment_element": {
        "id": 289847569,
        "login_required": false,
        "approval_required": false,
        "created_at": "2016-04-08T09:04:54-07:00",
        "updated_at": "2016-04-08T09:04:54-07:00",
        "title": "Comments",
        "ascending_sort_order": false,
        "site_id": 11953,
        "enabled": true,
        "source_id": 634672,
        "source_type": "NewsArticle",
        "comments": []
    },
    "url_string": "http://apidemo.sportngin.com/news_article/show/634672",
    "thumbnails": {},
    "sanitized_content": ""
}


{"_id":"57334f89b26eb71900f89c3f","order":3,"parentDoc":null,"updates":[],"githubsync":"","api":{"url":"/news_articles","auth":"required","examples":{"codes":[{"name":null,"language":"curl","code":"curl -X POST -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"news_article\": {\n        \"title\": \"Bears to Play Cyclists!!\",\n        \"teaser\": \"This is going to be one for the ages!!!\",\n        \"author\": \"Clark Kent\",\n        \"news_date\": \"2016-04-06T13:00:00\",\n        \"page_node_ids\": \"2458139,2458145\",\n        \"status\": \"published\"\n    }\n}\n        ' \"https://api.sportngin.com/news_articles\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/news_articles\")\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    \\\"news_article\\\": {\\n        \\\"title\\\": \\\"Bears to Play Cyclists!!\\\",\\n        \\\"teaser\\\": \\\"This is going to be one for the ages!!!\\\",\\n        \\\"author\\\": \\\"Clark Kent\\\",\\n        \\\"news_date\\\": \\\"2016-04-06T13:00:00\\\",\\n        \\\"page_node_ids\\\": \\\"2458139,2458145\\\",\\n        \\\"status\\\": \\\"published\\\"\\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    \\\"news_article\\\": {\\n        \\\"title\\\": \\\"Bears to Play Cyclists!!\\\",\\n        \\\"teaser\\\": \\\"This is going to be one for the ages!!!\\\",\\n        \\\"author\\\": \\\"Clark Kent\\\",\\n        \\\"news_date\\\": \\\"2016-04-06T13:00:00\\\",\\n        \\\"page_node_ids\\\": \\\"2458139,2458145\\\",\\n        \\\"status\\\": \\\"published\\\"\\n    }\\n}\\n        \");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/news_articles\")\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();"}]},"method":"post","params":[{"name":"title","_id":"56f1b3f93eb62a34003ea036","ref":"","in":"body","required":true,"desc":"Title of the news article. Max length is 300.","default":"","type":"string"},{"ref":"","in":"body","required":true,"desc":"Author of the news article. Max Length 100.","default":"","type":"string","name":"author","_id":"578fac0301bdba1900264756"},{"in":"body","required":true,"desc":"Comma separated list of page node ids (i.e. tag ids).","default":"","type":"string","name":"page_node_ids","_id":"578fac0301bdba1900264755","ref":""},{"required":true,"desc":"The date and time the article was published.","default":"","type":"datetime","name":"news_date","_id":"578fbf90dbb58b0e00bbe001","ref":"","in":"body"},{"type":"string","name":"status","_id":"578fac0301bdba1900264752","ref":"","in":"body","required":true,"desc":"Possible values: \"draft\", \"published\". Defaults to \"draft\"","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 634672,\n    \"title\": \"Bears to Play Cyclists!!\",\n    \"teaser\": \"This is going to be one for the ages!!!\",\n    \"author\": \"Clark Kent\",\n    \"news_date\": \"2016-04-06T13:00:00-07:00\",\n    \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n    \"created_on\": \"2016-04-08T09:04:54-07:00\",\n    \"image_id\": null,\n    \"content_node_id\": 20528244,\n    \"status\": \"published\",\n    \"preview_text\": null,\n    \"show_image_with_article\": true,\n    \"show_image_in_aggregator\": true,\n    \"show_preview_text_with_article\": true,\n    \"show_preview_text_in_aggregator\": true,\n    \"article_type\": \"ngin\",\n    \"news_expiration_date\": null,\n    \"content_node\": {\n        \"id\": 20528244,\n        \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n        \"created_on\": \"2016-04-08T09:04:54-07:00\",\n        \"resource_type\": \"NewsArticle\",\n        \"layout_containers\": [\n            {\n                \"id\": 23018184,\n                \"content_node_id\": 20528244,\n                \"layout_type\": \"oneColumn\",\n                \"locked\": false,\n                \"position\": 1,\n                \"created_at\": \"2016-04-08T09:04:54-07:00\",\n                \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n                \"custom_css_class\": null,\n                \"mirror_target_id\": null,\n                \"name\": null,\n                \"layout_columns\": [\n                    {\n                        \"id\": 27998042,\n                        \"layout_container_id\": 23018184,\n                        \"position\": 1,\n                        \"page_elements\": []\n                    }\n                ]\n            }\n        ]\n    },\n    \"comment_element\": {\n        \"id\": 289847569,\n        \"login_required\": false,\n        \"approval_required\": false,\n        \"created_at\": \"2016-04-08T09:04:54-07:00\",\n        \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n        \"title\": \"Comments\",\n        \"ascending_sort_order\": false,\n        \"site_id\": 11953,\n        \"enabled\": true,\n        \"source_id\": 634672,\n        \"source_type\": \"NewsArticle\",\n        \"comments\": []\n    },\n    \"url_string\": \"http://apidemo.sportngin.com/news_article/show/634672\",\n    \"thumbnails\": {},\n    \"sanitized_content\": \"\"\n}","name":""}]},"settings":""},"category":"57334f89b26eb71900f89bd1","createdAt":"2016-03-22T21:07:05.551Z","slug":"news-articles-create","__v":3,"hidden":false,"link_external":false,"sync_unique":"","title":"News Articles Create","type":"post","user":"56e71f9edee212320019e731","editedParams2":true,"editedParams":true,"excerpt":"The Create method accepts a single News Article and creates a new record in Sport Ngin.  A News Article can be created using a template by passing an optional `template_id` parameter.  An image can be included by passing an optional `uploaded_data` parameter with the value pointing to the location where the image is stored.\n\n###Parameters","isReference":true,"link_url":"","project":"57334f89b26eb71900f89b9f","version":"57334f89b26eb71900f89ba0","body":"","childrenPages":[]}

postNews Articles Create

The Create method accepts a single News Article and creates a new record in Sport Ngin. A News Article can be created using a template by passing an optional `template_id` parameter. An image can be included by passing an optional `uploaded_data` parameter with the value pointing to the location where the image is stored. ###Parameters

Body Params

title:
required
string
Title of the news article. Max length is 300.
author:
required
string
Author of the news article. Max Length 100.
page_node_ids:
required
string
Comma separated list of page node ids (i.e. tag ids).
news_date:
required
datetime
The date and time the article was published.
status:
required
string
Possible values: "draft", "published". Defaults to "draft"

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
    "news_article": {
        "title": "Bears to Play Cyclists!!",
        "teaser": "This is going to be one for the ages!!!",
        "author": "Clark Kent",
        "news_date": "2016-04-06T13:00:00",
        "page_node_ids": "2458139,2458145",
        "status": "published"
    }
}
        ' "https://api.sportngin.com/news_articles"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/news_articles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n    \"news_article\": {\n        \"title\": \"Bears to Play Cyclists!!\",\n        \"teaser\": \"This is going to be one for the ages!!!\",\n        \"author\": \"Clark Kent\",\n        \"news_date\": \"2016-04-06T13:00:00\",\n        \"page_node_ids\": \"2458139,2458145\",\n        \"status\": \"published\"\n    }\n}\n        "

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"news_article\": {\n        \"title\": \"Bears to Play Cyclists!!\",\n        \"teaser\": \"This is going to be one for the ages!!!\",\n        \"author\": \"Clark Kent\",\n        \"news_date\": \"2016-04-06T13:00:00\",\n        \"page_node_ids\": \"2458139,2458145\",\n        \"status\": \"published\"\n    }\n}\n        ");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/news_articles")
  .post(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 634672,
    "title": "Bears to Play Cyclists!!",
    "teaser": "This is going to be one for the ages!!!",
    "author": "Clark Kent",
    "news_date": "2016-04-06T13:00:00-07:00",
    "updated_on": "2016-04-08T09:04:54-07:00",
    "created_on": "2016-04-08T09:04:54-07:00",
    "image_id": null,
    "content_node_id": 20528244,
    "status": "published",
    "preview_text": null,
    "show_image_with_article": true,
    "show_image_in_aggregator": true,
    "show_preview_text_with_article": true,
    "show_preview_text_in_aggregator": true,
    "article_type": "ngin",
    "news_expiration_date": null,
    "content_node": {
        "id": 20528244,
        "updated_on": "2016-04-08T09:04:54-07:00",
        "created_on": "2016-04-08T09:04:54-07:00",
        "resource_type": "NewsArticle",
        "layout_containers": [
            {
                "id": 23018184,
                "content_node_id": 20528244,
                "layout_type": "oneColumn",
                "locked": false,
                "position": 1,
                "created_at": "2016-04-08T09:04:54-07:00",
                "updated_at": "2016-04-08T09:04:54-07:00",
                "custom_css_class": null,
                "mirror_target_id": null,
                "name": null,
                "layout_columns": [
                    {
                        "id": 27998042,
                        "layout_container_id": 23018184,
                        "position": 1,
                        "page_elements": []
                    }
                ]
            }
        ]
    },
    "comment_element": {
        "id": 289847569,
        "login_required": false,
        "approval_required": false,
        "created_at": "2016-04-08T09:04:54-07:00",
        "updated_at": "2016-04-08T09:04:54-07:00",
        "title": "Comments",
        "ascending_sort_order": false,
        "site_id": 11953,
        "enabled": true,
        "source_id": 634672,
        "source_type": "NewsArticle",
        "comments": []
    },
    "url_string": "http://apidemo.sportngin.com/news_article/show/634672",
    "thumbnails": {},
    "sanitized_content": ""
}


{"_id":"57334f89b26eb71900f89c75","__v":0,"updates":[],"hidden":false,"link_external":false,"link_url":"","order":4,"slug":"news-articles-update","sync_unique":"","category":"57334f89b26eb71900f89bd1","editedParams2":true,"user":"56e71f9edee212320019e731","version":"57334f89b26eb71900f89ba0","project":"57334f89b26eb71900f89b9f","title":"News Articles Update","type":"post","githubsync":"","createdAt":"2016-03-22T20:29:51.541Z","editedParams":true,"excerpt":"The Update method accepts a single News Article (see attributes above) and updates the matching record in Sport Ngin.\n\n###Parameters","isReference":true,"parentDoc":null,"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" -H \"Content-Type: application/json\" -d '{\n    \"news_article\": {\n        \"teaser\": \"Don't Miss This One!!!\",\n        \"page_node_ids\": \"2458139,2458145\"\n    }\n}\n        ' \"https://api.sportngin.com/news_articles/634672\""},{"code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/news_articles/634672\")\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[\"ngin-api-version\"] = '0.1'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"news_article\\\": {\\n        \\\"teaser\\\": \\\"Don't Miss This One!!!\\\",\\n        \\\"page_node_ids\\\": \\\"2458139,2458145\\\"\\n    }\\n}\\n        \"\n\nresponse = http.request(request)\nputs response.read_body","language":"ruby"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"news_article\\\": {\\n        \\\"teaser\\\": \\\"Don't Miss This One!!!\\\",\\n        \\\"page_node_ids\\\": \\\"2458139,2458145\\\"\\n    }\\n}\\n        \");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/news_articles/634672\")\n  .put(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();"}]},"method":"post","params":[{"ref":"","required":true,"type":"string","_id":"56f1ab3f3eb62a34003ea026","default":"","desc":"Comma separated list of page node ids (i.e. tag ids).","in":"path","name":"page_node_ids"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 634672,\n    \"title\": \"Bears to Play Cyclists!!\",\n    \"teaser\": \"Don't Miss This One!!!\",\n    \"author\": \"Clark Kent\",\n    \"news_date\": \"2016-04-06T13:00:00-07:00\",\n    \"updated_on\": \"2016-04-08T09:31:23-07:00\",\n    \"created_on\": \"2016-04-08T09:04:54-07:00\",\n    \"image_id\": null,\n    \"content_node_id\": 20528244,\n    \"status\": \"published\",\n    \"preview_text\": null,\n    \"show_image_with_article\": true,\n    \"show_image_in_aggregator\": true,\n    \"show_preview_text_with_article\": true,\n    \"show_preview_text_in_aggregator\": true,\n    \"article_type\": \"ngin\",\n    \"news_expiration_date\": null,\n    \"content_node\": {\n        \"id\": 20528244,\n        \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n        \"created_on\": \"2016-04-08T09:04:54-07:00\",\n        \"resource_type\": \"NewsArticle\",\n        \"layout_containers\": [\n            {\n                \"id\": 23018184,\n                \"content_node_id\": 20528244,\n                \"layout_type\": \"oneColumn\",\n                \"locked\": false,\n                \"position\": 1,\n                \"created_at\": \"2016-04-08T09:04:54-07:00\",\n                \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n                \"custom_css_class\": null,\n                \"mirror_target_id\": null,\n                \"name\": null,\n                \"layout_columns\": [\n                    {\n                        \"id\": 27998042,\n                        \"layout_container_id\": 23018184,\n                        \"position\": 1,\n                        \"page_elements\": []\n                    }\n                ]\n            }\n        ]\n    },\n    \"comment_element\": {\n        \"id\": 289847569,\n        \"login_required\": false,\n        \"approval_required\": false,\n        \"created_at\": \"2016-04-08T09:04:54-07:00\",\n        \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n        \"title\": \"Comments\",\n        \"ascending_sort_order\": false,\n        \"site_id\": 11953,\n        \"enabled\": true,\n        \"source_id\": 634672,\n        \"source_type\": \"NewsArticle\",\n        \"comments\": []\n    },\n    \"url_string\": \"http://apidemo.sportngin.com/news_article/show/634672\",\n    \"thumbnails\": {},\n    \"sanitized_content\": \"\"\n}","name":""}]},"settings":"","url":"/news_articles/:id"},"body":"","childrenPages":[]}

postNews Articles Update

The Update method accepts a single News Article (see attributes above) and updates the matching record in Sport Ngin. ###Parameters

Path Params

page_node_ids:
required
string
Comma separated list of page node ids (i.e. tag ids).

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X PUT -H "Authorization: Bearer ACCESS_TOKEN" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: application/json" -d '{
    "news_article": {
        "teaser": "Don't Miss This One!!!",
        "page_node_ids": "2458139,2458145"
    }
}
        ' "https://api.sportngin.com/news_articles/634672"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/news_articles/634672")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'application/json'
request.body = "{\n    \"news_article\": {\n        \"teaser\": \"Don't Miss This One!!!\",\n        \"page_node_ids\": \"2458139,2458145\"\n    }\n}\n        "

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"news_article\": {\n        \"teaser\": \"Don't Miss This One!!!\",\n        \"page_node_ids\": \"2458139,2458145\"\n    }\n}\n        ");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/news_articles/634672")
  .put(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 634672,
    "title": "Bears to Play Cyclists!!",
    "teaser": "Don't Miss This One!!!",
    "author": "Clark Kent",
    "news_date": "2016-04-06T13:00:00-07:00",
    "updated_on": "2016-04-08T09:31:23-07:00",
    "created_on": "2016-04-08T09:04:54-07:00",
    "image_id": null,
    "content_node_id": 20528244,
    "status": "published",
    "preview_text": null,
    "show_image_with_article": true,
    "show_image_in_aggregator": true,
    "show_preview_text_with_article": true,
    "show_preview_text_in_aggregator": true,
    "article_type": "ngin",
    "news_expiration_date": null,
    "content_node": {
        "id": 20528244,
        "updated_on": "2016-04-08T09:04:54-07:00",
        "created_on": "2016-04-08T09:04:54-07:00",
        "resource_type": "NewsArticle",
        "layout_containers": [
            {
                "id": 23018184,
                "content_node_id": 20528244,
                "layout_type": "oneColumn",
                "locked": false,
                "position": 1,
                "created_at": "2016-04-08T09:04:54-07:00",
                "updated_at": "2016-04-08T09:04:54-07:00",
                "custom_css_class": null,
                "mirror_target_id": null,
                "name": null,
                "layout_columns": [
                    {
                        "id": 27998042,
                        "layout_container_id": 23018184,
                        "position": 1,
                        "page_elements": []
                    }
                ]
            }
        ]
    },
    "comment_element": {
        "id": 289847569,
        "login_required": false,
        "approval_required": false,
        "created_at": "2016-04-08T09:04:54-07:00",
        "updated_at": "2016-04-08T09:04:54-07:00",
        "title": "Comments",
        "ascending_sort_order": false,
        "site_id": 11953,
        "enabled": true,
        "source_id": 634672,
        "source_type": "NewsArticle",
        "comments": []
    },
    "url_string": "http://apidemo.sportngin.com/news_article/show/634672",
    "thumbnails": {},
    "sanitized_content": ""
}


{"_id":"57334f89b26eb71900f89c76","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 634672,\n    \"title\": \"Bears to Play Cyclists!!\",\n    \"teaser\": \"This is going to be one for the ages!!!\",\n    \"author\": \"Clark Kent\",\n    \"news_date\": \"2016-04-06T13:00:00-07:00\",\n    \"updated_on\": \"2016-04-08T09:04:55-07:00\",\n    \"created_on\": \"2016-04-08T09:04:54-07:00\",\n    \"image_id\": null,\n    \"content_node_id\": 20528244,\n    \"status\": \"published\",\n    \"preview_text\": null,\n    \"show_image_with_article\": true,\n    \"show_image_in_aggregator\": true,\n    \"show_preview_text_with_article\": true,\n    \"show_preview_text_in_aggregator\": true,\n    \"article_type\": \"ngin\",\n    \"news_expiration_date\": null,\n    \"content_node\": {\n        \"id\": 20528244,\n        \"updated_on\": \"2016-04-08T09:04:54-07:00\",\n        \"created_on\": \"2016-04-08T09:04:54-07:00\",\n        \"resource_type\": \"NewsArticle\",\n        \"layout_containers\": [\n            {\n                \"id\": 23018184,\n                \"content_node_id\": 20528244,\n                \"layout_type\": \"oneColumn\",\n                \"locked\": false,\n                \"position\": 1,\n                \"created_at\": \"2016-04-08T09:04:54-07:00\",\n                \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n                \"custom_css_class\": null,\n                \"mirror_target_id\": null,\n                \"name\": null,\n                \"layout_columns\": [\n                    {\n                        \"id\": 27998042,\n                        \"layout_container_id\": 23018184,\n                        \"position\": 1,\n                        \"page_elements\": []\n                    }\n                ]\n            }\n        ]\n    },\n    \"comment_element\": {\n        \"id\": 289847569,\n        \"login_required\": false,\n        \"approval_required\": false,\n        \"created_at\": \"2016-04-08T09:04:54-07:00\",\n        \"updated_at\": \"2016-04-08T09:04:54-07:00\",\n        \"title\": \"Comments\",\n        \"ascending_sort_order\": false,\n        \"site_id\": 11953,\n        \"enabled\": true,\n        \"source_id\": 634672,\n        \"source_type\": \"NewsArticle\",\n        \"comments\": []\n    },\n    \"url_string\": \"http://apidemo.sportngin.com/news_article/show/634672\",\n    \"thumbnails\": {},\n    \"sanitized_content\": \"\"\n}","name":""}]},"settings":"","url":"/news_articles/:id","auth":"required","examples":{"codes":[{"code":"curl -X DELETE -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Accept: application/json\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/news_articles/634672\"","language":"curl"},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/news_articles/634672\")\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/news_articles/634672\")\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":[{"desc":"","default":"","type":"int","name":"id","in":"path","_id":"56fd50d7896b2c0e007160fa","ref":"","required":true}]},"category":"57334f89b26eb71900f89bd1","editedParams":true,"githubsync":"","hidden":false,"link_external":false,"__v":0,"updates":[],"user":"56e71f9edee212320019e731","order":5,"slug":"news-articles-delete","sync_unique":"","version":"57334f89b26eb71900f89ba0","editedParams2":true,"excerpt":"The Delete method permanently deletes the matching News Article record in Sport Ngin.  *This method takes action upon initial invocation and cannot be reversed.*\n\n###Parameters","parentDoc":null,"title":"News Articles Delete","type":"delete","createdAt":"2016-03-22T20:34:27.735Z","isReference":true,"project":"57334f89b26eb71900f89b9f","body":"","link_url":"","childrenPages":[]}

deleteNews Articles Delete

The Delete method permanently deletes the matching News Article record in Sport Ngin. *This method takes action upon initial invocation and cannot be reversed.* ###Parameters

Path Params

id:
required
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X DELETE -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/news_articles/634672"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/news_articles/634672")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.sportngin.com/news_articles/634672")
  .delete(null)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id": 634672,
    "title": "Bears to Play Cyclists!!",
    "teaser": "This is going to be one for the ages!!!",
    "author": "Clark Kent",
    "news_date": "2016-04-06T13:00:00-07:00",
    "updated_on": "2016-04-08T09:04:55-07:00",
    "created_on": "2016-04-08T09:04:54-07:00",
    "image_id": null,
    "content_node_id": 20528244,
    "status": "published",
    "preview_text": null,
    "show_image_with_article": true,
    "show_image_in_aggregator": true,
    "show_preview_text_with_article": true,
    "show_preview_text_in_aggregator": true,
    "article_type": "ngin",
    "news_expiration_date": null,
    "content_node": {
        "id": 20528244,
        "updated_on": "2016-04-08T09:04:54-07:00",
        "created_on": "2016-04-08T09:04:54-07:00",
        "resource_type": "NewsArticle",
        "layout_containers": [
            {
                "id": 23018184,
                "content_node_id": 20528244,
                "layout_type": "oneColumn",
                "locked": false,
                "position": 1,
                "created_at": "2016-04-08T09:04:54-07:00",
                "updated_at": "2016-04-08T09:04:54-07:00",
                "custom_css_class": null,
                "mirror_target_id": null,
                "name": null,
                "layout_columns": [
                    {
                        "id": 27998042,
                        "layout_container_id": 23018184,
                        "position": 1,
                        "page_elements": []
                    }
                ]
            }
        ]
    },
    "comment_element": {
        "id": 289847569,
        "login_required": false,
        "approval_required": false,
        "created_at": "2016-04-08T09:04:54-07:00",
        "updated_at": "2016-04-08T09:04:54-07:00",
        "title": "Comments",
        "ascending_sort_order": false,
        "site_id": 11953,
        "enabled": true,
        "source_id": 634672,
        "source_type": "NewsArticle",
        "comments": []
    },
    "url_string": "http://apidemo.sportngin.com/news_article/show/634672",
    "thumbnails": {},
    "sanitized_content": ""
}


{"_id":"57334f89b26eb71900f89c79","__v":0,"createdAt":"2016-03-22T19:03:24.287Z","excerpt":"The Create method accepts two parameters, `game_id`, and `news_article_id`, and associates the specified News Article with the specified [Game](https://sportnginsite.readme.io/docs/games-show) in Sport Ngin.\n\n###Parameters","link_external":false,"type":"post","isReference":true,"link_url":"","api":{"results":{"codes":[{"name":"","code":"{\n    \"success\": true\n}","language":"json","status":200}]},"settings":"","url":"/games_news_articles","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST -H \"NGIN-API-VERSION: 0.1\" -H \"Authorization: Bearer ACCESS_TOKEN\" -H \"Content-Type: application/json\" -d '{\n    \"game_id\": \"13557134\",\n    \"news_article_id\": \"634672\"\n}' \"https://api.sportngin.com/games_news_articles\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games_news_articles\")\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 ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"game_id\\\": \\\"13557134\\\",\\n    \\\"news_article_id\\\": \\\"634672\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"},{"name":null,"language":"java","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/games_news_articles\")\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 ACCESS_TOKEN'\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"{\\n    \\\"game_id\\\": \\\"13557134\\\",\\n    \\\"news_article_id\\\": \\\"634672\\\"\\n}\"\n\nresponse = http.request(request)\nputs response.read_body"}]},"method":"post","params":[{"ref":"","required":true,"desc":"","default":"","type":"int","name":"game_id","in":"body","_id":"56f196fc6137672000941277"},{"required":true,"desc":"","default":"","type":"int","name":"news_article_id","in":"body","_id":"56f196fc6137672000941276","ref":""}]},"body":"","category":"57334f89b26eb71900f89bd1","githubsync":"","hidden":false,"parentDoc":null,"sync_unique":"","user":"56e71f9edee212320019e731","title":"Games News Articles Create","updates":[],"version":"57334f89b26eb71900f89ba0","editedParams":true,"editedParams2":true,"order":7,"project":"57334f89b26eb71900f89b9f","slug":"games-news-articles-create","childrenPages":[]}

postGames News Articles Create

The Create method accepts two parameters, `game_id`, and `news_article_id`, and associates the specified News Article with the specified [Game](https://sportnginsite.readme.io/docs/games-show) in Sport Ngin. ###Parameters

Body Params

game_id:
required
integer
news_article_id:
required
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X POST -H "NGIN-API-VERSION: 0.1" -H "Authorization: Bearer ACCESS_TOKEN" -H "Content-Type: application/json" -d '{
    "game_id": "13557134",
    "news_article_id": "634672"
}' "https://api.sportngin.com/games_news_articles"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/games_news_articles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["content-type"] = 'application/json'
request.body = "{\n    \"game_id\": \"13557134\",\n    \"news_article_id\": \"634672\"\n}"

response = http.request(request)
puts response.read_body
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/games_news_articles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["ngin-api-version"] = '0.1'
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["content-type"] = 'application/json'
request.body = "{\n    \"game_id\": \"13557134\",\n    \"news_article_id\": \"634672\"\n}"

response = http.request(request)
puts response.read_body

Result Format

{
    "success": true
}


{"_id":"57334f89b26eb71900f89c1f","api":{"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required"},"excerpt":"Photos can be uploaded to a Sitebuilder site and placed on a General page, a Team page ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)) or a Game page.  A Photo is a type of content that can live inside of a [Page Element](https://sportnginsite.readme.io/docs/page-elements), so to place a Photo on a page in Sitebuilder, call the Page Element endpoint.  Optionally, the photo can be displayed along with a caption and a link.  To create a photo on a Team page or Game page, use the [Gallery Photos](https://sportnginsite.readme.io/docs/gallery-photos-upload) endpoint instead.\n\n##Photo Galleries\nAllows you to work with the galleries present on a General page, [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page.  Of course, galleries have many Photos, however currently only General pages can have more than one gallery.\n\n##Gallery Photos\nIn addition to uploading a photo as a single image, you can upload images to galleries, which can live on any [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page.  You can also mark a photo as `approved` using this endpoint, if the “Only post uploaded photos that have been approved” setting is turned on for the desired gallery.  Finally, you can delete a Photo from a gallery using the API.","githubsync":"","hidden":false,"project":"57334f89b26eb71900f89b9f","updates":[],"__v":9,"title":"Photos","version":"57334f89b26eb71900f89ba0","link_url":"","sync_unique":"","slug":"photos","type":"basic","order":0,"parentDoc":null,"createdAt":"2016-04-06T18:57:19.325Z","isReference":true,"link_external":false,"user":"56e71f9edee212320019e731","body":"","category":"57334f89b26eb71900f89bc5","childrenPages":[]}

Photos

Photos can be uploaded to a Sitebuilder site and placed on a General page, a Team page ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)) or a Game page. A Photo is a type of content that can live inside of a [Page Element](https://sportnginsite.readme.io/docs/page-elements), so to place a Photo on a page in Sitebuilder, call the Page Element endpoint. Optionally, the photo can be displayed along with a caption and a link. To create a photo on a Team page or Game page, use the [Gallery Photos](https://sportnginsite.readme.io/docs/gallery-photos-upload) endpoint instead. ##Photo Galleries Allows you to work with the galleries present on a General page, [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page. Of course, galleries have many Photos, however currently only General pages can have more than one gallery. ##Gallery Photos In addition to uploading a photo as a single image, you can upload images to galleries, which can live on any [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page. You can also mark a photo as `approved` using this endpoint, if the “Only post uploaded photos that have been approved” setting is turned on for the desired gallery. Finally, you can delete a Photo from a gallery using the API.

{"_id":"57334f89b26eb71900f89bd9","githubsync":"","link_external":false,"order":1,"hidden":false,"title":"Photo Upload","project":"57334f89b26eb71900f89b9f","slug":"photo-upload","type":"post","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\":311769232,\n    \"element_type\":\"Photo\",\n    \"element_id\":2163125,\n    \"position\":1,\n    \"updated_on\":\"2016-04-26T14:14:20-07:00\",\n    \"created_on\":\"2016-04-26T14:14:20-07:00\",\n    \"element_locked\":false,\n    \"content_locked\":false,\n    \"layout_column_id\":26627518,\n    \"mirror_enabled\":null,\n    \"custom_css_class\":null,\n    \"question_element_dependency_type\":\"any\",\n    \"element\":{\n        \"id\":2163125,\n        \"caption\":null,\n        \"updated_on\":\"2016-04-26T14:14:20-07:00\",\n        \"created_on\":\"2016-04-26T14:14:20-07:00\",\n        \"url\":null,\n        \"protocol\":null,\n        \"has_url\":0,\n        \"action\":null,\n        \"image_id\":63695164,\n        \"show_original\":false,\n        \"enlargeable\":false,\n        \"cutline\":\"We are the Snow Owls\",\n        \"thumbnails\": {\n\"large\":\"http://cdn3.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_large.jpg\",\n\"medium\":\"http://cdn1.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_medium.jpg\",\"small\":\"http://cdn4.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_small.jpg\", \"thumb\":\"http://cdn2.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_thumb.jpg\"\n        }\n    }\n}","name":""}]},"settings":"","url":"/page_elements","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: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW\" -F \"page_element[layout_column_id]=26627518\" -F \"page_element[page_element_type]=Photo\" -F \"page_element[content_resource_type]=PageNode\" -F \"page_element[element][cutline]=We are the Snow Owls\" -F \"page_element[element][uploaded_data]=@/Users/adamsager/Pictures/SnowyOwlLanding.jpg\" \"https://api.sportngin.com/page_elements\""},{"language":"ruby","code":"require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.sportngin.com/page_elements\")\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\"] = 'multipart/form-data; boundary=---011000010111000001101001'\nrequest.body = \"-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[layout_column_id]\\\"\\r\\n\\r\\n26627518\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[page_element_type]\\\"\\r\\n\\r\\nPhoto\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[content_resource_type]\\\"\\r\\n\\r\\nPageNode\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[element][cutline]\\\"\\r\\n\\r\\nWe are the Snow Owls!!!\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[element][uploaded_data]\\\"; filename=\\\"[object Object]\\\"\\r\\nContent-Type: false\\r\\n\\r\\n\\r\\n-----011000010111000001101001--\"\n\nresponse = http.request(request)\nputs response.read_body"},{"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=\\\"page_element[layout_column_id]\\\"\\r\\n\\r\\n26627518\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[page_element_type]\\\"\\r\\n\\r\\nPhoto\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[content_resource_type]\\\"\\r\\n\\r\\nPageNode\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[element][cutline]\\\"\\r\\n\\r\\nWe are the Snow Owls!!!\\r\\n-----011000010111000001101001\\r\\nContent-Disposition: form-data; name=\\\"page_element[element][uploaded_data]\\\"; filename=\\\"[object Object]\\\"\\r\\nContent-Type: false\\r\\n\\r\\n\\r\\n-----011000010111000001101001--\");\nRequest request = new Request.Builder()\n  .url(\"https://api.sportngin.com/page_elements\")\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\", \"multipart/form-data; boundary=---011000010111000001101001\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"}]},"method":"post","params":[]},"createdAt":"2016-03-23T17:08:39.795Z","excerpt":"Allows the user to upload a single photo for placement on a Sitebuilder page.","isReference":true,"parentDoc":null,"sync_unique":"","updates":[],"user":"56e71f9edee212320019e731","__v":2,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"`page_element[element][uploaded_data]` points to the location of the files on your local drive. The value defaults to the current directory.\"\n}\n[/block]\n###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 assigned by NGIN\",\n    \"1-0\": \"cutline\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Max length 255. Caption for photo\",\n    \"2-0\": \"url\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Max length 255. Required if has _url is valued\",\n    \"3-0\": \"protocol\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Values are \\\"http://\\\", \\\"https://\\\", \\\"mailto:\\\". Required if has_url is valued.\",\n    \"4-0\": \"uploaded_data\",\n    \"4-1\": \"File\",\n    \"4-2\": \"Image file\",\n    \"5-0\": \"has_url\",\n    \"5-1\": \"Integer\",\n    \"5-2\": \"Values 1-5, corresponding to link \\\"target\\\" attribute. 1 = link opens in same window, 2 = link to full sized image in same window, 3 = link to full sized image in new window, 4 = relative url, 5 = link to new window\",\n    \"6-0\": \"show_original\",\n    \"6-1\": \"Boolean\",\n    \"6-2\": \"If set, the image will not be optimized or resized, which may lead to slower page load times.\",\n    \"7-0\": \"thumbnails\",\n    \"7-1\": \"Hash\",\n    \"7-2\": \"A hash of the thumbnail urls. Keys: small, medium, and large\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]","category":"57334f89b26eb71900f89bc5","link_url":"","version":"57334f89b26eb71900f89ba0","childrenPages":[]}

postPhoto Upload

Allows the user to upload a single photo for placement on a Sitebuilder page.

Note

page_element[element][uploaded_data] points to the location of the files on your local drive. The value defaults to the current directory.

Attributes

Attributes
Type
Notes

id

Integer

Unique id assigned by NGIN

cutline

String

Max length 255. Caption for photo

url

String

Max length 255. Required if has _url is valued

protocol

String

Values are "http://", "https://", "mailto:". Required if has_url is valued.

uploaded_data

File

Image file

has_url

Integer

Values 1-5, corresponding to link "target" attribute. 1 = link opens in same window, 2 = link to full sized image in same window, 3 = link to full sized image in new window, 4 = relative url, 5 = link to new window

show_original

Boolean

If set, the image will not be optimized or resized, which may lead to slower page load times.

thumbnails

Hash

A hash of the thumbnail urls. Keys: small, medium, and large

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl -X POST -H "Authorization: Bearer ACCESS_TOKEN" -H "Accept: application/json" -H "NGIN-API-VERSION: 0.1" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "page_element[layout_column_id]=26627518" -F "page_element[page_element_type]=Photo" -F "page_element[content_resource_type]=PageNode" -F "page_element[element][cutline]=We are the Snow Owls" -F "page_element[element][uploaded_data]=@/Users/adamsager/Pictures/SnowyOwlLanding.jpg" "https://api.sportngin.com/page_elements"
require 'uri'
require 'net/http'

url = URI("https://api.sportngin.com/page_elements")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer ACCESS_TOKEN'
request["accept"] = 'application/json'
request["ngin-api-version"] = '0.1'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[layout_column_id]\"\r\n\r\n26627518\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[page_element_type]\"\r\n\r\nPhoto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[content_resource_type]\"\r\n\r\nPageNode\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[element][cutline]\"\r\n\r\nWe are the Snow Owls!!!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[element][uploaded_data]\"; filename=\"[object Object]\"\r\nContent-Type: false\r\n\r\n\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[layout_column_id]\"\r\n\r\n26627518\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[page_element_type]\"\r\n\r\nPhoto\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[content_resource_type]\"\r\n\r\nPageNode\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[element][cutline]\"\r\n\r\nWe are the Snow Owls!!!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"page_element[element][uploaded_data]\"; filename=\"[object Object]\"\r\nContent-Type: false\r\n\r\n\r\n-----011000010111000001101001--");
Request request = new Request.Builder()
  .url("https://api.sportngin.com/page_elements")
  .post(body)
  .addHeader("authorization", "Bearer ACCESS_TOKEN")
  .addHeader("accept", "application/json")
  .addHeader("ngin-api-version", "0.1")
  .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
  .build();

Response response = client.newCall(request).execute();

Result Format

{
    "id":311769232,
    "element_type":"Photo",
    "element_id":2163125,
    "position":1,
    "updated_on":"2016-04-26T14:14:20-07:00",
    "created_on":"2016-04-26T14:14:20-07:00",
    "element_locked":false,
    "content_locked":false,
    "layout_column_id":26627518,
    "mirror_enabled":null,
    "custom_css_class":null,
    "question_element_dependency_type":"any",
    "element":{
        "id":2163125,
        "caption":null,
        "updated_on":"2016-04-26T14:14:20-07:00",
        "created_on":"2016-04-26T14:14:20-07:00",
        "url":null,
        "protocol":null,
        "has_url":0,
        "action":null,
        "image_id":63695164,
        "show_original":false,
        "enlargeable":false,
        "cutline":"We are the Snow Owls",
        "thumbnails": {
"large":"http://cdn3.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_large.jpg",
"medium":"http://cdn1.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_medium.jpg","small":"http://cdn4.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_small.jpg", "thumb":"http://cdn2.sportngin.com/attachments/photo/6369/5164/SnowyOwlLanding_thumb.jpg"
        }
    }
}


{"_id":"57334f89b26eb71900f89c38","link_url":"","project":"57334f89b26eb71900f89b9f","title":"Photo Galleries Index","api":{"settings":"","url":"/photo_galleries/:id","auth":"required","examples":{"codes":[{"name":"Show all photo galleries on a game(curently on a game there can be only one photo gallery)","language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/photo_galleries?object_type=game&object_id=2072139\""},{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/photo_galleries?object_type=team_instance&object_id=86231\"","name":"Show all photo galleries on a team instance"},{"name":"Show all gallery photos in photo gallery id 50248","language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/photo_galleries/50248\""}]},"method":"get","params":[{"required":true,"type":"string","in":"query","_id":"573bc86f7ac6f6170033bd42","default":"page","desc":"The type of ID to be expected in the object_id parameter","name":"object_type","ref":""},{"desc":"The unique ID of the entity specified in the object_type parameter","name":"object_id","ref":"","required":true,"type":"int","in":"query","_id":"573bc86f7ac6f6170033bd41","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]}},"isReference":true,"createdAt":"2016-03-24T15:54:09.011Z","hidden":false,"parentDoc":null,"slug":"photo-galleries-index","sync_unique":"","user":"56e71f9edee212320019e731","body":"","updates":[],"category":"57334f89b26eb71900f89bc5","type":"get","editedParams2":true,"excerpt":"Allows the user to retrieve the list of galleries for the page specified.","githubsync":"","link_external":false,"order":2,"version":"57334f89b26eb71900f89ba0","__v":3,"editedParams":true,"childrenPages":[]}

getPhoto Galleries Index

Allows the user to retrieve the list of galleries for the page specified.

Query Params

object_type:
required
stringpage
The type of ID to be expected in the object_id parameter
object_id:
required
integer
The unique ID of the entity specified in the object_type parameter

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/photo_galleries?object_type=game&object_id=2072139"
curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/photo_galleries?object_type=team_instance&object_id=86231"
curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/photo_galleries/50248"

Result Format



{"_id":"57334f89b26eb71900f89c35","createdAt":"2016-03-24T15:21:47.424Z","link_external":false,"link_url":"","title":"Photo Galleries Show","updates":[],"api":{"method":"get","params":[{"default":"","type":"int","name":"photo_gallery_id","in":"query","_id":"56f4060b12cd590e00ac1192","ref":"","required":true,"desc":""}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/photos_galleries/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/photo_galleries/50248\"","name":"Show all gallery photos in photo gallery id 50248"}]}},"category":"57334f89b26eb71900f89bc5","editedParams2":true,"slug":"photo-galleries-show","project":"57334f89b26eb71900f89b9f","__v":0,"editedParams":true,"githubsync":"","isReference":true,"order":3,"parentDoc":null,"user":"56e71f9edee212320019e731","body":"","excerpt":"Allows the user to retrieve a specific gallery by its ID.","hidden":false,"sync_unique":"","type":"get","version":"57334f89b26eb71900f89ba0","childrenPages":[]}

getPhoto Galleries Show

Allows the user to retrieve a specific gallery by its ID.

Query Params

photo_gallery_id:
required
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/photo_galleries/50248"

Result Format



{"_id":"57334f89b26eb71900f89c36","editedParams":true,"hidden":false,"updates":[],"version":"57334f89b26eb71900f89ba0","link_external":false,"user":"56e71f9edee212320019e731","title":"Gallery Photos Upload","category":"57334f89b26eb71900f89bc5","githubsync":"","sync_unique":"","createdAt":"2016-03-24T15:28:29.237Z","editedParams2":true,"excerpt":"Allows the user to upload a Photo into the gallery on a specific page.","isReference":true,"link_url":"","__v":1,"api":{"method":"post","params":[{"default":"page","type":"string","name":"object_type","in":"body","_id":"573bc59af09c292200b39750","ref":"","required":false,"desc":"The type of ID to be expected in the object_id parameter"},{"in":"body","_id":"573bc59af09c292200b3974f","ref":"","required":false,"desc":"The unique ID of the entity specified in the object_type parameter","default":"","type":"int","name":"object_id"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/gallery_photos","auth":"required","examples":{"codes":[{"name":"Upload a photo on a game page","language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" --form \"object_type=game\" --form \"object_id=2072139\" --form \"filedata=@/Users/zjia/Desktop/1.png\" \"https://api.sportngin.com/gallery_photos\""},{"name":"Upload a photo on a team page","language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" --form \"object_type=team_instance\" --form \"object_id=86231\" --form \"filedata=@/Users/zjia/Desktop/1.png\" \"https://api.sportngin.com/gallery_photos\""}]}},"body":"","slug":"gallery-photos-upload","type":"post","order":4,"parentDoc":null,"project":"57334f89b26eb71900f89b9f","childrenPages":[]}

postGallery Photos Upload

Allows the user to upload a Photo into the gallery on a specific page.

Body Params

object_type:
stringpage
The type of ID to be expected in the object_id parameter
object_id:
integer
The unique ID of the entity specified in the object_type parameter

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" --form "object_type=game" --form "object_id=2072139" --form "filedata=@/Users/zjia/Desktop/1.png" "https://api.sportngin.com/gallery_photos"
curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" --form "object_type=team_instance" --form "object_id=86231" --form "filedata=@/Users/zjia/Desktop/1.png" "https://api.sportngin.com/gallery_photos"

Result Format



{"_id":"57334f89b26eb71900f89c4a","api":{"url":"/gallery_photos/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" --request DELETE \"https://api.sportngin.com/gallery_photos/1447125\""}]},"method":"delete","params":[{"desc":"","default":"","type":"int","name":"id","in":"path","_id":"56fd554f3eaf300e00f73fc5","ref":"","required":false}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"githubsync":"","isReference":true,"type":"delete","__v":0,"body":"","excerpt":"Allows the user to delete a Photo from a gallery by its ID.","link_url":"","user":"56e71f9edee212320019e731","title":"Gallery Photos Delete","editedParams":true,"editedParams2":true,"hidden":false,"link_external":false,"parentDoc":null,"project":"57334f89b26eb71900f89b9f","slug":"gallery-photos-delete","version":"57334f89b26eb71900f89ba0","category":"57334f89b26eb71900f89bc5","createdAt":"2016-03-24T15:31:44.314Z","order":5,"sync_unique":"","updates":[],"childrenPages":[]}

deleteGallery Photos Delete

Allows the user to delete a Photo from a gallery by its ID.

Path Params

id:
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" --request DELETE "https://api.sportngin.com/gallery_photos/1447125"

Result Format



{"_id":"57334f89b26eb71900f89cc5","user":"56e71f9edee212320019e731","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"isReference":true,"link_url":"","parentDoc":null,"slug":"video","title":"Video","updates":[],"__v":3,"category":"57334f89b26eb71900f89bc5","githubsync":"","hidden":false,"type":"basic","order":6,"sync_unique":"","version":"57334f89b26eb71900f89ba0","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"The UploadedVideo setting must be enabled for your website in order to use the upload functionality.\"\n}\n[/block]","createdAt":"2016-04-06T15:17:52.501Z","excerpt":"External Videos (from YouTube, Google, Yahoo, Vimeo, or Veoh) can be embedded in a Sitebuilder site, or you can choose to upload a video to your Sitebuilder site and place it on a General page, a Team page ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)) or a Game page.  A Video is a type of content that can live inside of a [Page Element](https://sportnginsite.readme.io/docs/page-elements), so to place a Video on a page in Sitebuilder, call the Page Element endpoint.  To create a Video on a Team page or Game page, use the [Gallery Photos](https://sportnginsite.readme.io/docs/gallery-photos-upload) endpoint instead.\n\n##Video Galleries\nAllows you to work with the galleries present on a General page, [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page.  Of course, galleries have many Videos, however currently only General pages can have more than one gallery.\n\n##Gallery Videos\nIn addition to uploading a Video as a file, you can upload Videos to galleries, which can live on any [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page.  You can also mark a Video as `approved` using this endpoint, if the “Only post uploaded videos that have been approved” setting is turned on for the desired gallery.  Finally, you can delete a Video from a gallery using the API.","link_external":false,"project":"57334f89b26eb71900f89b9f","childrenPages":[]}

Video

External Videos (from YouTube, Google, Yahoo, Vimeo, or Veoh) can be embedded in a Sitebuilder site, or you can choose to upload a video to your Sitebuilder site and place it on a General page, a Team page ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)) or a Game page. A Video is a type of content that can live inside of a [Page Element](https://sportnginsite.readme.io/docs/page-elements), so to place a Video on a page in Sitebuilder, call the Page Element endpoint. To create a Video on a Team page or Game page, use the [Gallery Photos](https://sportnginsite.readme.io/docs/gallery-photos-upload) endpoint instead. ##Video Galleries Allows you to work with the galleries present on a General page, [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page. Of course, galleries have many Videos, however currently only General pages can have more than one gallery. ##Gallery Videos In addition to uploading a Video as a file, you can upload Videos to galleries, which can live on any [Game](http://developer.sportngin.com/docs/games-show), ([Team Instance](http://developer.sportngin.com/docs/team-instances-show)), [News Article](https://sportnginsite.readme.io/docs/news-articles-show), [Event](http://developer.sportngin.com/docs/events-show), or Tournament page. You can also mark a Video as `approved` using this endpoint, if the “Only post uploaded videos that have been approved” setting is turned on for the desired gallery. Finally, you can delete a Video from a gallery using the API.

Note

The UploadedVideo setting must be enabled for your website in order to use the upload functionality.

{"_id":"57334f89b26eb71900f89c0f","link_external":false,"updates":[],"__v":1,"type":"post","user":"56e71f9edee212320019e731","slug":"uploaded-videos","sync_unique":"","api":{"method":"post","params":[{"default":"","type":"string","name":"page_element[layout_column_id]","in":"body","_id":"573bcba274d9f20e00c14f56","ref":"","required":false,"desc":""},{"in":"body","_id":"573bcba274d9f20e00c14f55","ref":"","required":false,"desc":"","default":"","type":"string","name":"page_element[page_element_type]"},{"ref":"","required":false,"desc":"","default":"","type":"string","name":"page_element[element][video_params][video_element_type]","in":"body","_id":"573bcba274d9f20e00c14f54"},{"type":"string","name":"page_element[element][video_params][title]","in":"body","_id":"573bcba274d9f20e00c14f53","ref":"","required":false,"desc":"","default":""},{"type":"string","name":"page_element[element][video_params][uploaded_data]","in":"body","_id":"573bcba274d9f20e00c14f52","ref":"","required":false,"desc":"","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/page_elements","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user username:password -H \"NGIN-API-TOKEN: your_token_value\" -H \"NGIN-API-VERSION: 0.1\" --form \"page_element[layout_column_id]=5\" --form \"page_element[page_element_type]=Video\" --form \"page_element[element][video_params][video_element_type]=UploadedVideo\" --form \"page_element[element][video_params][title]=Playoff season\"  --form \"page_element[element][video_params][uploaded_data]=@/Users/zjia/test_fixtures/Movies/bird.avi\" https://api.sportngin.com/page_elements"}]}},"category":"57334f89b26eb71900f89bc5","excerpt":"Allows the user to Upload a Video, and to create a Page Element which displays the _Uploaded_ Video on a Sitebuilder site.","hidden":false,"isReference":true,"parentDoc":null,"title":"Uploaded Videos","version":"57334f89b26eb71900f89ba0","order":7,"project":"57334f89b26eb71900f89b9f","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\": \"title\",\n    \"1-1\": \"String\",\n    \"1-2\": \"title of the video\",\n    \"2-0\": \"created_at\",\n    \"3-0\": \"Updated_at\",\n    \"2-1\": \"Datetime\",\n    \"3-1\": \"Datetime\",\n    \"2-2\": \"Timestamp of creation\",\n    \"3-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","createdAt":"2016-03-18T22:06:58.541Z","editedParams":true,"editedParams2":true,"githubsync":"","link_url":"","childrenPages":[]}

postUploaded Videos

Allows the user to Upload a Video, and to create a Page Element which displays the _Uploaded_ Video on a Sitebuilder site.

Body Params

page_element[layout_column_id]:
string
page_element[page_element_type]:
string
page_element[element][video_params][video_element_type]:
string
page_element[element][video_params][title]:
string
page_element[element][video_params][uploaded_data]:
string

Attributes

Attribute
Type
Notes

id

Integer

Unique id assigned by NGIN

title

String

title of the video

created_at

Datetime

Timestamp of creation

Updated_at

Datetime

Timestamp of last update

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user username:password -H "NGIN-API-TOKEN: your_token_value" -H "NGIN-API-VERSION: 0.1" --form "page_element[layout_column_id]=5" --form "page_element[page_element_type]=Video" --form "page_element[element][video_params][video_element_type]=UploadedVideo" --form "page_element[element][video_params][title]=Playoff season"  --form "page_element[element][video_params][uploaded_data]=@/Users/zjia/test_fixtures/Movies/bird.avi" https://api.sportngin.com/page_elements

Result Format



{"_id":"57334f89b26eb71900f89c58","project":"57334f89b26eb71900f89b9f","sync_unique":"","version":"57334f89b26eb71900f89ba0","api":{"params":[{"name":"id","in":"path","_id":"573bce95ee2b3b2200422997","ref":"","required":false,"desc":"","default":"","type":"int"}],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/uploaded_videos/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" --request DELETE \"https://api.sportngin.com/uploaded_videos/1447125\""}]},"method":"delete"},"editedParams2":true,"excerpt":"Allows the user to delete a video that was previously uploaded.","link_external":false,"link_url":"","updates":[],"body":"","editedParams":true,"hidden":false,"isReference":true,"user":"56e71f9edee212320019e731","__v":3,"createdAt":"2016-03-24T20:43:49.269Z","slug":"uploaded-videos-delete","title":"Uploaded Videos Delete","type":"delete","category":"57334f89b26eb71900f89bc5","githubsync":"","order":8,"parentDoc":null,"childrenPages":[]}

deleteUploaded Videos Delete

Allows the user to delete a video that was previously uploaded.

Path Params

id:
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" --request DELETE "https://api.sportngin.com/uploaded_videos/1447125"

Result Format



{"_id":"57334f89b26eb71900f89c3c","link_url":"","order":9,"parentDoc":null,"project":"57334f89b26eb71900f89b9f","title":"External Video Create","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Attributes\"\n}\n[/block]\n\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\": \"youtube_url\",\n    \"1-1\": \"String\",\n    \"1-2\": \"URL of the video\",\n    \"2-0\": \"height\",\n    \"2-1\": \"Integer\",\n    \"2-2\": \"Aspect ratio\",\n    \"3-0\": \"width\",\n    \"3-1\": \"Integer\",\n    \"3-2\": \"Aspect ratio\",\n    \"4-0\": \"created_on\",\n    \"4-1\": \"Datetime\",\n    \"4-2\": \"Timestamp of creation date\",\n    \"5-0\": \"updated_on\",\n    \"5-1\": \"Datetime\",\n    \"5-2\": \"Timestamp of last update\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]","editedParams":true,"hidden":false,"type":"post","excerpt":"Allows the user to create a Page Element which displays an _External_ Video on a Sitebuilder site.","sync_unique":"","user":"56e71f9edee212320019e731","createdAt":"2016-03-22T17:40:28.217Z","editedParams2":true,"slug":"external-video-create","updates":[],"version":"57334f89b26eb71900f89ba0","api":{"method":"post","params":[{"default":"","type":"string","name":"page_element[layout_column_id]","in":"body","_id":"573bcb62ee2b3b2200422992","ref":"","required":false,"desc":""},{"_id":"573bcb62ee2b3b2200422991","ref":"","required":false,"desc":"","default":"","type":"string","name":"page_element[page_element_type]","in":"body"},{"in":"body","_id":"573bcb62ee2b3b2200422990","ref":"","required":false,"desc":"","default":"","type":"string","name":"page_element[element][video_params][video_element_type]"},{"ref":"","required":false,"desc":"","default":"","type":"string","name":"page_element[element][video_params][youtube_url]","in":"body","_id":"573bcb62ee2b3b220042298f"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/page_elements","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --header \"Authorization: Bearer [YOUR TOKEN]\" --header \"NGIN-API-VERSION: 0.1\" -d \"page_element[layout_column_id]=5&page_element[page_element_type]=Video&page_element[element][video_params][video_element_type]=ExternalVideo&page_element[element][video_params][youtube_url]=http://www.youtube.com/watch?v=YvQR64z_tC8\" https://api.sportngin.com/page_elements"}]}},"category":"57334f89b26eb71900f89bc5","isReference":true,"__v":2,"githubsync":"","link_external":false,"childrenPages":[]}

postExternal Video Create

Allows the user to create a Page Element which displays an _External_ Video on a Sitebuilder site.

Body Params

page_element[layout_column_id]:
string
page_element[page_element_type]:
string
page_element[element][video_params][video_element_type]:
string
page_element[element][video_params][youtube_url]:
string

Attributes

Attribute
Type
Notes

id

Integer

Unique ID assigned by NGIN

youtube_url

String

URL of the video

height

Integer

Aspect ratio

width

Integer

Aspect ratio

created_on

Datetime

Timestamp of creation date

updated_on

Datetime

Timestamp of last update

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --header "Authorization: Bearer [YOUR TOKEN]" --header "NGIN-API-VERSION: 0.1" -d "page_element[layout_column_id]=5&page_element[page_element_type]=Video&page_element[element][video_params][video_element_type]=ExternalVideo&page_element[element][video_params][youtube_url]=http://www.youtube.com/watch?v=YvQR64z_tC8" https://api.sportngin.com/page_elements

Result Format



{"_id":"57334f89b26eb71900f89c57","hidden":false,"link_external":false,"api":{"url":"/video_galleries","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/video_galleries?object_type=game&object_id=2072139\""}]},"method":"get","params":[{"name":"object_type","in":"query","_id":"573bcea7f09c292200b39760","ref":"","required":false,"desc":"","default":"","type":"string"},{"desc":"","default":"","type":"int","name":"object_id","in":"query","_id":"573bcea7f09c292200b3975f","ref":"","required":false}],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":""},"editedParams":true,"githubsync":"","project":"57334f89b26eb71900f89b9f","updates":[],"__v":2,"editedParams2":true,"excerpt":"Allows the user to retrieve the list of galleries for the page specified.","isReference":true,"order":10,"parentDoc":null,"title":"Video Galleries Index","body":"","category":"57334f89b26eb71900f89bc5","user":"56e71f9edee212320019e731","slug":"video-galleries-index","sync_unique":"","type":"get","version":"57334f89b26eb71900f89ba0","createdAt":"2016-03-24T20:37:39.349Z","link_url":"","childrenPages":[]}

getVideo Galleries Index

Allows the user to retrieve the list of galleries for the page specified.

Query Params

object_type:
string
object_id:
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/video_galleries?object_type=game&object_id=2072139"

Result Format



{"_id":"57334f89b26eb71900f89c14","category":"57334f89b26eb71900f89bc5","createdAt":"2016-03-24T20:41:01.326Z","hidden":false,"order":11,"slug":"video-galleries-show","updates":[],"__v":3,"api":{"settings":"","url":"/video_galleries/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" \"https://api.sportngin.com/video_galleries/50248\""}]},"method":"get","params":[{"desc":"","default":"","type":"int","name":"id","in":"path","_id":"573bceaefd7f2e3400cf8b18","ref":"","required":false}],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]}},"editedParams":true,"githubsync":"","link_url":"","parentDoc":null,"type":"get","excerpt":"Allows the user to retrieve a specific gallery by its ID.","link_external":false,"title":"Video Galleries Show","user":"56e71f9edee212320019e731","version":"57334f89b26eb71900f89ba0","editedParams2":true,"isReference":true,"project":"57334f89b26eb71900f89b9f","sync_unique":"","body":"","childrenPages":[]}

getVideo Galleries Show

Allows the user to retrieve a specific gallery by its ID.

Path Params

id:
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" "https://api.sportngin.com/video_galleries/50248"

Result Format



{"_id":"57334f89b26eb71900f89c56","category":"57334f89b26eb71900f89bc5","slug":"gallery-videos-upload","type":"post","createdAt":"2016-03-24T20:32:44.313Z","hidden":false,"updates":[],"user":"56e71f9edee212320019e731","version":"57334f89b26eb71900f89ba0","__v":4,"api":{"params":[{"ref":"","required":false,"desc":"","default":"","type":"string","name":"uploaded_video[object_type]","in":"body","_id":"573bcedfee2b3b220042299c"},{"required":false,"desc":"","default":"","type":"string","name":"uploaded_video[object_id]","in":"body","_id":"573bcedfee2b3b220042299b","ref":""},{"default":"","type":"string","name":"uploaded_video[filedata]","in":"body","_id":"573bcedfee2b3b220042299a","ref":"","required":false,"desc":""},{"_id":"573bcedfee2b3b2200422999","ref":"","required":false,"desc":"","default":"","type":"string","name":"uploaded_video[name]","in":"body"},{"_id":"573bcedfee2b3b2200422998","ref":"","required":false,"desc":"","default":"","type":"string","name":"uploaded_video[description]","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/uploaded_videos","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" --form \"uploaded_video[object_type]=game\" --form \"uploaded_video[object_id]=2072139\" --form \"uploaded_video[filedata]=@/Users/zjia/Desktop/drop.avi\" --form uploaded_video[name]='this_is_a_name' --form uploaded_video[description]='this is description' \"https://api.sportngin.com/uploaded_videos\""}]},"method":"post"},"excerpt":"Allows the user to upload a Video into the gallery on a specific page.","project":"57334f89b26eb71900f89b9f","sync_unique":"","title":"Gallery Videos Upload","link_external":false,"link_url":"","body":"","editedParams":true,"editedParams2":true,"githubsync":"","isReference":true,"order":12,"parentDoc":null,"childrenPages":[]}

postGallery Videos Upload

Allows the user to upload a Video into the gallery on a specific page.

Body Params

uploaded_video[object_type]:
string
uploaded_video[object_id]:
string
uploaded_video[filedata]:
string
uploaded_video[name]:
string
uploaded_video[description]:
string

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" --form "uploaded_video[object_type]=game" --form "uploaded_video[object_id]=2072139" --form "uploaded_video[filedata]=@/Users/zjia/Desktop/drop.avi" --form uploaded_video[name]='this_is_a_name' --form uploaded_video[description]='this is description' "https://api.sportngin.com/uploaded_videos"

Result Format



{"_id":"57334f89b26eb71900f89c5c","parentDoc":null,"sync_unique":"","type":"delete","createdAt":"2016-03-24T20:18:25.015Z","editedParams":true,"githubsync":"","excerpt":"Allows the user to delete a Video from a gallery by its ID.","hidden":false,"isReference":true,"link_external":false,"title":"Gallery Videos Delete","__v":5,"category":"57334f89b26eb71900f89bc5","editedParams2":true,"updates":[],"project":"57334f89b26eb71900f89b9f","version":"57334f89b26eb71900f89ba0","api":{"params":[{"ref":"","required":false,"desc":"","default":"","type":"int","name":"id","in":"path","_id":"573bceeafd7f2e3400cf8b19"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/uploaded_videos/:id","auth":"required","examples":{"codes":[{"language":"curl","code":"curl --user USERNAME:PASSWORD -H \"NGIN-API-TOKEN: YOUR_TOKEN\" -H \"NGIN-API-VERSION: 0.1\" --request DELETE \"https://api.sportngin.com/uploaded_videos/1447125\""}]},"method":"delete"},"link_url":"","user":"56e71f9edee212320019e731","body":"","order":13,"slug":"gallery-videos-delete","childrenPages":[]}

deleteGallery Videos Delete

Allows the user to delete a Video from a gallery by its ID.

Path Params

id:
integer

Definition

{{ api_url }}{{ page_api_url }}

Examples

curl --user USERNAME:PASSWORD -H "NGIN-API-TOKEN: YOUR_TOKEN" -H "NGIN-API-VERSION: 0.1" --request DELETE "https://api.sportngin.com/uploaded_videos/1447125"

Result Format