Skip to main content
Skip table of contents

POST /cxf/pri/v1/packagedassets

Asset packaging

The asset packaging APIs are used in some encoder integrations, like AWS MediaPackage, which requires an extra packaging step. We need the PRI client to send an HTTP POST request with a payload including all mandatory packaging requests fields (in particular the asset identifier (ID), pivot asset or harvested asset ID (source URI)) to the following URL:

http://<server>:<port>/<relative_path>/cxf/pri/v1/packagedassets 

Packaging request headers

Header

Type

Description

Required value

Accept

String

application/json

Yes

Content-Type

String

application/json

Yes

Packaging query parameters

The query parameters must be empty.

Body

Attribute

Type

Description

Always present

id

String

Public unique identifier of the packaged asset

Yes

name

String

The friendly name of the PackagedAsset, for display purposes

No

sourceUri

String

SourceUri represents the location of the pivot asset to be packaged.

Yes

priority

Integer

The priority of the PackagedAsset, 1 highest to 5 lowest

No

providerId

String

Identifier of the package requester

No

metadata

KeyValuePair

The metadata of the PackagedAsset

No

drm

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

packagingInfo

PackagingInfoTOType

Provides the packagingGroupId to be used to encrypt the playable packaged asset for the specified packaging formats. An entry without any packagingFormat value will be used for all formats for which no specific entry is provided.

No

PackagingInfoTOType

Attribute

Type

Description

Always present

packagingGroupId

String

Unique identifier of the packaging group

Yes

packagingFormat

String

The friendly name of the PackagedAsset, for display purposes

No

metadata

KeyValuePair

The metadata of the Packaging System

No

An example of a POST JSON payload:

CODE
{
   "id":"ltcu_eventp1",
   "sourceUri":"s3://s3.amazonaws.com/mediapackageBucket/GLOBAL_echpr01/",
   "deliveryURL":null,
   "metadata":[{"key":"destinationUri","value":"as3://s3.amazonaws.com/nagra-terminators-vod-output/videos/"}],
   "packagingInfo":[{"packagingGroupId":"PackagingGroup1","packagingFormat":"HLS","metadata":[]}] 
}

An example of a POST JSON payload with DRM details:

CODE
{
   "id":"ltcu_eventp1",
   "sourceUri":"s3://s3.amazonaws.com/mediapackageBucket/GLOBAL_echpr01/",
   "deliveryURL":null,
   "metadata":[{"key":"destinationUri","value":"as3://s3.amazonaws.com/nagra-terminators-vod-output/videos/"}],
   "drm":[{"drmId":"drmId1","packagingFormat":"HLS","metadata":[]}],
   "packagingInfo":[{"packagingGroupId":"PackagingGroup1","packagingFormat":"HLS","metadata":[]}]  
}

Packaging success response

An HTTP 201 response occurs when a packaged asset is created.

Parameter

Type

Description

Always present

id

String

Public unique identifier of the packaged asset

Yes

name

String

The friendly name of the CapturedAsset, for display purposes

No

sourceUri

String

SourceUri represents the location of the pivot asset to be packaged.

No

priority

Integer

The priority of the PackagedAsset, 1 highest to 5 lowest

No

status


The status of the PackagedAsset. The status is set by the recorder and cannot be set by a client request.

The supported values are: Scheduled, InProgress, Completed, Failed, Cancelled, Expired

Yes

providerId

String

Identifier of the package requester

No

deliveryURL

String

The delivery URL of the PackagedAsset. Access to the asset via this URL can only be guaranteed after the packaged asset status is "Completed".

Yes

metadata

KeyValuePair

The metadata of the PackagedAsset

No

created

dateTime

The date request to package the asset was accepted by the PRI server.

yyyy-MM-ddTHH:mm:ss.SSSZ

No

Drm

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

packagingInfo

PackagingInfoTOType

Provides the packagingGroupId to be used to encrypt the playable packaged asset for the specified packaging formats. An entry without any packagingFormat value will be used for all formats for which no specific entry is provided.

No


An example of a POST success response payload with DRM details:

CODE
{
   "id":"ltcu_eventp1",
   "sourceUri":"s3://s3.amazonaws.com/mediapackageBucket/GLOBAL_echpr01/",
   "status":"Completed"
   "deliveryURL":"deliveryURL",
   "created": "2014-11-06T14:39:57.007Z",
   "metadata":[{"key":"destinationUri","value":"as3://s3.amazonaws.com/nagra-terminators-vod-output/videos/"}],
   "drm":[{"drmId":"drmId1","packagingFormat":"HLS","metadata":[]}],
   "packagingInfo":[{"packagingGroupId":"PackagingGroup1","packagingFormat":"HLS","metadata":[]}]
}

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:

CODE
{
    "statusCode": "504",
    "statusMessage": "Internal Error ::Connection timed out to the Envivio Halo encoder::Connection refused"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.