Overview

The Changelog endpoint provides information regarding changes that have occurred on resources for both Media Manager and Station Manager. This endpoint returns all resources, and is not restricted to the objects to which you have access. Therefore, you will get a 404 for those resources to which you do not have access. 

Authorization

Requests to this endpoint must be made with a normal consumer. No special permissions are required.

The history of all resource types is listed here, regardless of the consumers permissions to a certain show or franchise.

Important note

Please be aware that the Changelog endpoint will return shows to which you have access and to which you do not have access. However, when you make a get request for an object (episode, asset, special, season) that is part of a show to which you do not have access, you will receive a 403 status code (access denied). 

Example

If you have access to Nature, but do not have access to Downton Abbey, the Changelog response will give you episodes from Nature and from Dowton Abbey. But when you try to make a get request to an episode from Downton Abbey, you will receive a 403 status code (access denied) because you do not have access to Downton. You can, however, make a request to a Nature episode because you have access to Nature. 

Endpoint

Base endpoint
https://media.services.pbs.org/api/v1/changelog/

Object Fields


Parameter nameTypeValueDescription
actionstringdelete, create, updateAction occurred on resource
sincestringFormat: %Y-%m-%dT%H:%M:%STimestamp of the action
typestring

asset, show, franchise, special, episode, season, collection, station 

Type of the resource
idstringCID for any of the resource typesCID of the resource

Example Requests

You can query the API and request all changelogs. This will return a paginated response containing 0 or 25 objects.

GET https://media.services.pbs.org/api/v1/changelog/

Filter by timestamp

Datetime format accepted: %Y-%m-%dT%H:%M:%S (Example: 2017-08-05T20:14:07.272507Z)

When filtering based on datetime, the endpoint does not support multiple since parameters.

GET https://media.services.pbs.org/api/v1/changelog/?since={datetime}
datetime format: 2017-10-25T20:14:07.272507Z

Filter by resource type

GET https://media.services.pbs.org/api/v1/changelog/?type={type}&type={type}

Filter by action

This endpoint can be queried to return all updated/deleted resources.

GET https://media.services.pbs.org/api/v1/changelog/?action={action}&action={action}


Filter by resource ID

GET https://media.services.pbs.org/api/v1/changelog/?id={id}&id={id}

Filter using multiple filters

GET https://media.services.pbs.org/api/v1/changelog/?type={type}&action={action}&action={action}&since={datetime}
datetime format: 2017-10-25T20:14:07.272507Z


Example Response 

