Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Not applicable

Import app example

Hey Everyone,

I'm trying to get started working with the Qlik API. I'm connecting using curl (through a groovy script).

So far I was able to run GET requests, but I've been running into issues when try to do an import through the API.

First I got an issue with the content type. The documentation says it should be a string but I got errors saying it expects a application/json and not text/plain

Now I'm having issues parsing the properties.

Can some give me an example of importing an app using the API?

1 Solution

Accepted Solutions
Not applicable

Re: Import app example

Thanks for your reply, but I figured it out.

Looks like the main issue was that the call needs to get a normal string, but is also expecting "Content-Type: application/json". Took me a lot of trial and error to get it right, but it works now.

curl -X POST

--cert "{certificate_location}"

--key "{certificate_key_location}"

-k

{server_url}/qrs/app/import?xrfkey=0123456789abcdef&name=test_import

--header "x-qlik-xrfkey: 0123456789abcdef"

--header "X-Qlik-User: UserDirectory=internal;UserId=sa_repository"

--header "Content-Type: application/json"

-d 'test.qvf'

2 Replies
konrad_mattheis
Contributor III

Re: Import app example

Hi,

i think curl is not the right tool to do that stuff.

bye

Konrad

Not applicable

Re: Import app example

Thanks for your reply, but I figured it out.

Looks like the main issue was that the call needs to get a normal string, but is also expecting "Content-Type: application/json". Took me a lot of trial and error to get it right, but it works now.

curl -X POST

--cert "{certificate_location}"

--key "{certificate_key_location}"

-k

{server_url}/qrs/app/import?xrfkey=0123456789abcdef&name=test_import

--header "x-qlik-xrfkey: 0123456789abcdef"

--header "X-Qlik-User: UserDirectory=internal;UserId=sa_repository"

--header "Content-Type: application/json"

-d 'test.qvf'

Community Browser