Skip to content

Movida Resource: Publication

cavalle edited this page Oct 5, 2012 · 23 revisions

NOT IN PRODUCTION YET

Introduction

A Publication is the resource that represents the fact that a Scheduling's metadata has been (or wants to be) published in its platform.

A published Publication looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<publication>
  <id type="integer">33</id>
  <success type="boolean">true</success>
  <action>publish</action>
  <published-at type="datetime">2008-10-01T00:00:00+01:00</published-at>
  <payload>
  <![CDATA[
  <?xml version="1.0" encoding="UTF-8"?>
  <adi:ADI2 xmlns="http://www.cablelabs.com/2006-05-05/Shared" ...>
    <adi:AddMetadataAsset type="Title" product="VOD" groupProviderID="orange.com" ...>
      ...
    </adi:AddMetadataAsset>
  </adi:ADI2>
  ]]>
  </payload>
  <link href="http://movida.example.com/api/publication/33" rel="self"/>
  <link href="http://movida.example.com/api/schedulings/14" rel="scheduling"/>
</publication>

GET a list of all Publications of a Scheduling

Publications are accessed via the Scheduling they are related to, as in the example below, through the link identified by the rel="publications" attribute:

<?xml version='1.0' encoding='utf-8' ?>
<scheduling>
  <id type='integer'>23816</id>
  <put-up type='datetime'>2010-04-01T00:00:00Z</put-up>
  <take-down type='datetime'>2010-06-01T21:59:59Z</take-down>
  <!-- ... -->
  <link href="https://movida.example.com/api/schedulings/23816/publications" rel="publications"></link>
</scheduling>

If we follow that link, we'll fetch the list of all the publications of that asset.

$ curl --digest -u roboot_user:password https://movida.example.com/api/schedulings/23816/publications
<?xml version="1.0" encoding="UTF-8"?>
<publications type="array">
  <publication>
    <id type="integer">33</id>
    <success type="boolean">false</success>
    <action>publish</action>
    <published-at type="datetime">2008-10-01T00:00:00+01:00</published-at>
    <payload><!-- ... --></payload>
    <link href="http://movida.example.com/api/publication/33" rel="self"/>
    <link href="http://movida.example.com/api/schedulings/14" rel="scheduling"/>
  </publication>
  <publication>
    <id type="integer">34</id>
    <success type="boolean">true</success>
    <action>publish</action>
    <published-at type="datetime">2008-10-02T00:00:00+01:00</published-at>
    <payload><!-- ... --></payload>
    <link href="http://movida.example.com/api/publication/34" rel="self"/>
    <link href="http://movida.example.com/api/schedulings/14" rel="scheduling"/>
  </publication>
<publications>
Clone this wiki locally