Once Status API Overview

Product(s)
SSAI
Role(s)
API Developer
Topic(s)
Notifications
Troubleshooting/Error Handling
VOD 2.0

This topic provides a guide to the Once Status API

Overview

The Status API is a RESTful API which allows customers to query the processing statuses of a particular Request ID (returned in the response body of an ingest request). Only the HTTP GET verb is supported and must be made over SSL. If you do not know the Request ID you can query by Foreign Key, which will return a list of all the Request IDs for that particular item. The status data returned will be summary of the major milestones along with any errors that occurred during processing.

Also see the Status API Reference.

API Base URL:

https://api.unicornmedia.com/status-api/

Checking a Job Status

Syntax:

https://api.unicornmedia.com/status-api/statuses/{referenceId}
https://api.unicornmedia.com/status-api/statuses?catalog={catalogId}&foreignKey={foreignKey}

Status Definitions:

Type Description
PENDING The activity or overall job has been received and scheduled in a queue
PROCESSING The activity or overall job is currently being processed. The overall status will remain in processing if any activity has not been completed.
SKIPPED The particular activity for the job was not configured or necessary for processing.
WARN A particular activity has failed that does not impact playback, but the overall job has succeeded. (e.g. timed text)
ERROR The activity or overall job has failed with an error. Any activity error will result in an overall job error.
COMPLETE The activity has completed successfully.

Example: Status API Job Requests

Request ID (GET):

https://api.unicornmedia.com/status-api/statuses/2796350e-2125-4f04-b33a-59488aaa76c7

Foreign Key & Catalog (GET):

https://api.unicornmedia.com/status-api/statuses?catalog=bc6cb7d4-be99-471b-adf3-7c501172b317&foreignKey=brightcove-once

Request header

Required HTTP Header:

X-BC-ONCE-API-KEY : {yourApiKey}

Response(s)

Body (Request ID)
{
"status": "COMPLETE",
"startTime": 1415648939000,
"completeTime": 1415649217000,
"steps": {
"ingest": {
    "name": "ingest",
    "status": "COMPLETE",
    "startTime": 1415648939000,
    "completeTime": 1415648942000,
    "input": {
        "foreignKey": "brightcove-once",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "keywords": {
            "brightcove",
                "once"
        },
        "metadata": {
            "accoundId": "12345",
            "company": "brightcove",
            "product": "once",
            "eventId": "321"
        },
        "media": {
            "sourceURL": "http://fileserver.com/trailer/trailer_1080p.mov"
        },
        "notifications": [],
        "publicationRules": [],
        "cuePoints": [
            {
                "valueIn": 10,
                "unit": "Seconds"
            }, {
                "valueIn": 25,
                "unit": "Seconds"
            }
        ]
    },
    "output": {
        "mediaItemId": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "hasChanged": true,
        "description": {
            "url": "http://fileserver.com/trailer/trailer_1080p.mov",
            "lastModified": "Wed, 07 May 2014 22:21:59 GMT",
            "etag": "\"b2f673c3426acf1:0\"",
            "fileSize": 60047891
        }
    }
},
"transcode": {
    "name": "transcode",
    "status": "COMPLETE",
    "startTime": 1415648968000,
    "completeTime": 1415649216000,
    "output": {
        "renditions": [
            "3345fa40-bbb6-11e3-87e6-005056835b09",
            "45dd911d-54ac-11e4-9f45-005056835b09",
            "8249c274-b49d-11e3-87e6-005056835b09",
            "824d3f86-b49d-11e3-87e6-005056835b09",
            "825072a0-b49d-11e3-87e6-005056835b09",
            "8253a884-b49d-11e3-87e6-005056835b09",
            "8256d34a-b49d-11e3-87e6-005056835b09",
            "825a2774-b49d-11e3-87e6-005056835b09",
            "825d7a04-b49d-11e3-87e6-005056835b09",
            "8260dd62-b49d-11e3-87e6-005056835b09",
            "d34d2cfb-3478-11e4-8b0b-005056835b09",
            "d34d2d07-3478-11e4-8b0b-005056835b09"
        ]
    }
},
"notification": {
    "name": "notification",
    "status": "COMPLETE",
    "startTime": 1415649020000,
    "completeTime": 1415649217000,
    "input": {
        "mediaItemId": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "version": 0,
        "durationMS": 87754,
        "notificationOverrides": []
    },
    "output": {
        "sentNotification": false
    }
},
"publish": {
    "name": "publish",
    "status": "COMPLETE",
    "startTime": 1415649217000,
    "completeTime": 1415649217000,
    "output": {
        "version": 0,
        "duration": 87754
    }
}
}
}

Body (Foreign Key & Catalog)

{
"requests": [
{
    "requestId": "2796350e-2125-4f04-b33a-59488aaa76c7",
    "startTime": 1412214761091,
    "href": "https://api.unicornmedia.com/status-api/statuses/2796350e-2125-4f04-b33a-59488aaa76c7"
},
{
    "requestId": "afa0b15e-1354-4348-8917-8185ef11c2cb",
    "startTime": 1412116933401,
    "href": "https://api.unicornmedia.com/status-api/statuses/afa0b15e-1354-4348-8917-8185ef11c2cb"
}
]
}

