POST /cxf/pri/v1/capturedassets
Asset capture
The PRI client will send an HTTP POST request with a payload including all mandatory captured requests fields (in particular the asset identifier (id), channel identifier (source id), event start and end dates) to the following URL:
http://<server>:<port>/<relative_path>/cxf/pri/v1/capturedassets
Request headers
Header | Type | Description | Required value |
---|---|---|---|
Accept | String | application/json | Yes |
Content-Type | String | application/json | Yes |
Query parameters
The query parameters must be empty.
Body
Attribute | Type | Description | Always present |
---|---|---|---|
| String | Public unique identifier of the captured asset | Yes |
| String | The friendly name of the CapturedAsset, for display purposes | No |
| String |
| Yes |
| dateTime | UTC timestamp of the start of the capture.
| Yes |
| dateTime | UTC timestamp of the end of the capture.
| Yes |
| Integer | The priority of the CapturedAsset, 1 highest to 5 lowest | No |
| String | Identifier of the capture requester | No |
| KeyValuePair | The metadata of the CapturedAsset
| No |
| Array | Provides the DRM details to be used to secure the playable packaged asset for each of the packaging formats. Encoder dependent – if the encoder has its own independent configuration for defining DRM IDs (normally identical to the live streams), this object does not need to be provided. | No |
An example of POST JSON payload:
{
"id": "4347",
"sourceId": "HitiOutput-158635176-53925-1406544832",
"captureStartDate": "2014-11-05T09:00:00.000Z",
"captureEndDate": "2014-11-05T09:20:00.000Z",
"metadata":[{"key":"destinationUri","value":"sample destination uri"}]
}
An example of POST JSON payload with DRM details:
{
"id": "4347",
"sourceId": "HitiOutput-158635176-53925-1406544832",
"captureStartDate": "2014-11-05T09:00:00.000Z",
"captureEndDate": "2014-11-05T09:20:00.000Z",
"Drm":[
{
"drmId":"123",
"packagingFormat":"HLS_2"
},
{
"drmId":"456",
"packagingFormat":"SS_2"
}
],
"metadata":[
{
"key":"destinationUri",
"value":"sample destination uri"
}
]
}
"metadata"
is dynamic and can include other important details.
Success response
An HTTP 201 response occurs when the captured asset is created.
Parameter | Type | Description | Always present |
---|---|---|---|
| String | Public unique identifier of the captured asset | Yes |
| String | The friendly name of the CapturedAsset, for display purposes | No |
| String |
| No |
| dateTime | UTC timestamp of the start of the start-over session
| No |
| dateTime | UTC timestamp of the start of the start-over session
| No |
| Integer | The priority of the CapturedAsset, 1 highest to 5 lowest | No |
| Enum | The status of the CapturedAsset. The status is set by the recorder and cannot be set by a client request. | Yes |
| String | Identifier of the capture requester | No |
| String | The delivery URL of the CapturedAsset. Access to the asset via this URL can only be guaranteed after the captured asset status is "Completed". | Yes |
| KeyValuePair | The metadata of the CapturedAsset, e.g.: <metadata> The PRI server (or adaptor) may supply | No |
| dateTime | The date when the request to capture the asset was accepted by the PRI server | No |
| DrmTOType | Provides the DRM details to be used to secure the playable packaged asset for each of the packaging formats. Encoder dependent – if the encoder has its own independent configuration for defining DRM IDs (normally identical to the live streams), this object does not need to be provided. | NO |
An example of POST success response payload with DRM details:
{
"id": "4347",
"sourceId": "HitiOutput-158635176-53925-1406544832",
"captureStartDate": "2014-11-05T09:00:00.000Z",
"captureEndDate": "2014-11-05T09:20:00.000Z",
"status": "Scheduled",
"deliveryURL": "https://123.125.186.12/assets/index-4357.m3u8",
"metadata": [
{
"key":"destinationUri"
"value":"/HitiOutput-158635176-53925-1406544832"
}
],
"created": "2014-11-06T14:39:57.007Z",
"Drm":[
{
"drmId":"123",
"packagingFormat":"HLS_2"
},
{
"drmId":"456",
"packagingFormat":"SS_2"
}
]
}
Error response
An HTTP 400 response occurs for a bad request.
An HTTP 500 response occurs when there is a PRI Adapter internal error (e.g., mandatory parameters are unspecified).
An HTTP 501 response occurs for method not implemented.
An HTTP 504 response occurs for encoder timeout.
An example error response for HTTP error code 504:
{
"statusCode": "504",
"statusMessage": "Internal Error ::Connection timed out to the Envivio Halo encoder::Connection refused"
}