eapowertools-archive / qsaas

Unsupported - A wrapper for the Qlik Sense Enterprise SaaS APIs.
GNU General Public License v3.0
12 stars 0 forks source link

Upload a file to DataFiles #3

Closed egononega closed 3 years ago

egononega commented 3 years ago

Hi, In the example 'Upload a file to DataFiles' you have "connectionId": conn_id, what is conn_id? and If I remove connectionId it will upload fine, but when I delete the item and later try to upload the same file im getting: 'Conflict attempting to call PostDataFile file with name: xtestdata.csv, spaceId: , appId: . File already exists' File is not visible in Qlik anymore.

I know this is not this wrapper fault but I am curious if you know if im doing something wrong. I only delete the Item maybe i need to delete the file somewhere.

thx

danielpilla commented 3 years ago

Hi @egononega, First and foremost, this is a private and experimental API, so it is subject to change and not supported. That said, you can get a list of all data connections by executing q.get('qix-datafiles/connections) and then you can grab the appropriate id of the connection for where you want to store the file.

Example response:

{'id': '8ccd4eb8-7ba8-4add-8297-26c3e16f2b85', 'name': 'DataFiles', 'type': 'qix-datafiles.exe', 'connectStatement': 'CUSTOM CONNECT TO "provider=qix-datafiles.exe;path=Data - App Metadata QVDs:datafiles;"', 'spaceId': '5e3e045dcf6ae0000122ec7f'}

As far as leaving the connectionId absent, it should place the file under the current user's Personal DataFiles connection.

Cheers,