version 8.3.8

Back | 

AddImageAsset

URL

http://de.piksel.tech/ws/add_image_asset/mode/json/apiv/5.0?method=copy&
Use "request" param as post variable for submitting json/xml request payload for all COPY requests.

Parameters

  • filename => sourcefilename on ftp
    title => asset title
    description => asset description
    callbackurl => callback url to get notifications back. Needs to be url encoded
    tags => asset tags/keywords
    metadatas => array of metdatatas to be set for the given account using metaname as the key
    folders => Array of folder ids with which the asset needs to be associated
    referenceId => Alphanumeric id unique across given account and project.

Request

Ingest image 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_image_asset": {
      "title": "cdscds",
      "description": "description",
      "metadatas": {
        "metaname1": "metaname1value"
      },
      "tags": "",
      "referenceId": "dcsddsvdv",
      "callbackurl": "",
      "filename": "Penguin.jpg",
      "folders": [
        
      ]
    }
  }
}

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_image_asset": { "title": "cdscds", "description": "description", "metadatas": { "metaname1": "metaname1value" }, "tags": "", "referenceId": "dcsddsvdv", "callbackurl": "", "filename": "Penguin.jpg", "folders": [ ] } } }

Response

Response format

{
  "response": {
    "success": {
      "code": 501,
      "message": "Asset Saved\/Updated",
      "details": "assetid 5"
    },
    "addImageAssetResponse": {
      "assetid": 5,
      "title": "Matitle",
      "dateadd": "2014-10-28T18:57:51Z",
      "datemod": "2014-10-28T18:57:52Z",
      "description": "asdad",
      "tags": "tag tag tag ",
      "isActive": 1,
      "isHidden": 0,
      "geoFilterId": 0,
      "uuid": "dubstepUuid",
      "isPublished": 1,
      "date_start": "-0001-11-30T00:00:00Z",
      "date_end": "-0001-11-30T00:00:00Z",
      "youtubePublishable": 1,
      "referenceId": "qweqweZdSw123",
      "sourcefile_url": "\/thumbs\/aid\/w\/h\/t1414522672\/5.jpg?w=1024&h=768",
      "http_url": "\/thumbs\/aid\/w\/h\/t1414522672\/5.jpg?w=1024&h=768",
      "thumbnailUrl": "\/thumbs\/aid\/w\/h\/t1414522672\/5.jpg?w=1024&h=768",
      "thumbRel": "\/thumbs\/aid\/w\/h\/t1414522672\/5.jpg?w=1024&h=768",
      "assetType": "image",
      "asset_type": "image",
      "assetFiles": [
        {
          "class": "AssetFile",
          "assetfileid": 1,
          "datemod": "2014-10-28T18:57:51Z",
          "videoWidth": 1024,
          "videoHeight": 768,
          "filesize": 777835,
          "isReferenceFile": 0,
          "setAsAssociatedFile": 0,
          "isSymLink": 0,
          "full_cdn_path": "&assetid=5",
          "http_url": "&assetid=5",
          "aspectRatio": 1.33
        }
      ],
      "referenceFile": null,
      "associatedLinks": [
        
      ],
      "captions": [
        
      ],
      "AssociatedFiles": [
        
      ],
      "metadatas": {
        "Title": {
          "value": "one",
          "type": "text"
        },
        "Description": {
          "value": "two",
          "type": "textArea"
        }
      },
      "folders": [
        3,
        23
      ]
    }
  }
}