versión 8.3.8

Back | 

AddMediaAsset

URL

de.piksel.tech/services/index.php?&mode=json
Use "request" param as post variable for submitting json/xml request payload for all POST requests.

Request Headers

Name

Parameters

  • filename=>sourcefilename.Needs to be url encoded.Needs to be http/https url when source is set to remote source.Remote url needs to base64 encoded. /br>enableTranscode=>flag (true/false) to enable transcode
    transcoderProfileId=>Valid if enableTranscode is set.
    title=>asset title
    description=>asset description
    generate_thumb_count=>number of thumbanils to be generated. Cannot be more than 100.
    callbackurl=>callback url to get notifications back. Needs to be url encoded
    tags=>asset tags/keywords
    isRemoteSource=>Determines if the source file is remote
    isPublished=>isPublished flag (true/false) for the asset
    isHidden=>isHidden flag (true/false) for the asset
    date_start=>start date for the asset. Needs to be in T-Z format. All dates must be in UTC
    date_end=>end date for the asset. Needs to be in T-Z format. All dates must be in UTC
    metadatas=>array of metdatatas to be set for the given account using metanme as the key
    folders => Array of folderids with which the asset needs to be associated
    adavanceTranscoderSetting->startTime => this is only valid when transcoding is enabled and is optional. This is time in seconds to start the transcoding for the given media file. So if its set to 10 transcoding will begin 10 seconds in to the media file
    adavanceTranscoderSetting->clipDuration=> this is only valid when transcoding is enabled and startTime is set and is optional. This is the duration in seconds (clip length) from startTime for the output renditions. So if the startTime is set to 10 and clipDuration is set to 100 for a 300 second media file the output rendition will have media that starts from 10 seconds from the begining of 100 seconds length
    referenceId=>alphanumeric id unique across given client and project.

Request

Ingest media asset into a particular account.

Request format

{
  "request": {
    "authentication": {
      "app_token": "#app_token#",
      "client_token": "#client_token#",
      "user_token": "#user_token#"
    },
    "header": {
      "header_version": 1,
      "api_version": "5",
      "no_cache": true
    },
    "add_media_asset": {
      "title": "cdscds",
      "description": "description",
      "date_start": "2014-03-05T13:15:30Z",
      "date_end": "2024-11-05T13:15:30Z",
      "metadatas": {
        "metaname1": "metaname1value"
      },
      "thumbnails": [
        {
          "isRemoteSource": 0,
          "thumbnail": "xyz.jpg",
          "setAsDefault": 1,
          "setAsPoster": 1
        },
        {
          "isRemoteSource": 1,
          "thumbnail": "http:\/\/example.com\/xyz.jpg",
          "setAsDefault": 0,
          "setAsPoster": 0
        }
      ],
      "isHidden": 1,
      "isPublished": 1,
      "youtubePublishable": true,
      "tags": "",
      "generate_thumb_count": 5,
      "referenceId": "dcsddsvdv",
      "callbackurl": "",
      "enableTranscode": 0,
      "transcoderProfileId": 152,
      "filename": "file_name_bypass_transcoding.flv",
      "isRemoteSource": true,
      "geoFilterId": 500,
      "folders": [
        
      ],
      "advanceTranscoderSetting": {
        "startTime": 0,
        "clipDuration": 90
      }
    }
  }
}

Test Example

{ "request": { "authentication": { "app_token": "#app_token#", "client_token": "#client_token#", "user_token": "#user_token#" }, "header": { "header_version": 1, "api_version": "5", "no_cache": true }, "add_media_asset": { "title": "cdscds", "description": "description", "date_start": "2014-03-05T13:15:30Z", "date_end": "2024-11-05T13:15:30Z", "metadatas": { "metaname1": "metaname1value" }, "thumbnails": [ { "isRemoteSource": 0, "thumbnail": "xyz.jpg", "setAsDefault": 1, "setAsPoster": 1 }, { "isRemoteSource": 1, "thumbnail": "http:\/\/example.com\/xyz.jpg", "setAsDefault": 0, "setAsPoster": 0 } ], "isHidden": 1, "isPublished": 1, "youtubePublishable": true, "tags": "", "generate_thumb_count": 5, "referenceId": "dcsddsvdv", "callbackurl": "", "enableTranscode": 0, "transcoderProfileId": 152, "filename": "file_name_bypass_transcoding.flv", "isRemoteSource": true, "geoFilterId": 500, "folders": [ "42", "78" ], "advanceTranscoderSetting": { "startTime": 0, "clipDuration": 90 } } } }

Response

Response format

{
  "response": {
    "success": {
      "code": 205,
      "message": "AssetFound",
      "details": ""
    },
    "addMediaAssetResponse": {
      "assetid": 980457,
      "title": "FishBaitBallinOpenWater",
      "dateadd": "2012-04-30T17: 52: 41Z",
      "datemod": "2012-04-30T17: 55: 25Z",
      "defaultThumb": "3388204",
      "description": "",
      "tags": "",
      "isActive": 1,
      "isHidden": 0,
      "posterThumb": "",
      "geoFilterId": 0,
      "uuid": "1a747376",
      "isPublished": 1,
      "date_start": "-0001-11-30T00: 00: 00Z",
      "date_end": "-0001-11-30T00: 00: 00Z",
      "youtubePublishable": 1,
      "thumbnailUrl": "http: \/\/player-qa.multicastmedia.com\/thumbs\/aid\/w\/h\/t1335808525\/980457.jpg",
      "thumbRel": "\/thumbs\/aid\/w\/h\/t1335808525\/980457.jpg",
      "assetType": "video",
      "asset_type": "video",
      "assetFiles": [
        
      ],
      "m3u8iPadURL": "",
      "m3u8iPhoneURL": "",
      "m3u8AndroidURL": "",
      "httpSmil": "",
      "hdSmil": "",
      "rtmpSmil": "",
      "associatedLinks": [
        
      ],
      "captions": [
        
      ],
      "AssociatedFiles": [
        
      ],
      "metadatas": {
        "metaname1": {
          "0": "",
          "value": "metanme1value",
          "type": "text"
        }
      },
      "folders": [
        "42",
        "78"
      ]
    }
  }
}