versión 8.3.8

Back | 

WsAsset

URL

http://de.piksel.tech/ws/ws_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

  • apiv=>The api version; only version 5 supported
  • assetid => Asset id of the asset to be copied
  • new_params => List of new params to be added to the copy or copies
  • accountID => String or array of account ids in which to send the copy or copies. The accounts must be associated to the user of the API token and must be either a sibling or child account of the account associated to the API token.
  • title => Assigned to the copy or copies. If not provided then the title of the asset being copied will be the default for the copy or copies
  • description => Assigned to the copy or copies. If not provided then the description of the asset being copied will be the default for the copy or copies
  • metadatas => Assigned to the copy or copies. If not provided then the custom metadata of the asset being copied will be the default for the copy or copies. NOTE: Any new custom metadata that is provided must have the identical custom metadata defined in all accounts the copy or copies are being sent.
  • tags => Assigned to the copy or copies. If not provided then the tags of the asset being copied will be the default for the copy or copies
  • referenceId => Assigned to the copy or copies. It must be unique within each account the copy or copies are sent.
  • folders => Array of folder ids in which to send the copy or copies of the asset being copies. NOTE: The folders must be associated to user of the API token.

Request

Copy an asset

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
    },
    "ws_asset": {
      "assetid": "",
      "new_params": {
        "accountID": "",
        "title": "",
        "description": "",
        "metadatas": {
          "metaname1": "metaname1value"
        },
        "tags": "",
        "referenceId": "",
        "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 }, "ws_asset": { "assetid": "", "new_params": { "accountID": "", "title": "", "description": "", "metadatas": { "metaname1": "metaname1value" }, "tags": "", "referenceId": "", "folders": [ "", "" ] } } } }

Response

Response format

{
  "response": {
    "success": {
      "code": 554,
      "message": "Asset Copied",
      "details": "1 copy created."
    },
    "wsAssetResponse": {
      "copiedAssets": [
        {
          "assetid": 1036566,
          "title": "Copy Asset Example Title",
          "dateadd": "2014-11-18T17:56:46Z",
          "datemod": "2014-11-18T17:57:03Z",
          "description": "Copy Asset Example Description",
          "tags": "copy, example",
          "isActive": 1,
          "isHidden": 0,
          "geoFilterId": 0,
          "uuid": "gk8piqii",
          "isPublished": 1,
          "date_start": "2014-10-10T14:58:00Z",
          "date_end": "2026-10-10T14:58:00Z",
          "youtubePublishable": 1,
          "thumbnailUrl": "http:\/\/ec2-174-129-101-142.compute-1.amazonaws.com\/thumbs\/aid\/w\/h\/t1416333423\/1036566.jpg",
          "thumbRel": "\/thumbs\/aid\/w\/h\/t1416333423\/1036566.jpg",
          "assetType": "video",
          "asset_type": "video",
          "metadatas": {
            "subtitle": {
              "value": "Copy Asset Example Metadata",
              "type": "text"
            },
            "time_to_remove": {
              "value": "2014-11-29 15:30:00",
              "type": "datetime"
            }
          },
          "folders": [
            4768
          ]
        }
      ]
    }
  }
}