Version 7.8.2

Back | 

AddProgram

URL

medialize.stream.co.jp/services/index.php?
Use "request" param as post variable for submitting json/xml request payload for all POST requests.

Parameters

  • start_date
  • end_date
  • asset_id
  • publish
  • program_in
  • metadatas
  • categories
  • response_style

Request

Adds a new Program to the target Abstract Project, or Vod Project. PLEASE NOTE that if the client setting "Sync Asset Metadata to Program Metadata" is set to yes, then any data you provide will be overridden by the program's asset data. Usage: (abstract_project_id OR vod_project_id), start_date, end_date, asset_id are mandatory. Categories are mandatory if the project uses a category player. Metadata is optional

Request format

<?xml version="1.0" encoding="utf-8"?>
<add_program>
  <[--choice--]>
    <abstract_project_id></abstract_project_id>
    <vod_project_id></vod_project_id>
  </[--choice--]>
  <start_date></start_date>
  <end_date></end_date>
  <asset_id></asset_id>
  <publish></publish>
  <program_in></program_in>
  <metadatas>
    <metadata metaname="">
    </metadata>
  </metadatas>
  <categories>
    <category_id></category_id>
  </categories>
  <response_style>
    <short></short>
    <include_asset></include_asset>
    <include_assetfiles></include_assetfiles>
  </response_style>
</add_program>

Test Example

<?xml version="1.0" encoding="utf-8"?> <request> <authentication> <user_token></user_token> <client_token></client_token> <app_name></app_name> <app_token></app_token> </authentication> <header> <header_version></header_version> <api_version>4.0</api_version> <no_cache></no_cache> </header> <add_program> <[--choice--]> <abstract_project_id></abstract_project_id> <vod_project_id></vod_project_id> </[--choice--]> <start_date></start_date> <end_date></end_date> <asset_id></asset_id> <publish></publish> <program_in></program_in> <metadatas> <metadata metaname=""> </metadata> </metadatas> <categories> <category_id></category_id> </categories> <response_style> <short></short> <include_asset></include_asset> <include_assetfiles></include_assetfiles> </response_style> </add_program> </request>

Response

Response format

<?xml version="1.0" encoding="utf-8"?>
<add_program_response>
  <[--choice--]>
    <success>
      <code></code>
      <message></message>
      <dtstamp></dtstamp>
    </success>
    <failure>
      <code></code>
      <reason></reason>
      <severity></severity>
      <dtstamp></dtstamp>
    </failure>
  </[--choice--]>
  <[--choice--]>
    <program>
      <sortnum></sortnum>
      <uuid></uuid>
      <type></type>
      <start_date></start_date>
      <end_date></end_date>
      <thumbnail_url></thumbnail_url>
      <metadatas>
        <metadata display_name="" metaname="">
        </metadata>
      </metadatas>
      <categories sortnum="">
      </categories>
      <program_id></program_id>
      <vod_project_id></vod_project_id>
      <asset_id></asset_id>
      <date_added></date_added>
      <last_modified></last_modified>
      <thumbnail_id></thumbnail_id>
      <is_deleted></is_deleted>
      <asset>
        <title></title>
        <description></description>
        <asset_type></asset_type>
        <thumbnail_url></thumbnail_url>
        <media_folder></media_folder>
        <tags></tags>
        <metadatas>
          <metadata>
            <metaname></metaname>
            <type></type>
            <value></value>
          </metadata>
        </metadatas>
        <asset_id></asset_id>
        <client_id></client_id>
        <sourcefile></sourcefile>
        <date_added></date_added>
        <last_modified></last_modified>
        <default_thumb></default_thumb>
        <is_deleted></is_deleted>
        <folder_id></folder_id>
        <referenceid></referenceid>
        <assetfiles>
          <assetfile>
            <video_bitrate></video_bitrate>
            <audio_bitrate></audio_bitrate>
            <video_width></video_width>
            <video_height></video_height>
            <duration></duration>
            <http_url></http_url>
            <rtmp_url></rtmp_url>
            <rtmp>
              <protocol></protocol>
              <host></host>
              <stream></stream>
              <path></path>
            </rtmp>
            <asset_file_id></asset_file_id>
            <asset_id></asset_id>
            <filename></filename>
            <full_cdn_path></full_cdn_path>
            <date_modified></date_modified>
            <type></type>
            <path></path>
            <codec></codec>
            <filesize></filesize>
          </assetfile>
        </assetfiles>
      </asset>
      <chapters>
        <chapter>
          <title></title>
          <time></time>
          <chapter_id></chapter_id>
          <program_id></program_id>
        </chapter>
      </chapters>
    </program>
    <program_short id="">
      <sortnum></sortnum>
      <uuid></uuid>
      <type></type>
      <start_date></start_date>
      <end_date></end_date>
      <thumbnail_url></thumbnail_url>
      <metadatas>
        <metadata display_name="" metaname="">
        </metadata>
      </metadatas>
      <categories sortnum="">
      </categories>
      <[--choice--]>
        <asset_id></asset_id>
        <asset id="">
          <title></title>
          <description></description>
          <asset_type></asset_type>
          <thumbnail_url></thumbnail_url>
          <media_folder></media_folder>
          <tags></tags>
          <metadatas>
            <metadata>
              <metaname></metaname>
              <type></type>
              <value></value>
            </metadata>
          </metadatas>
          <assetfiles>
            <assetfile id="">
              <video_bitrate></video_bitrate>
              <audio_bitrate></audio_bitrate>
              <video_width></video_width>
              <video_height></video_height>
              <duration></duration>
              <http_url></http_url>
              <rtmp_url></rtmp_url>
              <rtmp>
                <protocol></protocol>
                <host></host>
                <stream></stream>
                <path></path>
              </rtmp>
            </assetfile>
          </assetfiles>
        </asset>
        <chapters>
          <chapter id="">
            <title></title>
            <time></time>
          </chapter>
        </chapters>
      </[--choice--]>
    </program_short>
  </[--choice--]>
</add_program_response>