MRSS Feed Data

Push API

Syndicated CMS data for a brand (i.e. “MRSS feed”-data) can be POST’d to Bakery at https://<bakery-host>/mrssfeed/<brand-name>, where <bakery-host> is an existing Bakery environment (i.e. bakery.dev.cbsivideo.com) and <brand-name> is the human-readable name of the brand for this catalog, such as paramount-plus or BET+.

The caller must also include a X-Fastbreak-Mrss-Token header. The value of this can be obtained from MediaCore team.

The POST body is the raw RSS feed-data in XML format.

cURL Example:

curl 'https://bakery.dev.cbsivideo.com/mrssfeed/example-brand' \
--header 'X-Fastbreak-Mrss-Token: <Token-Goes-Here>' \
--header 'Content-Type: application/xml' \
--data '@/Path/To/Some/File/example_mrss_feed.xml'

Pull API

Automatic feed-data pulls can also be configured by POSTing a Feed-Configuration for a brand to https://<bakery-host>/api/v1/global, where <bakery-host> is an existing Bakery environment (i.e. bakery.dev.cbsivideo.com).

By adjusting pagination parameters, configurations can be setup in “backfill” mode, i.e. all records until the beginning of the feed are fetched, or “real-time” mode, where records are fetched until no were records are found. Pagination can also be configured to paginate via “next” links in the XML, or by using pagination parameters.

In order to access the API, the request must include a JWT Bearer- token. (The value of this can be obtained from MediaCore team.)

Feed Configuration Object

The Feed Configuration JSON object is used to define the settings for MRSS feed-ingestion into the Bakery service. Below is the detailed structure of the Feed Configuration JSON:

Name Type Required Description
ID integer yes unique auto-generated record-ID
brand_name string yes unique brand-name associated with feed (i.e. “BET+”, “paramount-plus”, etc.)
feed_name string yes unique feed-name
feed_uri string yes URI of feed-endpoint to pull from
pagination_supported bool no (default false) indicates whether pagination is support for this feed
pull_frequency_sec integer no (default 0) frequency in seconds at which feed should be refreshed
pagination_params Pagination Params object yes pagination parameters used for fetching the feed

Pagination Params Object

Name Type Required Description
limit string no query parameter-name for the limit
offset_base integer no the starting point (offset) for the feed-pull
offset_multiplier integer no the value by which to scale/multiply the offset
offset_param string no query parameter name for the offset (i.e. “startIndex”)
stop_when_caughtup bool no if true, stop fetching when caught up with the latest items
update_offset_base bool no if true, update the offset base after each fetch
next_from_feed string no pull the next page for the feed from this URL –
typically this is created with the same value as feed_uri,
but updated programmatically from the “next” link in RSS-feed XML

Example: Create configuration to pull latest catalog data (“real-time” mode):

curl --location 'https://bakery.dev.cbsivideo.com/api/v1/global-config' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJiYWtlcnkiLCJncm91cHMiOltdLCJpYXQiOjE2NjQzODU5OTIsImV4cCI6MTY2NDQwMDM5MiwiaXNzIjoiQ0JTLVZURyJ9.AQ378IQjJAzRbch0HBQAP2eDPLAgl2xKFz97SHCHL7gd-3wJ93D-VlZ9OiDs3B4_QpBF3E82OOVPdhcrm72eAK8Uep_YhyYm90nxrmHwoUEcECJu-2VRxjcmXDiUviAfJIeJyiMKun0wG4prKq98k_imGbedqCNor1mfnnncqaUsk-PlnUYRexcbYTwwP6wJ61La2TLf8sYeH-1qb4TEXzdA7eEglrLJYStDX1rUDTMx509ra4K58W4w3HTYH3WjlFpuxv3YecbKWmkcBAsqvxblDy3Yn8difO0u1VHkoWBd-8Lj95s1qp08Zm-Y8f0PtV7FZ13FRGXYVl7r0xS4ug' \
--data '{
    "name": "feed_config_FakeBrand_realtime",
    "jsonb_value": {
        "brand_name": "Fakebrand",
        "feed_name": "FakeBrand Realtime",
        "feed_uri": "https://fakebrand.cbs.com/some/feed",
        "pagination_params": {
            "limit": 100,
            "limit_param": "count",
            "offset_base": 0,
            "offset_multiplier": 100,
            "offset_param": "startIndex",
            "stop_when_caughtup": true,
            "update_offset_base": false
        },
        "pagination_supported": true,
        "pull_frequency_sec": 0
    }
}'

Example: Create configuration to backfill entire catalog (“backfill” mode):

curl 'https://bakery.dev.cbsivideo.com/api/v1/global-config' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <b64 Bearer Token Goes Here>' \
--data 'curl 'https://bakery.dev.cbsivideo.com/api/v1/global-config' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <b64 Bearer Token Goes Here>' \
--data '{
    "brand_name": "AnotherBrand",
    "feed_uri":"https://another.feed.cbs.com/feed",
    "feed_name":"Another Feed",
    "pagination_params":{
        "limit":100,
        "limit_param":"count",
        "offset_base":0,
        "offset_param":"startIndex",
        "next_from_feed":"https://another.feed.cbs.com/feed",
        "offset_multiplier":100,
        "stop_when_caughtup":false,
        "update_offset_base":false
    },
    "pull_frequency_sec":0,
    "pagination_supported":true
}'