Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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'

View solution in original post

2 Replies
konrad_mattheis
Partner - Creator III
Partner - Creator III

Hi,

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

bye

Konrad

Not applicable
Author

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'