Request : POST /papi/v1/asset/[Asset id]/upload/[File name]

Uploads a file to a new version of the asset’s master file. This operation does not remove the existing file, it creates a new version.
The past versions of the files can be only modified and removed from the UI.

Parameter Parameter Type Mandatory Description
Asset id Path yes Unique asset id to upload the new master file.
File name Path yes Filename containing the extension.
File content Body yes Request body containing the file as a binary file.
x-auth-token Header yes The authentication token must be provided as a x-auth-token header for every api request.
More information about authentication token.

Response: JSON – Asset object.
The new masterfile id’s JSON path is: $.MasterFile.Id

...
        "MasterFile": {
             "Id": "1061",
             "Filename": "image",
...

cURL example

curl --location --request POST 'https://[EMMi instance]/papi/v1/asset/[Asset id]/upload/image.png' \
--header 'x-auth-token: [Session token]' \
--header 'Content-Type: image/png' \
--data-binary '@/Downloads/image.png'

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment