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

Uploads a new file version to the existing asset attachment or a 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
File id Path yes Unique file id to upload the new version.
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.
Master file id can be found from path $.MasterFile.Id

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

Attachment id(s) can be found from path $.AttachedFiles..FileInfo..Id

...
    "AttachedFiles": [
            {
                "AttachmentType": "imagePNG",
                "FileInfo": {
                    "Id": "1070",
...

cURL example

curl --location --request POST 'https://EMMi instance]/papi/v1/file/upload/[File id]/image.png' \
--header 'x-auth-token: [Session token]' \
--header 'Content-Type: image/png' \
--data-binary '@/Downloads/robot.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