Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik users,
I am relatively new to Qlik and trying to develop a POC.
My requirement is to post a user data file to Qlik account - call the REST end point -https://your-tenant.us.qlikcloud.com/api/v1/data-files via Java and see the file appear in the Data option in my account .
When I try the end point via postman getting the error -Request must have 'name' specified while posting new file . Adding my request screen -
Response :
Also I tried via calling this with Rest Template - but getting 308 . A sample to make this request successfully would be much appreciated and useful for me . Also an explanation of what the variables in BOLD should be which is given in the developer portal -
'{"name":"MyFile.csv","appId":"f34b91a1-0dc3-44ac-a847-51cb84122c84","connectionId":"ee6a390c-5d33-11e8-9c2d-fa7ae01bbebc","sourceId":"f34b91a1-0dc3-44ac-a847-51cb84122c84","tempContentFileId":"624b0f54459f1c00018dade4"}'
this post should probably be moved to another section (has nothing to do with Qlik Application Automation) but i would still like to comment on it.
I myself tried this yesterday when I saw this API endpoint. I get the same error message that the request must contain a 'name' parameter (400 - Bad request). I use postman and I believe the request should be ok;
curl --location --request POST "https://xxxxxxx.eu.qlikcloud.com/api/v1/data-files" \
--header "Content-Type: multipart/form-data" \
--header "Authorization: Bearer xxxxxxxxxxxx" \
--form "name=\"testFromAPI.csv\"" \
--form "connectionId=\"9ee38f4f-bedf-44f2-aeba-8c29d82eef5\"" \
--form "file=@\"/C:/xxxxxxx/testFromAPI.csv\""