version 8.3.8

Back | 

AddFileAsset

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 on ftp
    title=>asset title
    description=>asset descriptioncallbackurl=>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 metanme as the key
    folders => Array of folderids with which the asset needs to be associated
    from the begining of 100 seconds length
    referenceId=>alphanumeric id unique across given account and project.

Request

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

Response

Response format

{
  "response": {
    "success": {
      "code": 501,
      "message": "Asset Saved\/Updated",
      "details": "assetid 5"
    },
    "addFileAssetResponse": {
      "assetid": 5,
      "title": "Matitle",
      "dateadd": "2014-11-03T17:45:52Z",
      "datemod": "2014-11-03T17:45:52Z",
      "description": "asdad",
      "tags": "tag tag tag ",
      "isActive": 1,
      "uuid": "dubstepUuid",
      "isPublished": 1,
      "date_start": "-0001-11-30T00:00:00Z",
      "date_end": "-0001-11-30T00:00:00Z",
      "youtubePublishable": 1,
      "referenceId": "qweqweZdSw123",
      "assetType": "binary",
      "asset_type": "binary",
      "metadatas": {
        "Title": {
          "value": "one",
          "type": "text"
        },
        "Description": {
          "value": "two",
          "type": "textArea"
        }
      },
      "folders": [
        3,
        23
      ]
    }
  }
}