My requirement is to create Data connections in QLIK of type S3 for which I need to make use of QLIK API for automation. I am not able to form the payload properly for this requirement. Getting 400 errors (BAD request error).
Note: I am able to list all the data connections in QLIK using QLIK API.
I am following QLIK API documentation which is: https://qlik.dev/apis/rest/data-connections/#post-v1-data-connections I am passing all the required parameters which are:
"qName":"<qname>",
"qType":"QvWebStorageProviderConnectorPackage.exe",
"space":"<space-id>",
"qLogOn":"1",
"qPassword":"<IAM user's secret key>",
"qUsername":"<IAM user's access key>",
"datasourceID":"File_AmazonS3Connector",
"qArchitecture":0,
"qConnectStatement":'CUSTOM CONNECT TO "provider=QvWebStorageProviderConnectorPackage.exe;sourceType=File_AmazonS3Connector;region=us-east-1;bucketName=<bucket-name>;storeSseHeader=<bucket-name>;separateCredentials=false;"',
"qSeparateCredentials":false
I validated the above payload with JSON. But when trying to make API calls to QLIK using curl, I am getting BAD request errors. I am very new to QLIK. I am using POST/PUT method for this.
Here is how I am making the API call:
curl "https://your-tenant.us.qlikcloud.com/api/v1/data-connections/" -X POST -H "Authorization: Bearer <access-token>" -d "{my-payload}"
Even the documentation of QLIK API isn't that clear. May be there is an issue with qConnectStatement. Please help in forming the payload for creating Data connection of type S3. Please let me know If I am missing any parameter too.
1 Answer 1
Have you tried the example posted here: https://qlik.dev/examples/manage-examples/data-connection-create/ ?