Skip to main content
Skip table of contents

CreateEncodingJob (interface v1.0.1)

Description

The goal of this interface is to create and start an encoding or packaging job in the encoding system.

Once finished (status “CANCELLED”, “FAILED”, or “SUCCESS”), the encoding job must be accessible using GetEncodingJobStatus for at least 24 hours. The encoder is responsible for purging all finished encoding jobs after 24 hours.

The encoder is responsible for purging all temporary files created during the encoding process once the encoding job is finished (“CANCELLED”, “FAILED”, or “SUCCESS”).

The Metadata element in the CreateEncodingJob request is optional. Depending on the context, the key/value pairs will vary.

Request

A snippet of the CreateEncodingJob schema:

CODE
<xs:element name="CreateEncodingJob">
     <xs:complexType>
          <xs:sequence>
                <xs:element name="SourceAssetUrl" type="xs:anyURI"/>
                <xs:element name="DestinationRepositoryUrl" type="xs:anyURI"/>
                <xs:element name="ProfileId" type="xs:string"/>
                <xs:element name="DrmContent" type="DrmContentType" minOccurs="0"/>
                <xs:element name="DrmList" type="DrmListType" minOccurs="0"/>
                <xs:element name="Metadata" type="MetadataType" minOccurs="0"   maxOccurs="unbounded"/>
          </xs:sequence>
     </xs:complexType>
</xs:element>

Parameters

Name

Type

Description

SourceAssetUrl

xs:anyURI

URL of the source asset to encode

DestinationRepositoryUrl

xs:anyURI

URL of the destination repository where the encoded asset will be placed

ProfileId

xs:string

ID of the encoding profile to use

The format of the ProfileId parameter is dependent on the encoding system.

DrmContent

DrmContentType

Deprecated: Defines the DRM encryption details of the content. Used for non-JITP encoder integrations.

It has three parameters:

  • drmContentId
  • profile
  • metadata

DrmList

DrmListType

The list of addressed DRM system and its required metadata.

It supports the following parameters:

  • drmSystemId
  • drmName
  • packagingProfileName
  • drmMetadata

Metadata

MetadataType

Any metadata required for the encoding request. Metadata is a key/value pair.

Response

A snippet of the CreateEncodingJobResponse schema:

CODE
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="wfm:EncoderControlAPI/v1/schemas" targetNamespace="wfm:EncoderControlAPI/v1/schemas" elementFormDefault="qualified"
      attributeFormDefault="unqualified">
      <xs:element name="CreateEncodingJobResponse">
              <xs:complexType>
                     <xs:sequence>
                          <xs:element name="EncodingJobId" type="xs:string"/>
                     </xs:sequence>
              </xs:complexType>
      </xs:element>
</xs:schema>

Parameters

Name

Type

Description

EncodingJobId

xs:string

The ID of the encoding job as created by the encoding system

The format of the EncodingJobId parameter is dependent on the encoding system.

Fault

A fault message will be returned in the following cases:

  • Source asset does not exist or is not accessible.
  • Destination URL is not accessible.
  • Profile ID does not exist.
  • drmContentId or DrmList is missing (only in case of profile with encryption).

See Fault management for a fault response sample.

Samples

Encoding request

Sample request

CODE
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CreateEncodingJob xmlns="wfm:EncoderControlAPI/v1/schemas">
    <SourceAssetUrl>ftp://user:password@host/temp/assetname/</SourceAssetUrl>
    <DestinationRepositoryUrl>http://baseurl/temp/path/</DestinationRepositoryUrl>
    <ProfileId>EncoderProfileId</ProfileId>
    <Metadata>
        <key>editorialContentName</key>
        <value>Test Name</value>
    </Metadata>
    <Metadata>
        <key>sourceAssetType</key>
        <value>Pivot</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceEndPoint</key>
        <value>http://host:port/encoder/vod/</value>
    </Metadata>
    <Metadata>
        <key>editorialContentId</key>
        <value>TEST123</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceId</key>
        <value>CDN</value>
    </Metadata>
    <Metadata>
        <key>sourceAssetDeviceLinkType</key>
        <value>source</value>
    </Metadata>
    <Metadata>
        <key>jobType</key>
        <value>Encoding</value>
    </Metadata>
</CreateEncodingJob>
</soap:Body>
</soap:Envelope>

Sample response

The NAGRA Workflow Manager (WFM) expects the success response to be in the following format with a 200 OK HTTP status code.
CODE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
        <CreateEncodingJobResponse xmlns="wfm:EncoderControlAPI/v1/schemas" >
               <EncodingJobId>110E8400-E29B-11D4-A716-446655449999</EncodingJobId>
        </CreateEncodingJobResponse>
   </soapenv:Body>
</soapenv:Envelope>

Example of expected result

Packaging request in clear

Sample request

