ParentTV REST API (1.2.1)

Download OpenAPI specification:Download

ParentTV's REST API provides access to our catalogue of videos, courses and blog posts.

For license details, terms and conditions, please refer to your organisation's contract with ParentTV.

Authentication

BearerAuth

This is the authentication scheme to use when accessing the API overall.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

BasicAuth

This is the scheme to use when requesting a bearer token.

Security Scheme Type HTTP
HTTP Authorization Scheme basic

authentication

Get an auth token for use with secured calls.

Authorizations:

Responses

Request samples

curl -X POST\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/auth"

Response samples

Content type
application/json
{
  • "status": "ok",
  • "user": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJub3QiOiJyZWxldmFudCIsIm1lc3NhZ2UiOiJuaWNlIGludmVzdGlnYXRpb24gdGhvdWdoLiJ9.5jV_S60gSgK3bDvxxXsPqjAFXVO0L2_nG4DHzMEhdeg",
  • "errors": [
    ]
}

videos

List videos.

Note: if your token is not valid or does not contain appropriate permissions, videos will still be listed but will not contain a valid video ID for embedding. These records will also be marked restricted.

Authorizations:
BearerAuth (videos)
query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/videos?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/videos/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single video

Authorizations:
BearerAuth (videos)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/videos/1234"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

public_videos

List videos marked as public

query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/public-videos?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/public-videos/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single video

Authorizations:
BearerAuth (public_videos)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/public-videos/1234"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

children_videos

List videos marked as 'for children'

Note: if your token is not valid or does not contain appropriate permissions, videos will still be listed but will not contain a valid video ID for embedding. These records will also be marked restricted.

Authorizations:
BearerAuth (children_videos)
query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/children_videos?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/children_videos/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single video

Authorizations:
BearerAuth (children_videos)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/children_videos/1234"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

experts

List experts

Authorizations:
BearerAuth (experts)
query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/experts?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/courses/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single expert

Authorizations:
BearerAuth (experts)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/experts/1234"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

courses

List courses

Authorizations:
BearerAuth (courses)
query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/courses?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/courses/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single course

Authorizations:
BearerAuth (courses)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/courses/1234"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

activities

List activities

Authorizations:
BearerAuth (activities)
query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/activities?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/activities/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single activity

Authorizations:
BearerAuth (activities)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

posts

List posts

Authorizations:
BearerAuth (posts)
query Parameters
page
integer
Default: 1
Example: page=1

Current page of the collection.

per_page
integer
Default: 10
Example: per_page=10

Maximum number of items to be returned in result set.

s
string
Example: s=some search phrase

Limit response to results which match a full text search of this value.

after
string <datetime>

Limit response to results published after a given ISO8601 compliant date.

before
string <datetime>

Limit response to results published before a given ISO8601 compliant date.

exclude
string

Ensure result set excludes specific IDs.

include
Array of strings

Limit result set to specific IDs.

include_type
Array of strings

Include other types of content in the resultset which meet the same criteria.

offset
integer

Offset the result set by a specific number of items.

order
string
Default: "desc"

Order sort attribute ascending or descending. ['asc' | 'desc']

orderby
string
Default: "date"

Sort collection by object attribute. [ 'author' | 'date' | 'id' | 'include' | 'modified' | 'parent' | 'relevance' | 'slug' | 'include_slugs' | 'title' ]

slug
string

Limit result set to a single match with a specific slug value.

status
string
Default: "publish"
Enum: "publish" "draft"

Limit result set to results assigned one or more statuses.

topic
string

Limit result set to items assigned to the given topic slug.

categories_exclude
Array of strings

Limit result set to all items except those that have the specified term assigned in the categories taxonomy.

tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/posts?slug=some-title-slug"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}

List available topics for this content type

query Parameters
tags
Array of integers

Limit result set to all items that have the specified tag ids assigned.

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/posts/topics?terms[]=2&terms[]=1324"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "data_type": "videos",
  • "end": 10,
  • "start": 0,
  • "total": 26,
  • "status": "ok"
}

Get a single blog post

Authorizations:
BearerAuth (posts)
path Parameters
id
required
integer
Example: 1

The ID of the item being requested

Responses

Request samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://api.production.parenttv.com/ptv/posts/1234"

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "end": 0,
  • "start": 0,
  • "data_type": "string",
  • "status": "ok"
}