Skip to main content
Skip table of contents

LoadAsset (interface v1.0.0)

Description

The goal of this API is to publish an asset in the publishing system or CDN.

The NAGRA CMS/CWM constructs a request message containing “SourceAssetURL”, “MetaData” and also “DestinationAsset”. It also constructs a default URL for the “DestinationAsset” and sends as part of the request message. The response message consists of a unique “TaskId” of the operation.

This value can be overridden by “DestinationAsset” value of GetTaskStatus response if the status is ‘SUCCESS’ and:

  • If third-party publishes at a different location than the URL provided as part of the request
  • In cases where third party CDNs does not disclose the published location of the asset then a unique identifier of the asset should be sent. The NAGRA CMS uses the same unique identifier while issuing any subsequent purge request.

Request

LoadAsset Xsd

Parameters

Name

Type

Description

SourceAssetUrl

xs:anyURI

URL of the source asset to publish into destination CDN.

The asset may be a single file (eg: *.ts) or a directory.

  • If the asset is a single file then the SourceAssetURL contains the complete path of the file e.g. ftp://user:password@CIS:21/repository/movie.ts
  • If the asset is a directory then the SourceAssetURL contains the path as follows:
    ftp://user:password@CIS:21/repository/

DestinationAsset

xs:string

Expected URL of where the asset should be published. However, the third party does not need to publish the asset on this location as long as an identifier for the asset or the location of the asset, if different, is sent back in the GetTaskStatus’s Response when the status is ‘SUCCESS’.

The asset may be a single file (eg: *.ts) or a directory.

  • If the asset is a single file then the DestinationAsset contains the complete path of the file e.g.
    ftp:// user:password@CDN:21/data/cdn/movie_01072015100045.ts
  • If the asset is a directory then the SourceAssetURL contains the path of the as follows:
    ftp://user:password@CDN:21/data/cdn/

MetaData

xs:MetaDataType

See MetaData details


Response

LoadAssetResponse Xsd

Parameters

Name

Type

                            Description

TaskId

xs:string

ID of the publishing job as created by the publishing system.
The format of the “TaskId” parameter is dependent on the publishing system.
This ID is used by the NAGRA CMS to query the status of the publishing Job.

 Fault

A third-party publishing server may throw any error which occurred during the execution of a publish job as a fault message. Below are a few examples for failure cases:

  • Source asset does not exist
  • Source asset URL not accessible
  • Any internal error which occurred during publish job execution

See Fault management for a fault response sample.

Samples

Use case

Request

CODE
<soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/>
    <soap:Body>
        <LoadAsset>
            <SourceAssetUrl>ftp://user:password@CIS:21/repository/movie.ts</SourceAssetUrl>
            <DestinationAsset>ftp://user:password@CDN:21/data/cdn/movie_01072015100045
            </DestinationAsset >
            <MetaData>
                <Property name=”AssetId”>LYS00001234</Property >
            </MetaData>
        </LoadAsset >
    </soap:Body>
</soap:Envelope>

Response

Success scenario

CODE
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <LoadAssetResponse>
            <TaskId>110E8400-E29B-11D4-A716-446655440000</TaskId>            
        </LoadAssetResponse >
    </soap:Body>
</soap:Envelope>

Failure scenario

CODE
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <soap:Fault>
            <faultcode>env:Server</faultcode>
            <faultstring>Source asset does not exist </faultstring>
            <detail>
                <ExceptionWS xmlns="wfm:APUBI/v1/schemas">
                    <message> Source asset does not exist </message>
                </ExceptionWS>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

The NAGRA Workflow Manager (WFM) expects the success response to be in the following format with a 200 OK HTTP status code. Fault messages should be returned with an HTTP error response code, for example, 400, 500, etc.

JavaScript errors detected

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

If this problem persists, please contact our support.