Qlik Community

Ask a Question

Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
pedrobergo
Partner
Partner

Qix/datafiles parameters

Hi,

I'm asked how to delete 7,000 files automatically at this post: https://community.qlik.com/t5/Deployment-Management/How-delete-7-000-files-inside-SaaS-DataFiles-Fol.... The solution works great, but it just operate with Personal Space.

How can I operate with other spaces? Where I can find qix/datafiles parameters ?

Tks

Pedro 

Labels (1)
1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

Well, the API is private and therefore undocumented (and has the potential to change at any time).

But the param that you're looking for is top. So an example would be:

GET /api/v1/qix-datafiles?connectionId=8ccd4eb8-7ba8-4add-8297-26c3e16f2b85&top=10000

I would expect pagination to be a requirement for the API to go public and stable like the rest of the public and stable APIs on Qlik.dev: https://qlik.dev/apis/#rest

 

View solution in original post

5 Replies
Levi_Turner
Employee
Employee

Hey there,

The general flow would be something like:


GET /api/v1/spaces

-> Get the id element for the desired space

GET /api/v1/data-connections?space=<spaceId>

--> Get the id element for the return with qName = DataFiles

Example response:

        {
            "id": "8ccd4eb8-7ba8-4add-8297-26c3e16f2b85",
            "links": {
                "self": {
                    "href": "<removed>"
                }
            },
            "privileges": [
                "read"
            ],
            "qArchitecture": 0,
            "qConnectStatement": "CUSTOM CONNECT TO \"provider=qix-datafiles.exe;path=App Metadata QVDs:datafiles;\"",
            "qEngineObjectID": "8ccd4eb8-7ba8-4add-8297-26c3e16f2b85",
            "qID": "8ccd4eb8-7ba8-4add-8297-26c3e16f2b85",
            "qLogOn": 0,
            "qName": "DataFiles",
            "qType": "qix-datafiles.exe",
            "space": "5e3e045dcf6ae0000122ec7f"
    }


GET /api/v1/qix-datafiles?connectionId=<idFromPreviousStep>

pedrobergo
Partner
Partner
Author

Hi @Levi_Turner ,

It's almost that i'm looking for... I got a list with first 25 files in specified space, but is there possible to control the pagination response? Or is anyway to use a query parameter using wildcards or regex or anything else?

I miss the documentation for this api 😞

For example

Using Wildcards

"GET /api/v1/qix-datafiles?connectionId=195cb633-aed4-43ba-920e-bae6d76333f0&query=XXX*.qvd"

Using pagination:

"GET /api/v1/qix-datafiles?connectionId=195cb633-aed4-43ba-920e-bae6d76333f0&page=5 "

Can you show me how can do that?

Tks again,

Pedro

 

 

Levi_Turner
Employee
Employee

Well, the API is private and therefore undocumented (and has the potential to change at any time).

But the param that you're looking for is top. So an example would be:

GET /api/v1/qix-datafiles?connectionId=8ccd4eb8-7ba8-4add-8297-26c3e16f2b85&top=10000

I would expect pagination to be a requirement for the API to go public and stable like the rest of the public and stable APIs on Qlik.dev: https://qlik.dev/apis/#rest

 

View solution in original post

wwengso314
Contributor
Contributor

Hi, I followed the method above to delete the files in shared spaces, however, but the files are still in the shared spaces, I have tried to check the list using 'qlik raw get v1/qix-datafiles?connectionId={elementId}', the query listed down the files from personal space. What did I miss out? Thank you.

pedrobergo
Partner
Partner
Author

Hi @wwengso314 

To use a qlik-clik withing line commands (Powershell, CMD or Bash), follow this to use it:

qlik raw get v1/qix-datafiles --query connectionId=dataconnectionid,top=100000

The parameter --query is same that '?' and you need to use comma (,) to separate the parameters.

And if you are using inside Powershell, add the '| ConvertFrom-Json' at end of line to better see it.

[],

Pedro