CODE
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CreateEncodingJob xmlns="wfm:EncoderControlAPI/v1/schemas">
    <SourceAssetUrl>ftp://user:password@host/temp/assetname/</SourceAssetUrl>
    <DestinationRepositoryUrl>http://baseurl/temp/path/</DestinationRepositoryUrl>
    <ProfileId>HLS</ProfileId>
    <Metadata>
        <key>editorialContentName</key>
        <value>Test Name</value>
    </Metadata>
    <Metadata>
        <key>technicalContentName</key>
        <value>Test technical name</value>
    </Metadata>
    <Metadata>
        <key>technicalContentId</key>
        <value>TEST_VERSION</value>
    </Metadata>
    <Metadata>
        <key>editorialContentId</key>
        <value>TEST123</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceId</key>
        <value>CDN</value>
    </Metadata>
    <Metadata>
        <key>sourceAssetDeviceLinkType</key>
        <value>source</value>
    </Metadata>
    <Metadata>
        <key>jobType</key>
        <value>Encoding</value>
    </Metadata>
</CreateEncodingJob>
</soap:Body>
</soap:Envelope>

Sample response

The NAGRA Workflow Manager (WFM) expects the success response to be in the following format with 200 OK HTTP status code.
CODE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <CreateEncodingJobResponse xmlns="wfm:EncoderControlAPI/v1/schemas" >
               <EncodingJobId>110E8400-E29B-11D4-A716-446655449999</EncodingJobId>
        </CreateEncodingJobResponse>
    </soapenv:Body>
</soapenv:Envelope>

Packaging request in case of encryption

Note:

  • drmName represents drmContentId or drmResourceId.
  • packagingProfileName represents the ID of the encoder profile, and is the same as profileId.
  • drmSystemId is optional and is sent in the request only when configured on the DRM device.
CODE
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CreateEncodingJob xmlns="wfm:EncoderControlAPI/v1/schemas">    
<SourceAssetUrl>ftp://atemevod:atemevod@172.28.4.65/TEMP/TEST_MAIN/</SourceAssetUrl>    
<DestinationRepositoryUrl>ftp://atemevod:atemevod@172.28.4.65/TEMP/</DestinationRepositoryUrl>
     <ProfileId>DASH</ProfileId>
     <DrmList>
         <drm>
              <drmName>drmtest123</drmName>
              <packagingProfileName>DASH</packagingProfileName>
              <drmSystemId>94ce86fb-07ff-4f43-adb8-93d2fa968ca2</drmSystemId>
         </drm>
    </DrmList>
    <Metadata>
        <key>technicalContentName</key>
        <value>TEST_VERSION_DASH</value>
    </Metadata>
    <Metadata>
        <key>editorialContentName</key>
        <value>TEST_MAIN</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceEndPoint</key>
        <value>ftp://host:password@ipaddress/TEMP/</value>
    </Metadata>
    <Metadata>
        <key>editorialContentId</key>
        <value>TEST_MAIN</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceId</key>
        <value>CDN</value>
    </Metadata>
    <Metadata>
        <key>sourceAssetDeviceLinkType</key>
        <value>source</value>
    </Metadata>
    <Metadata>
        <key>jobType</key>
        <value>Encoding</value>
    </Metadata>
    <Metadata>
        <key>destinationAssetDeviceLinkType</key>
        <value>destination</value>
    </Metadata>
    <Metadata>
        <key>technicalContentId</key>
        <value>TEST_VERSION_DASH</value>
    </Metadata>
</CreateEncodingJob>
</soap:Body>
</soap:Envelope>

Packaging request for multiple encryption formats in case of JITP

CODE
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CreateEncodingJob xmlns="wfm:EncoderControlAPI/v1/schemas">    
<SourceAssetUrl>ftp://atemevod:atemevod@172.28.4.65/TEMP/TEST_MAIN/</SourceAssetUrl>    
<DestinationRepositoryUrl>ftp://atemevod:atemevod@172.28.4.65/TEMP/</DestinationRepositoryUrl>
     <ProfileId>HLS;DASH</ProfileId>
     <DrmList>
         <drm>
              <drmName>drmtestHLS123</drmName>
              <packagingProfileName>HLS</packagingProfileName>
              <drmSystemId>94ce86fb-07ff-4f43-adb8-93d2fa968ca2</drmSystemId>
         </drm>
         <drm>
              <drmName>drmtestDASH123</drmName>
              <packagingProfileName>DASH</packagingProfileName>
              <drmSystemId>89lj890u-hjdf-yue8-auio-93dowm968ca2</drmSystemId>
         </drm>
    </DrmList>
    <Metadata>
        <key>editorialContentName</key>
        <value>TEST_MAIN</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceEndPoint</key>
        <value>ftp://host:password@ipaddress/TEMP/</value>
    </Metadata>
    <Metadata>
        <key>editorialContentId</key>
        <value>TEST_MAIN</value>
    </Metadata>
    <Metadata>
        <key>destinationDeviceId</key>
        <value>CDN</value>
    </Metadata>
    <Metadata>
        <key>sourceAssetDeviceLinkType</key>
        <value>source</value>
    </Metadata>
    <Metadata>
        <key>jobType</key>
        <value>Encoding</value>
    </Metadata>
    <Metadata>
        <key>destinationAssetDeviceLinkType</key>
        <value>destination</value>
    </Metadata>
</CreateEncodingJob>
</soap:Body>
</soap:Envelope>

Example of expected result




JavaScript errors detected

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

If this problem persists, please contact our support.