Web Service-Based Automation

The recommended way to implement an automated video publishing process is to use the Content Engine's web service. This web service allows you to interact with the Content Engine by sending HTTP requests to the web service. For a description of the web service and how to use it in general, see the Escenic Content Engine Integration Guide. The web service allows an external process to perform most of the operations that end users can perform from Content Studio. In this case the objective is to create a video/audio content item, which involves the following steps:

  1. Get the web service URI for the publication/section to which the content item is to be added (see http://documentation.escenic.com/ece-integration-guide/5.6/navigate_the_section_hierarchy.html).

  2. Make an XML document containing all the information required to create the required content item and upload it to the correct URI. This is described in general terms here: http://documentation.escenic.com/ece-integration-guide/5.6/add_a_content_item.html.

When you are creating a video/audio content item, the content of the VDF payload described in http://documentation.escenic.com/ece-integration-guide/5.6/add_a_content_item.html must:

  • Have a structure that matches the video/audio content type for your publication

  • Contain correctly structured JSON data in the content item's video/audio field that specifies the URI and MIME type of the video/audio to be published

The following example shows a VDF payload for creating a video content item, based on the content type example given in Defining an External Video Content Type:

<vdf:payload xmlns:vdf="http://www.escenic.com/types" model="http://my-content-engine/webservice/publication/my-publication/escenic/model/external-video">
  <vdf:field name="title">
    <vdf:value>My First Video</vdf:value>
  </vdf:field>
  <vdf:field name="video">
    <vdf:value>
      { "master" : { "uri" : "http://my-video-server/video1.mpeg", "mime-type" : "video/mpeg"}}
    </vdf:value>
  </vdf:field>
</vdf:payload>

Here is another example which shows a VDF payload for creating an audio content item, based on the content type example given in Defining an External Audio Content Type:

<vdf:payload xmlns:vdf="http://www.escenic.com/types" model="http://my-content-engine/webservice/publication/my-publication/escenic/model/external-audio">
  <vdf:field name="title">
    <vdf:value>My First Audio</vdf:value>
  </vdf:field>
  <vdf:field name="audio">
    <vdf:value>
      { "master" : { "uri" : "http://my-audio-server/audio1.mp3", "mime-type" : "audio/mp3"}}
    </vdf:value>
  </vdf:field>
</vdf:payload>