Brand Recognition

Brand-Recognitions are configurable database objects which associate aspects of a FastBreak HTTP request with the brand that request is targeting (i.e. BET+, P+). Clients perform CRUD operations on Brand-Recognition objects via API endpoint <bakery-host>/api/v1/brand-recognition, using the standard REST/HTTP methods: GET, PUT, POST, DELETE

Multiple Brand-Recognition objects can exist for a given brand. Each object targets one of: a query-parameter, a header, or the hostname specified in the X-Forwarded-Host/X-Forwarded header.

Brand Recognition Object

Name Type Required Description
ID integer yes unique auto-generated record-ID
brand_name string yes unique brand-name (i.e. paramount-plus, BET+) in MRSS feed configurations
match_type string yes what aspect of the HTTP request to match one – one of header, query_param, or hostname
match_name string yes (for header or query_param match_type) name of header or query-parameter to match
match_value string yes header, query-parameter, or hostname value to match – may include wilcards

Example Usages

Create Brand-Recognition BET+ brand which matches on “hostname”

# request
curl -X POST 'https://bakery.dev.cbsivideo.com/api/v1/brand-recognition' \
--header 'Content-Type: application/json' 
--header 'Authorization: <<Bearer Token>>'
--data '{
    "brand_name": "BET+",
    "match_type": "hostname",
    "match_value": "bet.bakery.cbsivideo.com"
}'

# response
{
    "id": 1,
    "brand_name": "BET+",
    "match_type": "hostname",
    "match_name": "",
    "match_value": "bet.bakery.cbsivideo.com"
}

Fetch existing Brand-Recognitions

# request
curl -X GET 'https://bakery.dev.cbsivideo.com/api/v1/brand-recognition?name_prefix=&page=0&page_size=1000' \
--header 'Content-Type: application/json'
--header 'Authorization: <<Bearer Token>>'

# response
[
    {
        "id": 1,
        "brand_name": "BET+",
        "match_type": "hostname",
        "match_name": "",
        "match_value": "bet.bakery.cbsivideo.com"
    }
]

Modify Brand-Recognition for BET+ to match on query-parameter “hostname”

# request
curl -X PUT 'https://bakery.dev.cbsivideo.com/api/v1/brand-recognition/1' \
--header 'Content-Type: application/json'
--header 'Authorization: <<Bearer Token>>
--data '{
    "brand_name": "BET+",
    "match_type": "query_param",
    "match_value": "bet.bakery.cbsivideo.com"
}'

# response
{
    "id": 1,
    "brand_name": "BET+",
    "match_type": "query_param",
    "match_name": "",
    "match_value": "bet.bakery.cbsivideo.com"
}

Delete Brand-Recognition by ID

# request
curl -X DELETE 'https://bakery.dev.cbsivideo.com/api/v1/brand-recognition/1' \
--header 'Content-Type: application/json'
--header 'Authorization: <<Bearer Token>>

# response
{
    "id": 1,
    "brand_name": "BET+",
    "match_type": "query_param",
    "match_name": "",
    "match_value": "bet.bakery.cbsivideo.com"
}