Sample changelog response
{
    "meta": {
        "sort": {
			"timestamp": {
				"asc": "https://media.services.pbs.org/api/v1/changelog/?sort=timestamp",
				"desc": "https://media.services.pbs.org/api/v1/changelog/?sort=-timestamp"
			}
		},
		"filter": {
            "action": "https://media.services.pbs.org/api/v1/changelog/?action=",
            "since": "https://media.services.pbs.org/api/v1/changelog/?since=",
            "id": "https://media.services.pbs.org/api/v1/changelog/?id=",
            "type": "https://media.services.pbs.org/api/v1/changelog/?type="
        },
        "pagination": {
            "count": 312216,
            "per_page": 25
        },
        "type": "collection"
    },
    "links": {
        "prev": null,
        "first": "https://media.services.pbs.org/api/v1/changelog/?since=2017-08-01T20%3A14%3A07.272507Z",
        "last": "https://media.services.pbs.org/api/v1/changelog/?page=12489&since=2017-08-01T20%3A14%3A07.272507Z",
        "self": "https://media.services.pbs.org/api/v1/changelog/?since=2017-08-01T20:14:07.272507Z",
        "next": "https://media.services.pbs.org/api/v1/changelog/?page=2&since=2017-08-01T20%3A14%3A07.272507Z"
    },
    "jsonapi": {
        "version": "1.0"
    },
    "data": [
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:36:20.664330Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/157a4172-4bd6-4cd0-98ea-148a2bc840e4/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:36:20.650871Z"
            },
            "id": "157a4172-4bd6-4cd0-98ea-148a2bc840e4",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:36:02.779843Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/157a4172-4bd6-4cd0-98ea-148a2bc840e4/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:36:02.772719Z"
            },
            "id": "157a4172-4bd6-4cd0-98ea-148a2bc840e4",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/shows/b09c09b2-4f3e-4eb4-8f90-04c946286b9f/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:58.013829Z"
            },
            "id": "b09c09b2-4f3e-4eb4-8f90-04c946286b9f",
            "type": "show"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/83c9bc2d-2ec7-4ad5-8cc3-4eb31d6aa5e8/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:57.985864Z"
            },
            "id": "83c9bc2d-2ec7-4ad5-8cc3-4eb31d6aa5e8",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:34.935594Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/157a4172-4bd6-4cd0-98ea-148a2bc840e4/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:34.930026Z"
            },
            "id": "157a4172-4bd6-4cd0-98ea-148a2bc840e4",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/seasons/330a3ae9-9c20-4859-b453-bd871ea4c0c0/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:33.955141Z"
            },
            "id": "330a3ae9-9c20-4859-b453-bd871ea4c0c0",
            "type": "season"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/000a3ef1-e895-4f1e-b75a-4ac30f9dc55e/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:33.948864Z"
            },
            "id": "000a3ef1-e895-4f1e-b75a-4ac30f9dc55e",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:21.255922Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/157a4172-4bd6-4cd0-98ea-148a2bc840e4/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:21.242040Z"
            },
            "id": "157a4172-4bd6-4cd0-98ea-148a2bc840e4",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/000a3ef1-e895-4f1e-b75a-4ac30f9dc55e/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:18.852260Z"
            },
            "id": "000a3ef1-e895-4f1e-b75a-4ac30f9dc55e",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/17a1ca79-eef1-48d8-b7f0-15919ccc2728/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:18.836108Z"
            },
            "id": "17a1ca79-eef1-48d8-b7f0-15919ccc2728",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/seasons/330a3ae9-9c20-4859-b453-bd871ea4c0c0/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:18.597937Z"
            },
            "id": "330a3ae9-9c20-4859-b453-bd871ea4c0c0",
            "type": "season"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/000a3ef1-e895-4f1e-b75a-4ac30f9dc55e/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:18.594571Z"
            },
            "id": "000a3ef1-e895-4f1e-b75a-4ac30f9dc55e",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/seasons/330a3ae9-9c20-4859-b453-bd871ea4c0c0/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:07.195360Z"
            },
            "id": "330a3ae9-9c20-4859-b453-bd871ea4c0c0",
            "type": "season"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/a3761919-bb22-423d-96fc-6fdd2624c11e/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:07.187839Z"
            },
            "id": "a3761919-bb22-423d-96fc-6fdd2624c11e",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/seasons/330a3ae9-9c20-4859-b453-bd871ea4c0c0/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:05.186137Z"
            },
            "id": "330a3ae9-9c20-4859-b453-bd871ea4c0c0",
            "type": "season"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/71a2079f-def1-4c9a-98fe-b46df17d5742/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:05.175160Z"
            },
            "id": "71a2079f-def1-4c9a-98fe-b46df17d5742",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:03.231938Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/157a4172-4bd6-4cd0-98ea-148a2bc840e4/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:03.223926Z"
            },
            "id": "157a4172-4bd6-4cd0-98ea-148a2bc840e4",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:03.166374Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/assets/157a4172-4bd6-4cd0-98ea-148a2bc840e4/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:03.162612Z"
            },
            "id": "157a4172-4bd6-4cd0-98ea-148a2bc840e4",
            "type": "asset"
        },
        {
            "links": {
                "self": "https://media.services.pbs.org/api/v1/episodes/cced1427-4095-453a-ac1e-fc04df10ab4a/"
            },
            "attributes": {
                "action": "update",
                "timestamp": "2017-08-23T18:35:03.098681Z"
            },
            "id": "cced1427-4095-453a-ac1e-fc04df10ab4a",
            "type": "episode"
        }
    ]
}

FAQ


Yes. This can happen if a station receives access to some resources then that changes. For example, a consumer has access to shows x, y. All resources of show z will throw 403. If they later receive access to show z, all resources will return 200.

Yes, it can mean that it has been deleted or unpublished. If deleted, you should see a action in the response.