バージョン 7.8.2

Back | 

AddAsset

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

  • asset_type
  • title
  • description
  • tags
  • hidden
  • publish
  • youtube_publish
  • content_type
  • rating_scheme
  • rating_value
  • start_date
  • end_date
  • reference_id
  • is_remote_source
  • generated_thumbnail_count
  • thumbnail_files
  • metadatas

Request

Add a new asset. Usage: Submit a valid filename that exist's in the client's webdir. If title isn't specified, it is pulled from the filename Specify to generate thumbnails or pass a valid thumb filename. asset_type defaults to video. Only use graphic_file if the asset is a graphic or slide. Optionally specify the name of Asset Folder that the file should be placed into.
For Remote Source set is_remote_source to 1 and filename as the remote source file name. Remote source file only works for inegesting media (audio/video) files
Use either video_file,audio_file or graphic_file based on the type of file.
Bypass transcoding (transcode=0/false) wont work with this api version. Set transcode to true (not 1) for video/audio files.
media_properties is optional and can be ignored.
video_width and video_height are optional and can be ignored. Width and height will be set based on the transcoding profile. hidden, publish and youtube_publish are optional and can accept the values yes/no or true/false. start date and end date must be the timezone set within the account default asset and program timezone setting. content type, rating scheme and rating value are only required for Sony T2 integration. content type: movie, broadcast, trailer, song, concert, sporting event, ugc, news rating system: mpaa - NR, G, PG, PG-13, NC-17 | tvpg - NR, Y, Y7, G, PG, 14, MA

Request format

<?xml version="1.0" encoding="utf-8"?>
<add_asset>
  <asset_type></asset_type>
  <title></title>
  <description></description>
  <tags></tags>
  <hidden></hidden>
  <publish></publish>
  <youtube_publish></youtube_publish>
  <content_type></content_type>
  <rating_scheme></rating_scheme>
  <rating_value></rating_value>
  <start_date></start_date>
  <end_date></end_date>
  <reference_id></reference_id>
  <is_remote_source></is_remote_source>
  <generated_thumbnail_count></generated_thumbnail_count>
  <thumbnail_files>
    <filename></filename>
  </thumbnail_files>
  <metadatas>
    <metadata>
      <metaname></metaname>
      <type></type>
      <value></value>
    </metadata>
  </metadatas>
  <[--choice--]>
    <graphic_file>
      <filename></filename>
    </graphic_file>
    <slide_file>
      <filename></filename>
    </slide_file>
    <video_file>
      <transcode></transcode>
      <[--choice--]>
        <transcode_properties>
          <filename></filename>
          <profile_id></profile_id>
          <video_width></video_width>
          <video_height></video_height>
          <remove_existing_renditions></remove_existing_renditions>
          <callback_url></callback_url>
        </transcode_properties>
        <media_properties>
          <assetfile_filenames>
            <assetfile_filename></assetfile_filename>
          </assetfile_filenames>
        </media_properties>
      </[--choice--]>
    </video_file>
    <audio_file>
      <transcode></transcode>
      <[--choice--]>
        <transcode_properties>
          <filename></filename>
          <profile_id></profile_id>
          <video_width></video_width>
          <video_height></video_height>
          <remove_existing_renditions></remove_existing_renditions>
          <callback_url></callback_url>
        </transcode_properties>
        <media_properties>
          <assetfile_filenames>
            <assetfile_filename></assetfile_filename>
          </assetfile_filenames>
        </media_properties>
      </[--choice--]>
    </audio_file>
  </[--choice--]>
</add_asset>

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_asset> <asset_type></asset_type> <title></title> <description></description> <tags></tags> <hidden></hidden> <publish></publish> <youtube_publish></youtube_publish> <content_type></content_type> <rating_scheme></rating_scheme> <rating_value></rating_value> <start_date></start_date> <end_date></end_date> <reference_id></reference_id> <is_remote_source></is_remote_source> <generated_thumbnail_count></generated_thumbnail_count> <thumbnail_files> <filename></filename> </thumbnail_files> <metadatas> <metadata> <metaname></metaname> <type></type> <value></value> </metadata> </metadatas> <[--choice--]> <graphic_file> <filename></filename> </graphic_file> <slide_file> <filename></filename> </slide_file> <video_file> <transcode></transcode> <[--choice--]> <transcode_properties> <filename></filename> <profile_id></profile_id> <video_width></video_width> <video_height></video_height> <remove_existing_renditions></remove_existing_renditions> <callback_url></callback_url> </transcode_properties> <media_properties> <assetfile_filenames> <assetfile_filename></assetfile_filename> </assetfile_filenames> </media_properties> </[--choice--]> </video_file> <audio_file> <transcode></transcode> <[--choice--]> <transcode_properties> <filename></filename> <profile_id></profile_id> <video_width></video_width> <video_height></video_height> <remove_existing_renditions></remove_existing_renditions> <callback_url></callback_url> </transcode_properties> <media_properties> <assetfile_filenames> <assetfile_filename></assetfile_filename> </assetfile_filenames> </media_properties> </[--choice--]> </audio_file> </[--choice--]> </add_asset> </request>

Response

Response format

<?xml version="1.0" encoding="utf-8"?>
<add_asset_response>
  <[--choice--]>
    <success>
      <code></code>
      <message></message>
      <dtstamp></dtstamp>
    </success>
    <failure>
      <code></code>
      <reason></reason>
      <severity></severity>
      <dtstamp></dtstamp>
    </failure>
  </[--choice--]>
  <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>
</add_asset_response>