Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I try to use the Put request through postman to store an image into a media file:
curl "https://your-tenant.us.qlikcloud.com/api/v1/apps/{appId}/media/files/{path}" \
-X PUT \
-H "Authorization: Bearer <API-key>" \
-H "Content-type: application/octet-stream" \
--data-binary "@/path/to/file"
Link to the documentation here:
https://qlik.dev/apis/rest/apps#%23%2Fentries%2Fv1%2Fapps%2F-appId%2Fmedia%2Ffiles%2F-path-get
I'm blocked on a 415 error due to Unsupported Media Type. Not sure what i am doing wrong here. Any clue ?
Hey @OlivierS the API expects an octet-stream, so in postman the only way of doing this (that I'm aware of) is to select binary and select the file you wish to upload. At the moment you're just passing a string that the API doesn't know what to do with.
If you build your own app, then you have the flexibility to retrieve and stream the file when you make the API call, but I don't believe Postman has features to download and stream a file during an API call.