Check Notification Status DEPRECATED

Syntax:

https://api.unicornmedia.com/status-api/notifications/{requestId}

Status Definitions:

Type Description
PENDING The activity has been received and scheduled in a queue
PROCESSING The activity is currently being processed.
COMPLETE The activity has completed successfully.
FAILED The activity has encountered a problem and failed

Example: Notification Statuses

Request (GET):

https://api.unicornmedia.com/status-api/notifications/ 2796350e-2125-4f04-b33a-59488aaa76c7

Request header

Required HTTP Header:

X-BC-ONCE-API-KEY : {yourApiKey}

Response Body

{
"notifications": [{
"sentTime": 1416417989795,
"event": "ingest",
"id": "26",
"status": "COMPLETE",
"notification": {
    "notification": "ingest",
    "requestId": "2796350e-2125-4f04-b33a-59488aaa76c7",
    "mediaItem": {
        "id": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "foreignKey": "brightcove-once",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "title": "brightcove-once",
        "version": 0,
        "metadata": {}
    },
    "details": {
        "message": "Media Item Ingested."
    }
},
"targets": [
    "http://api-endpoint.com"
]
},
{
"sentTime": 1416516506046,
"event": "transcode",
"id": "77",
"status": "COMPLETE",
"notification": {
    "notification": "transcode",
    "requestId": "2796350e-2125-4f04-b33a-59488aaa76c7",
    "mediaItem": {
        "id": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "foreignKey": "brightcove-once",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "title": "brightcove-once",
        "version": 0,
        "metadata": {}
    },
    "details": {
        "message": "Rendition Transcoded.",
        "rendition": {
            "id": "3345fa40-bbb6-11e3-87e6-005056835b09",
            "name": "Once 3600 MP4 ZC 1280x720 96 29.97 H3_2"
        }
    }
},
"targets": [
    "http://api-endpoint.com"
]
},
{
"sentTime": 1416516513655,
"event": "transcode",
"id": "129",
"status": "COMPLETE",
"notification": {
    "notification": "transcode",
    "requestId": "2796350e-2125-4f04-b33a-59488aaa76c7",
    "mediaItem": {
        "id": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "foreignKey": "brightcove-once",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "title": "brightcove-once",
        "version": 0,
        "metadata": {}
    },
    "details": {
        "message": "Rendition Transcoded.",
        "rendition": {
            "id": "8260dd62-b49d-11e3-87e6-005056835b09",
            "name": "Once 2500 MP4 ZC 960x540 96 29.97 M3_1"
        }
    }
},
"targets": [
    "http://api-endpoint.com"
]
},
{
"sentTime": 1416516503504,
"event": "transcode",
"id": "132",
"status": "COMPLETE",
"notification": {
    "notification": "transcode",
    "requestId": "2796350e-2125-4f04-b33a-59488aaa76c7",
    "mediaItem": {
        "id": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "foreignKey": "brightcove-once",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "title": "brightcove-once",
        "version": 0,
        "metadata": {}
    },
    "details": {
        "message": "Rendition Transcoded.",
        "rendition": {
            "id": "825d7a04-b49d-11e3-87e6-005056835b09",
            "name": "Once 1900 MP4 ZC 960x540 96 29.97 M3_1"
        }
    }
},
"targets": [
    "http://api-endpoint.com"
]
}, {
"sentTime": 1416418159982,
"event": "publish",
"id": "151",
"status": "COMPLETE",
"notification": {
    "notification": "publish",
    "requestId": "2796350e-2125-4f04-b33a-59488aaa76c7",
    "mediaItem": {
        "id": "2d1d6fe7-6924-4d1d-ba06-d49b2d9f5f4b",
        "foreignKey": "brightcove-once",
        "domainId": "b207b479-c841-4095-8918-978be9e18dee",
        "catalogId": "bc6cb7d4-be99-471b-adf3-7c501172b317",
        "title": "brightcove-once",
        "version": 0,
        "metadata": {}
    },
    "details": {
        "message": "Media Item Published."
    }
},
"targets": [
    "http://api-endpoint.com"
]
}]
}

Resending Notifications

Syntax:

POST

https://api.unicornmedia.com/status-api/notifications/{requestId}/{notificationType}

https://api.unicornmedia.com/status-api/notifications/{requestId}/{notificationType}?id={event}

Example: Resending All Notifications by Type

Request

https://api.unicornmedia.com/status-api/notifications/2796350e-2125-4f04-b33a-59488aaa76c7/transcode

Request header

Required HTTP Header:

X-BC-ONCE-API-KEY : {yourApiKey}

Response Body

{
"transcode": [
{
    "id": "77",
    "submitted": true
},
{
    "id": "129",
    "submitted": true
},
{
    "id": "132",
    "submitted": true
}
]
}

Example: Resending a Single Notification from an Array

Request

https://api.unicornmedia.com/status-api/notifications/2796350e-2125-4f04-b33a-59488aaa76c7/transcode?id=77

Request header

Required HTTP Header:

X-BC-ONCE-API-KEY : {yourApiKey}

Response

{
"transcode": [
{
"id": "77",
"submitted": true
}
]
}