Site API v4
Introduction
This API includes the methods to create/retrieve/update and some other operations on Sites, Site Groups and Site Sections.
Site
General Resource URL
Production Instance: https://api.freewheel.tv/services/v4/sites/[FW_ID]?[parameter1]=[query1]&...
Attributes
Name | Type | Description | Creatable | Updatable | Showable | Validations |
---|---|---|---|---|---|---|
id | FW_ID | ID of the Site in FreeWheel | No | No | Yes | |
name | String | The name of the Site | Req | Yes | Yes | Must be unique on the network and be at least 3 characters long |
tag | String | A unique tag of the Site | Req | Yes | Yes | Must be unique on the network and be at least 3 characters long |
description | String | Description of the Site | Yes | Yes | Yes | |
rating | ['G', 'PG', 'PG-13', 'R', 'Mature', 'Unrated'] | Rating of the site. Defaults to 'Unrated'. | Yes | Yes | Yes | |
content_partner_ids | Integer Array | The network IDs for which content partner visibility is granted | Yes | Yes | Yes | Must be among the CROs whose distributor is the current network |
metadata | String | Site metadata | Yes | Yes | Yes | |
url | String | Site URL | Yes | Yes | Yes | |
status | ['ACTIVE', 'INACTIVE'] | Site status | No | Yes | Yes | |
external_id | String | The Site's External ID | Yes | Yes | Yes | |
session_duration | Integer | The duration after which a user’s session data expires (in seconds). See the MRM User Guide for more details. | No | Yes | Yes | Must be greater than or equal to 300 |
updated_at | DateTime | Last updated time. | No | No | Yes | |
created_at | DateTime | Created time | No | No | Yes |
Custom Data Type 1: customized_metadata
Name | Type | Description | Creatable | Updatable | Showable | Validations |
---|---|---|---|---|---|---|
key | String | Yes | Yes | Yes | Unique | |
value | String | Yes | Yes | Yes |
JSON sample
{
"customized_metadata":{
"key1":"value1",
"key2":"value2"
}
}
XML sample
<site>
...
<customized_metadata>
<key_value>
<key>key1</key>
<value>value1</value>
</key_value>
<key_value>
<key>key2</key>
<value>value2</value>
</key_value>
</customized_metadata>
</site>
Site API Endpoints
List Sites [GET /sites]
Get a list of sites.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
status | Optional | String | Filter list result by specified site status, which can be: ACTIVE INACTIVE |
external_id | Optional | String | Filter list result by specified external id. |
page | Optional | Integer | Specify current page number. Default is 1. |
per_page | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
updated_at | Optional | String | You can use the following syntax to search and sort by updated time. For results: Changed on or before the timestamp, use an ellipsis (..) before the timestamp, e.g., updated_at=..2019-01-26T13:47:00Z Changed on or after the timestamp, use an ellipses (..) after the timestamp, e.g., updated_at=2019-01-26T13:47:00Z.. In descending order of update time, use a minus sign ( - ) prefix before the timestamp e.g., -updated_at=2019-01-26T13:47:00Z In ascending order of update time, add no prefix. eg., updated_at=2019-01-26T13:47:00Z |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SiteList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<sites page="1" per_page="10" total_page="39" total_count="389">
<links>
<link rel="self" href="/services/v4/sites?page=1&per_page=10"></link>
<link rel="next" href="/services/v4/sites?page=2&per_page=10"></link>
<link rel="last" href="/services/v4/sites?page=39&per_page=10"></link>
</links>
<site>
<id>654936</id>
<name>post check site name20170204142157_modified</name>
<status>ACTIVE</status>
<tag>post check site tag20170204142157post check site tag20170204142157_modified</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2017-02-04T14:37:32Z</updated_at>
<created_at>2017-02-04T14:35:22Z</created_at>
<url></url>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/sites/654936"></link>
<link rel="parent_site_groups" href="/services/v4/sites/654936/parent_site_groups"></link>
<link rel="child_site_sections" href="/services/v4/sites/654936/child_site_sections"></link>
</links>
</site>
<site>
<id>654934</id>
<name>name for min required site by IS post check 20170204142157</name>
<status>ACTIVE</status>
<tag>tag for min required site by IS post check 20170204142157</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2017-02-04T14:23:25Z</updated_at>
<created_at>2017-02-04T14:23:25Z</created_at>
<url></url>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/sites/654934"></link>
<link rel="parent_site_groups" href="/services/v4/sites/654934/parent_site_groups"></link>
<link rel="child_site_sections" href="/services/v4/sites/654934/child_site_sections"></link>
</links>
</site>
...
</sites>
List Parent Site Groups [GET /sites/{site_id}/parent_site_groups]
Get a list of parent sites groups.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number. |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (ParentSiteGroupList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_groups page="1" per_page="10" total_page="116" total_count="1158">
<links>
<link rel="self" href="/services/v4/sites/654906/parent_site_groups?page=1&per_page=10"></link>
<link rel="next" href="/services/v4/sites/654906/parent_site_groups?page=2&per_page=10"></link>
<link rel="last" href="/services/v4/sites/654906/parent_site_groups?page=116&per_page=10"></link>
</links>
<site_group>
<id>105976</id>
<name>Run Of Site Network</name>
<status>ACTIVE</status>
<tag>Run Of Site Network</tag>
<metadata></metadata>
<description></description>
<external_id></external_id>
<updated_at>2016-11-17T05:38:35Z</updated_at>
<created_at>2010-04-14T03:50:44Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/105976"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/105976/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/105976/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/105976/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/105976/child_site_sections"></link>
</links>
</site_group>
<site_group>
<id>106228</id>
<name>Site-changhao</name>
<status>ACTIVE</status>
<tag>Site-changhao</tag>
<metadata></metadata>
<description></description>
<external_id></external_id>
<updated_at>2016-08-02T09:13:49Z</updated_at>
<created_at>2010-04-15T06:08:40Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/106228"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/106228/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/106228/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/106228/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/106228/child_site_sections"></link>
</links>
</site_group>
...
</site_groups>
List Child Site Sections [GET /sites/{site_id}/child_site_sections]
Get a list of child site sections.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number. |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (ChildSiteSectionList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_sections page="1" per_page="10" total_page="116" total_count="1158">
<link rel="self" href="/services/v4/sites/654906/child_site_sections?page=1&per_page=10"></link>
<link rel="next" href="/services/v4/sites/654906/child_site_sections?page=2&per_page=10"></link>
<link rel="last" href="/services/v4/sites/654906/child_site_sections?page=116&per_page=10"></link>
</links>
<site_section>
<id>105976</id>
<name>Run Of Site Network</name>
<status>ACTIVE</status>
<tag>Run Of Site Network</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2016-11-17T05:38:35Z</updated_at>
<created_at>2010-04-14T03:50:44Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/105976"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/105976/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/105976/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/105976/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/105976/child_site_sections"></link>
</links>
</site_section>
<site_section>
<id>106228</id>
<name>Site-changhao</name>
<status>ACTIVE</status>
<tag>Site-changhao</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2016-08-02T09:13:49Z</updated_at>
<created_at>2010-04-15T06:08:40Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/106228"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/106228/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/106228/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/106228/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/106228/child_site_sections"></link>
</links>
</site_section>
...
</site_sections>
Show a Site [GET /sites/{site_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SiteData)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site>
<id>654936</id>
<name>post check site name20170204142157_modified</name>
<status>ACTIVE</status>
<tag>post check site tag20170204142157post check site tag20170204142157_modified</tag>
<metadata></metadata>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2017-02-04T14:37:32Z</updated_at>
<created_at>2017-02-04T14:35:22Z</created_at>
<url></url>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/sites/654936"></link>
<link rel="parent_site_groups" href="/services/v4/sites/654936/parent_site_groups"></link>
<link rel="child_site_sections" href="/services/v4/sites/654936/child_site_sections"></link>
</links>
</site>
Create a Site [POST /sites]
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"name": "blip.tv",
"status": "ACTIVE",
"tag": "tag",
"description": "Some Description",
"content_partner_ids": [
97755,96749
],
"rating": "Unrated",
"url": "http://www.blip.tv",
"session_duration": 300
}
Response 201 (application/json)
Headers
Location: /services/v4/sites/654936
Attributes (SiteData)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description>Some Description</description>
<external_id>Clients' External ID</external_id>
<name>youtube.com</name>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<tag>tag</tag>
<rating>Unrated</rating>
<session-duration>30</session-duration>
<url>http://www.youtube.com</url>
</site>
Response 201 (application/xml)
Headers
Location: /services/v4/sites/654936
Body
<site>
<id>654936</id>
<name>youtube.com</name>
<status>ACTIVE</status>
<tag>tag</tag>
<description>Some Description</description>
<rating>Unrated</rating>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<updated_at>2017-02-04T14:37:32Z</updated_at>
<created_at>2017-02-04T14:35:22Z</created_at>
<url>http://www.youtube.com</url>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/sites/654936"></link>
<link rel="parent_site_groups" href="/services/v4/sites/654936/parent_site_groups"></link>
<link rel="child_site_sections" href="/services/v4/sites/654936/child_site_sections"></link>
</links>
</site>
Update a Site [PUT /sites/{site_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"name": "blip.tv",
"status": "ACTIVE",
"tag": "tag",
"metadata": "metadata",
"content_partner_ids": [
97755,96749
],
"description": "Some Description",
"rating": "Unrated",
"external_id": "Clients' External ID",
"url": "http://www.blip.tv",
"session_duration": 300
}
Response 200 (application/json)
Attributes (SiteData)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<?xml version="1.0" encoding="UTF-8"?>
<site>
<description>Some Description</description>
<external_id>Clients' External ID</external_id>
<name>youtube.com</name>
<tag>tag</tag>
<rating>Unrated</rating>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<session-duration>30</session-duration>
<url>http://www.youtube.com</url>
</site>
Response 200 (application/xml)
Body
<site>
<id>654936</id>
<name>youtube.com</name>
<status>ACTIVE</status>
<tag>tag</tag>
<description>Some Description</description>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<rating>Unrated</rating>
<updated_at>2017-02-04T14:37:32Z</updated_at>
<created_at>2017-02-04T14:35:22Z</created_at>
<url>http://www.youtube.com</url>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/sites/654936"></link>
<link rel="parent_site_groups" href="/services/v4/sites/654936/parent_site_groups"></link>
<link rel="child_site_sections" href="/services/v4/sites/654936/child_site_sections"></link>
</links>
</site>
Add a Parent Site Group [PUT /sites/{site_id}/parent_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site group identification number |
site_group_id | Required | Integer | The parent site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Delete a Parent Site Group [DELETE /sites/{site_id}/parent_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number |
site_group_id | Required | Integer | The parent site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Update Site And Parent Site Groups Relationship [PUT /sites/{site_id}/parent_site_groups]
It will replace current parent site groups with specified site groups in request body
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"items": [
{
"id": 2127048981
},
{
"id": 2127048881
}
]
}
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_groups>
<site_group>
<id>2127048981</id>
</site_group>
<site_group>
<id>2127048881</id>
</site_group>
</site_groups>
Response 200 (application/xml)
Site Group
General Resource URL
Production Instance: https://api.freewheel.tv/services/v4/site_groups/[FW_ID]?[parameter1]=[query1]&...
Attributes
Name | Type | Description | Creatable | Updatable | Showable | Validation |
---|---|---|---|---|---|---|
id | FW_ID | ID of the Site Group in FreeWheel | No | No | Yes | |
name | String | The ame of the Site Group | Req | Yes | Yes | Must be unique on the network and should be at least 3 characters long |
tag | String | A unique tag of the site group. | Req | Yes | Yes | Must be unique on the network and should be at least 3 characters long |
description | String | Description of the Site Group | Yes | Yes | Yes | |
customized_metadata | String | Site group customized metadata | Yes | Yes | ||
metadata | Custom Data Type 2 | Site Group metadata | Yes | Yes | Yes | |
status | ['ACTIVE', 'INACTIVE'] | Site Group status | No | Yes | Yes | |
external_id | String | The Site Group's External ID | Yes | Yes | Yes | |
session_duration | Integer | The duration after which a user’s session data expires (in seconds). See the MRM User Guide for more details. | No | Yes | Yes | Must be greater than or equal to 300 |
updated_at | DateTime | Last updated time. | No | No | Yes | |
created_at | DateTime | Created time | No | No | Yes |
Custom Data Type 2: customized_metadata
Name | Type | Description | Creatable | Updatable | Showable | Validations |
---|---|---|---|---|---|---|
key | String | Yes | Yes | Yes | Unique | |
value | String | Yes | Yes | Yes |
JSON sample
{
"customized_metadata":{
"key1":"value1",
"key2":"value2"
}
}
XML sample
<site_group>
...
<customized_metadata>
<key_value>
<key>key1</key>
<value>value1</value>
</key_value>
<key_value>
<key>key2</key>
<value>value2</value>
</key_value>
</customized_metadata>
</site_group>
Site Group API Endpoints
List Site Groups [GET /site_groups]
Get a list of site groups.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
status | Optional | String | Filter list result by specified site group status: ACTIVE INACTIVE |
external_id | Optional | String | Filter list result by specified external id. |
page | Optional | Integer | Specify the current page number. Default is 1. |
per_page | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
updated_at | Optional | String | You can use the following syntax to search and sort by updated time. For results: Changed on or before the timestamp, use an ellipsis (..) before the timestamp, e.g., updated_at=..2019-01-26T13:47:00Z Changed on or after the timestamp, use an ellipses (..) after the timestamp, e.g., updated_at=2019-01-26T13:47:00Z.. In descending order of update time, use a minus sign ( - ) prefix before the timestamp e.g., -updated_at=2019-01-26T13:47:00Z In ascending order of update time, add no prefix. eg., updated_at=2019-01-26T13:47:00Z |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SiteGroupList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_groups page="1" per_page="10" total_page="79" total_count="787">
<links>
<link rel="self" href="/services/v4/site_groups?page=1&per_page=10"></link>
<link rel="next" href="/services/v4/site_groups?page=2&per_page=10"></link>
<link rel="last" href="/services/v4/site_groups?page=79&per_page=10"></link>
</links>
<site_group>
<id>655012</id>
<name>post check site group name20170216081131_modified</name>
<status>INACTIVE</status>
<tag>post check site group tag20170216081131post check site group tag20170216081131_modified</tag>
<metadata></metadata>
<description></description>
<external_id></external_id>
<updated_at>2017-02-16T08:14:37Z</updated_at>
<created_at>2017-02-16T08:12:56Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/655012"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/655012/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/655012/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/655012/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/655012/child_site_sections"></link>
</links>
</site_group>
<site_group>
<id>655004</id>
<name>post check site group name20170216072825_modified</name>
<status>INACTIVE</status>
<tag>post check site group tag20170216072825_modified</tag>
<metadata></metadata>
<description></description>
<external_id></external_id>
<updated_at>2017-02-16T07:37:31Z</updated_at>
<created_at>2017-02-16T07:35:44Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/655004"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/655004/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/655004/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/655004/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/655004/child_site_sections"></link>
</links>
</site_group>
...
</site_groups>
List Parent Site Groups [GET /site_groups/{site_group_id}/parent_site_groups]
Get a list of parent sites groups.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_group_id | Required | Integer | The site group identification number. |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SGParentSiteGroupList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_groups page="1" per_page="10" total_page="1" total_count="1">
<links>
<link rel="self" href="/services/v4/site_groups/654988/parent_site_groups?page=1&per_page=10"></link>
</links>
<site_group>
<id>654987</id>
<name>post check site group name20170216053121_modified</name>
<status>INACTIVE</status>
<tag>post check site group tag20170216053121_modified</tag>
<metadata></metadata>
<description></description>
<external_id></external_id>
<updated_at>2017-02-16T05:44:44Z</updated_at>
<created_at>2017-02-16T05:42:56Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/654987"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/654987/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/654987/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/654987/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/654987/child_site_sections"></link>
</links>
</site_group>
</site_groups>
List Child Site Groups [GET /site_groups/{site_group_id}/child_site_groups]
Get a list of child sites group.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_group_id | Required | Integer | The site group identification number. |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SGChildSiteGroupList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_groups page="1" per_page="10" total_page="1" total_count="1">
<links>
<link rel="self" href="/services/v4/site_groups/654949/child_site_groups?page=1&per_page=10"></link>
</links>
<site_group>
<id>2127048981</id>
<name>site_group_8_CRO_4_auto</name>
<status>ACTIVE</status>
<tag>site_group_8_CRO_4_auto_tag</tag>
<metadata>site group meta data</metadata>
<description>site group on cro_4_auto for automation</description>
<external_id>site_group_8_CRO_4_auto_tag</external_id>
<updated_at>2011-12-30T08:24:37Z</updated_at>
<created_at>2008-12-18T12:00:00Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/2127048981"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/2127048981/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/2127048981/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/2127048981/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/2127048981/child_site_sections"></link>
</links>
</site_group>
</site_groups>
List Child Sites [GET /site_groups/{site_group_id}/child_sites]
Get a list of child sites.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_group_id | Required | Integer | The site group identification number. |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SGChildSiteList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<sites page="1" per_page="10" total_page="1" total_count="1">
<links>
<link rel="self" href="/services/v4/site_groups/654949/child_sites?page=1&per_page=10"></link>
</links>
<site>
<id>2131404794</id>
<name>site_34_CRO_4_auto</name>
<status>ACTIVE</status>
<tag>site_34_CRO_4_auto_tag</tag>
<metadata>site on CRO_4_auto</metadata>
<description>this is an existed site for automation</description>
<rating>Mature</rating>
<external_id></external_id>
<updated_at>2011-12-21T03:52:30Z</updated_at>
<created_at>2010-01-18T12:00:00Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/sites/2131404794"></link>
<link rel="parent_site_groups" href="/services/v4/sites/2131404794/parent_site_groups"></link>
<link rel="child_site_sections" href="/services/v4/sites/2131404794/child_site_sections"></link>
</links>
</site>
</sites>
List Child Site Sections [GET /site_groups/{site_group_id}/child_site_sections]
Get a list of child site sections.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_group_id | Required | Integer | The site group identification number. |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SGChildSiteSectionList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_sections page="1" per_page="10" total_page="1" total_count="1">
<links>
<link rel="self" href="/services/v4/site_groups/654949/child_site_sections?page=1&per_page=10"></link>
</links>
<site_section>
<id>2137589919</id>
<name>transparency-use2-section2</name>
<status>ACTIVE</status>
<tag>tag1</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2014-09-04T00:35:45Z</updated_at>
<created_at>2014-09-04T00:35:38Z</created_at>
<links>
<link rel="self" href="/services/v4/site_sections/2137589919"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/2137589919/parent_site_groups"></link>
<link rel="parent_sites" href="/services/v4/site_sections/2137589919/parent_sites"></link>
</links>
</site_section>
</site_sections>
Show a Site Group [GET /site_groups/{site_group_id}]
Get a site group.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_group_id | Required | Integer | The site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SiteGroupData)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_group>
<id>654949</id>
<name>site_group_17_CRO_4_auto</name>
<status>ACTIVE</status>
<tag>site_group_17_CRO_4_auto_tag</tag>
<metadata>site group meta data</metadata>
<description>site group on cro_4_auto for automation</description>
<external_id></external_id>
<updated_at>2008-12-18T12:00:00Z</updated_at>
<created_at>2008-12-18T12:00:00Z</created_at>
<session_duration>300</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/654949"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/654949/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/654949/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/654949/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/654949/child_site_sections"></link>
</links>
</site_group>
Create a Site Group [POST /site_groups]
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"name": "blip.tv site group",
"status": "ACTIVE",
"tag": "tag",
"metadata": "metadata",
"description": "Some Description",
"external_id": "Clients' External ID",
"session_duration": 500
}
Response 201 (application/json)
Headers
Location: /services/v4/site_groups/2146909459
Body
{
"id": 2146909459,
"name": "blip.tv site group",
"status": "ACTIVE",
"tag": "tag",
"metadata": "metadata",
"description": "Some Description",
"external_id": "Clients' External ID",
"updated_at": "2017-02-16T11:04:05Z",
"created_at": "2017-02-16T11:04:05Z",
"session_duration": 500,
"links": [
{
"rel": "self",
"href": "/services/v4/site_groups/2146909459"
},
{
"rel": "parent_site_groups",
"href": "/services/v4/site_groups/2146909459/parent_site_groups"
},
{
"rel": "child_site_groups",
"href": "/services/v4/site_groups/2146909459/child_site_groups"
},
{
"rel": "child_sites",
"href": "/services/v4/site_groups/2146909459/child_sites"
},
{
"rel": "child_site_sections",
"href": "/services/v4/site_groups/2146909459/child_site_sections"
}
]
}
Request XML
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_group>
<name>blip.tv site group</name>
<status>ACTIVE</status>
<tag>tag</tag>
<metadata>metadata</metadata>
<description>Some Description</description>
<external_id>Clients' External ID</external_id>
<session_duration>500</session_duration>
</site_group>
Response 201 (application/xml)
Headers
Location: /services/v4/site_groups/2146909459
Body
<site_group>
<id>2146909459</id>
<name>blip.tv site group</name>
<status>ACTIVE</status>
<tag>tag</tag>
<metadata>metadata</metadata>
<description>Some Description</description>
<external_id>Clients' External ID</external_id>
<updated_at>2017-02-16T11:04:05Z</updated_at>
<created_at>2017-02-16T11:04:05Z</created_at>
<session_duration>500</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/2146909459"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/2146909459/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/2146909459/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/2146909459/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/2146909459/child_site_sections"></link>
</links>
</site_group>
Update a Site Group [PUT /site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_group_id | Required | Integer | The site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"name": "blip.tv site group",
"status": "ACTIVE",
"tag": "tag",
"metadata": "metadata",
"description": "Some Description",
"external_id": "Clients' External ID",
"session_duration": 300
}
Response 200 (application/json)
Body
{
"id": 654949,
"name": "blip.tv site group",
"status": "ACTIVE",
"tag": "tag",
"metadata": "metadata",
"description": "Some Description",
"rating": "Unrated",
"external_id": "Clients' External ID",
"updated_at": "2017-02-17T02:42:32Z",
"created_at": "2017-02-16T11:04:05Z",
"session_duration": 300,
"links": [
{
"rel": "self",
"href": "/services/v4/site_groups/654949"
},
{
"rel": "parent_site_groups",
"href": "/services/v4/site_groups/654949/parent_site_groups"
},
{
"rel": "child_site_groups",
"href": "/services/v4/site_groups/654949/child_site_groups"
},
{
"rel": "child_sites",
"href": "/services/v4/site_groups/654949/child_sites"
},
{
"rel": "child_site_sections",
"href": "/services/v4/site_groups/654949/child_site_sections"
}
]
}
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_group>
<name>blip.tv site group</name>
<status>ACTIVE</status>
<tag>tag</tag>
<metadata>metadata</metadata>
<description>Some Description</description>
<external_id>Clients' External ID</external_id>
<session_duration>500</session_duration>
</site_group>
Response 200 (application/xml)
Body
<site_group>
<id>654949</id>
<name>blip.tv site group</name>
<status>ACTIVE</status>
<tag>tag</tag>
<metadata>metadata</metadata>
<description>Some Description</description>
<external_id>Clients' External ID</external_id>
<updated_at>2017-02-17T03:06:23Z</updated_at>
<created_at>2017-02-16T11:04:05Z</created_at>
<session_duration>500</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/654949"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/654949/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/654949/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/654949/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/654949/child_site_sections"></link>
</links>
</site_group>
Add a Parent Site Group [PUT /site_groups/{id}/parent_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group id |
site_group_id | Required | Integer | The parent site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Delete a Parent Site Group [DELETE /site_groups/{id}/parent_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
site_group_id | Required | Integer | The parent site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Update Site Group And Parent Site Groups Relationship [PUT /site_groups/{id}/parent_site_groups]
It will replace current parent site groups with specified site groups in request body
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"items": [
{
"id": 2127048981
},
{
"id": 2127048881
}
]
}
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_groups>
<site_group>
<id>2127048981</id>
</site_group>
<site_group>
<id>2127048881</id>
</site_group>
</site_groups>
Response 200 (application/xml)
Add a Child Site Group [PUT /site_groups/{id}/child_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
site_group_id | Required | Integer | The child site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Delete a Child Site Group [DELETE /site_groups/{id}/child_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
site_group_id | Required | Integer | The child site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Update Site Group And Child Site Groups Relationship [PUT /site_groups/{id}/child_site_groups]
It will replace current child site groups with specified site groups in request body,
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"items": [
{
"id": 2127048981
},
{
"id": 2127048881
}
]
}
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_groups>
<site_group>
<id>2127048981</id>
</site_group>
<site_group>
<id>2127048881</id>
</site_group>
</site_groups>
Response 200 (application/xml)
Add a Child Site [PUT /site_groups/{id}/child_sites/{site_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
site_id | Required | Integer | The child site id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Delete a Child Site [DELETE /site_groups/{id}/child_sites/{site_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
site_id | Required | Integer | The child site id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Update Site Group And Child Sites Relationship [PUT /site_groups/{id}/child_sites]
It will replace current child sites with specified sites in request body
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"items": [
{
"id": 2127048981
},
{
"id": 2127048881
}
]
}
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<sites>
<site>
<id>2127048981</id>
</site>
<site>
<id>2127048881</id>
</site>
</sites>
Response 200 (application/xml)
Add a Child Site Section [PUT /site_groups/{id}/child_site_sections/{site_section_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number. |
site_section_id | Required | Integer | The child site section id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Delete a Child Site Section [DELETE /site_groups/{id}/child_site_sections/{site_section_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
site_section_id | Required | Integer | The child site section id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Update Site Group And Child Site Sections Relationship [PUT /site_groups/{id}/child_site_sections]
It will replace current child site sections with specified site sections in request body.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site group identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"items": [
{
"id": 2127048981
},
{
"id": 2127048881
}
]
}
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_sections>
<site_section>
<id>2127048981</id>
</site_section>
<site_section>
<id>2127048881</id>
</site_section>
</site_sections>
Response 200 (application/xml)
Site Section
General Resource URL
Production Instance: https://api.freewheel.tv/services/v4/site_sections/[FW_ID]?[parameter1]=[query1]&...
Attributes
Name | Type | Description | Creatable | Updatable | Showable | Validations |
---|---|---|---|---|---|---|
id | FW_ID | ID of the Site Section in FreeWheel | No | No | Yes | |
name | String | The name of the Site Section | Req | Yes | Yes | Must be unique on the network and should be at least 3 characters long |
tag | String | A unique tag of the Site Section | Req | Yes | Yes | Must be unique on the network and should be at least 3 characters long |
description | String | Description of the Site Section | Yes | Yes | Yes | |
rating | ['G', 'PG', 'PG-13', 'R', 'Mature', 'Unrated'] | Rating of the Site Section. Defaults to 'Unrated'. | Yes | Yes | Yes | |
customized_metadata | Custom Data Type 3 | Site section customized metadata | Yes | Yes | ||
content_partner_ids | Integer Array | The network IDs for which content partner visibility is granted | Yes | Yes | Yes | Must be among the CROs whose distributor is the current network |
metadata | String | Site Section metadata | Yes | Yes | Yes | |
status | ('ACTIVE', 'INACTIVE') | Site Section status | No | Yes | Yes | |
external_id | String | The Site Section's External ID | Yes | Yes | Yes | |
updated_at | DateTime | Last updated time | No | No | Yes | |
created_at | DateTime | Created time | No | No | Yes |
Custom Data Type 3: customized_metadata
Name | Type | Description | Creatable | Updatable | Showable | Validations |
---|---|---|---|---|---|---|
key | String | Yes | Yes | Yes | Unique | |
value | String | Yes | Yes | Yes |
JSON sample
{
"customized_metadata":{
"key1":"value1",
"key2":"value2"
}
}
```
**XML sample**
```XML
<site_section>
...
<customized_metadata>
<key_value>
<key>key1</key>
<value>value1</value>
</key_value>
<key_value>
<key>key2</key>
<value>value2</value>
</key_value>
</customized_metadata>
</site_section>
Site Section API Endpoints
List Site Sections [GET /site_sections]
Get a list of site sections.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
status | Optional | String | Filter list result by specified site section status: ACTIVE INACTIVE |
external_id | Optional | String | Filter list result by specified external id. |
page | Optional | Integer | Specify current page number. Default is 1. |
per_page | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
updated_at | Optional | String | You can use the following syntax to search and sort by updated time. For results: Changed on or before the timestamp, use an ellipsis (..) before the timestamp, e.g., updated_at=..2019-01-26T13:47:00Z Changed on or after the timestamp, use an ellipses (..) after the timestamp, e.g., updated_at=2019-01-26T13:47:00Z.. In descending order of update time, use a minus sign ( - ) prefix before the timestamp e.g., -updated_at=2019-01-26T13:47:00Z In ascending order of update time, add no prefix. eg., updated_at=2019-01-26T13:47:00Z |
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SiteSectionList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_sections page="1" per_page="10" total_page="7" total_count="65">
<links>
<link rel="self" href="/services/v4/site_sections?page=1&per_page=10"></link>
<link rel="next" href="/services/v4/site_sections?page=2&per_page=10"></link>
<link rel="last" href="/services/v4/site_sections?page=7&per_page=10"></link>
</links>
<site_section>
<id>2137589916</id>
<name>Run Of Site Network from Network Lw Distirbutor-20140820</name>
<status>ACTIVE</status>
<tag>tag1</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id>Network_2003616557_SiteSectionGroup_2146909396</external_id>
<updated_at>2014-08-20T00:20:59Z</updated_at>
<created_at>2014-08-20T00:20:59Z</created_at>
<links>
<link rel="self" href="/services/v4/site_sections/2137589916"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/2137589916/parent_site_groups"></link>
<link rel="parent_sites" href="/services/v4/site_sections/2137589916/parent_sites"></link>
</links>
</site_section>
<site_section>
<id>2137589918</id>
<name>transparency-use2-section1</name>
<status>ACTIVE</status>
<tag>tag2</tag>
<metadata></metadata>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2014-09-04T00:35:43Z</updated_at>
<created_at>2014-09-04T00:35:37Z</created_at>
<links>
<link rel="self" href="/services/v4/site_sections/2137589918"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/2137589918/parent_site_groups"></link>
<link rel="parent_sites" href="/services/v4/site_sections/2137589918/parent_sites"></link>
</links>
</site_section>
...
</site_sections>
List Parent Site Groups [GET /site_sections/{site_section_id}/parent_site_groups]
Get a list of parent sites groups.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_section_id | Required | Integer | The site section ID |
page_value | Optional | Integer | Specify the current page number. Default is 1. |
per_page_value | Optional | Integer | Specify how many items per page. Default is 10. Maximum is 50. |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SSParentSiteGroupList)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_groups page="1" per_page="10" total_page="1" total_count="1">
<links>
<link rel="self" href="/services/v4/site_sections/1859521/parent_site_groups?page=1&per_page=10"></link>
</links>
<site_group>
<id>2146909402</id>
<name>transparency-use-sg1</name>
<status>ACTIVE</status>
<tag>transparency-use-sg1</tag>
<metadata></metadata>
<description></description>
<external_id></external_id>
<updated_at>2014-09-04T00:36:53Z</updated_at>
<created_at>2014-09-04T00:36:43Z</created_at>
<session_duration>500</session_duration>
<links>
<link rel="self" href="/services/v4/site_groups/2146909402"></link>
<link rel="parent_site_groups" href="/services/v4/site_groups/2146909402/parent_site_groups"></link>
<link rel="child_site_groups" href="/services/v4/site_groups/2146909402/child_site_groups"></link>
<link rel="child_sites" href="/services/v4/site_groups/2146909402/child_sites"></link>
<link rel="child_site_sections" href="/services/v4/site_groups/2146909402/child_site_sections"></link>
</links>
</site_group>
</site_groups>
Show a Site Section [GET /site_sections/{site_section_id}]
Get a site section.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_section_id | Required | Integer | The site section identification |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Attributes (SiteSectionData)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_section>
<id>1859521</id>
<name>transparency-use-section4</name>
<status>ACTIVE</status>
<tag>taga</tag>
<metadata></metadata>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2014-09-04T00:36:52Z</updated_at>
<created_at>2014-09-04T00:36:49Z</created_at>
<links>
<link rel="self" href="/services/v4/site_sections/1859521"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/1859521/parent_site_groups"></link>
<link rel="parent_sites" href="/services/v4/site_sections/1859521/parent_sites"></link>
</links>
</site_section>
Add a Parent Site Group [PUT /site_sections/{id}/parent_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site section identification number |
site_group_id | Required | Integer | The parent site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Create a Site Section [POST /sites/{site_id}/site_sections]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_id | Required | Integer | The site identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"name": "name1",
"status": "Active",
"tag": "tag1",
"customized_metadata": {
"metadata1": "12123",
"metadata2": "21213"
},
"content_partner_ids": [
97755
],
"metadata": "some metadata",
"description": "some description",
"external_id": "1111111",
"updated_at": "2017-11-23T09:29:59Z",
"created_at": "2016-03-25T17:16:31Z",
"rating": "PG"
}
Response 200 (application/json)
Attributes (SiteSectionData)
Request XML
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_section>
<name>transparency-use-section4</name>
<status>ACTIVE</status>
<tag>taga</tag>
<customized_metadata>
<key_value>
<key>key_1</key>
<value>value_1</value>
</key_value>
<key_value>
<key>key_2</key>
<value>value_2</value>
</key_value>
</customized_metadata>
<metadata></metadata>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<description></description>
<rating>Unrated</rating>
<external_id></external_id>
<updated_at>2014-09-04T00:36:52Z</updated_at>
<created_at>2014-09-04T00:36:49Z</created_at>
<links>
<link rel="self" href="/services/v4/site_sections/1859521"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/1859521/parent_site_groups"></link>
</links>
</site_section>
Response 200 (application/xml)
Body
<site_section>
<id>1713673</id>
<name>transparency-use-section4</name>
<status>Active</status>
<tag>taga</tag>
<customized_metadata>
<key_value>
<key>key_1</key>
<value>value_1</value>
</key_value>
<key_value>
<key>key_2</key>
<value>value_2</value>
</key_value>
</customized_metadata>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<metadata></metadata>
<description>description</description>
<external_id></external_id>
<updated_at>2017-11-23T10:52:20Z</updated_at>
<created_at>2016-03-25T17:16:31Z</created_at>
<rating>Unrated</rating>
<site_id>581292</site_id>
<links>
<link rel="self" href="/services/v4/site_sections/1713673"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/1713673/parent_site_groups"></link>
</links>
</site_section>
Update a Site Section [PUT /site_sections/{site_section_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
site_section_id | Required | Integer | The site section identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"name": "name1",
"status": "Active",
"tag": "tag1",
"customized_metadata": {
"metadata1": "12123",
"metadata2": "21213"
},
"content_partner_ids": [
97755
],
"metadata": "some metadata",
"description": "some description",
"external_id": "1111111",
"updated_at": "2017-11-23T09:29:59Z",
"created_at": "2016-03-25T17:16:31Z",
"rating": "PG"
}
Response 200 (application/json)
Attributes (SiteSectionData)
Request XML
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
<site_section>
<id>1859521</id>
<name>transparency-use-section4</name>
<status>ACTIVE</status>
<tag>taga</tag>
<customized_metadata>
<key_value>
<key>key_1</key>
<value>value_1</value>
</key_value>
<key_value>
<key>key_2</key>
<value>value_2</value>
</key_value>
</customized_metadata>
<metadata></metadata>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<description></description>
<rating>Unrated</rating>
<site_id>581292</site_id>
<external_id></external_id>
<updated_at>2014-09-04T00:36:52Z</updated_at>
<created_at>2014-09-04T00:36:49Z</created_at>
<links>
<link rel="self" href="/services/v4/site_sections/1859521"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/1859521/parent_site_groups"></link>
</links>
</site_section>
Response 200 (application/xml)
Body
<site_section>
<id>1713673</id>
<name>transparency-use-section4</name>
<status>Active</status>
<tag>taga</tag>
<customized_metadata>
<key_value>
<key>key_1</key>
<value>value_1</value>
</key_value>
<key_value>
<key>key_2</key>
<value>value_2</value>
</key_value>
</customized_metadata>
<content_partner_ids>
<content_partner_id>97755</content_partner_id>
<content_partner_id>96749</content_partner_id>
</content_partner_ids>
<metadata></metadata>
<description>description</description>
<external_id></external_id>
<updated_at>2017-11-23T10:52:20Z</updated_at>
<created_at>2016-03-25T17:16:31Z</created_at>
<rating>Unrated</rating>
<site_id>581292</site_id>
<links>
<link rel="self" href="/services/v4/site_sections/1713673"></link>
<link rel="parent_site_groups" href="/services/v4/site_sections/1713673/parent_site_groups"></link>
</links>
</site_section>
Delete a Parent Site Group [DELETE /site_sections/{id}/parent_site_groups/{site_group_id}]
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site section identification number |
site_group_id | Required | Integer | The parent site group id |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Update Site Section And Parent Site Groups Relationship [PUT /site_sections/{id}/parent_site_groups]
It will replace current parent site groups with specified site groups in request body.
URI Parameter | Required? | Syntax | Description |
---|---|---|---|
id | Required | Integer | The site section identification number |
Request JSON
Headers
Content-Type: application/json
Accept: application/json
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Body
{
"items": [
{
"id": 2127048981
},
{
"id": 2127048881
}
]
}
Response 200 (application/json)
Request XML
Headers
Content-Type: application/xml
Accept: application/xml
Authorization: Bearer MY_OAUTH_ACCESS_TOKEN
Response 200 (application/xml)
Body
<site_groups>
<site_group>
<id>2127048981</id>
</site_group>
<site_group>
<id>2127048881</id>
</site_group>
</site_groups>
Updated 6 months ago