Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chrislemm
Partner - Contributor III
Partner - Contributor III

REST Connector with PUT, DELETE etc.

Hello,

I want to know if I can use PUT, DELETE, GET, HEAD in the Qlik Sense REST connector? I can choose between the following protocols in Qlik Sense:

Methods in Qlik Sense REST ConnectorMethods in Qlik Sense REST Connector

The Qlik Sense API for example provides many REST Endpoints we can communicate with. For example:

"DELETE  /qrs/user/{id}",

"PUT     /qrs/app/{id}/publish?stream={streamid}&name={name}",

How can I call such an request (using the mentioned protocols) in Qlik Sense?

Greetings

Labels (5)
5 Replies
SergeyNazarkin
Contributor II
Contributor II

You have found a way to solve the problem?

chrislemm
Partner - Contributor III
Partner - Contributor III
Author

Sadly no.

No one replied to this thread.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, you need to use "With connection" script function. In other words you only need to configure 2 connections (GET and POST connections) in QlikSense. Once you have POST connection configured you can then use following syntax for PUT (note how I have HTTPHEADER "X-HTTP-Method-Override" "PUT" added to parameters. This will allow to override method used with this call. Same applies to DELETE method 

SQL SELECT
                        "__KEY_data"
                    FROM 
                        JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "here put your LIB connection", BODY "here put your body",
HTTPHEADER "X-HTTP-Method-Override" "PUT", 
HTTPHEADER "Content-Type" "application/json"
;
 
I am using this approach in my NPrinting.qvs library to GET,POST,PUT and DELETE records using QlikView or QlikSense load script with rest connector. Full library is here: https://nprintingadventures.com/
 
hope this helps
cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
StevenJDH
Employee
Employee

Hello, currently only GET and POST verb methods are supported in the REST connector. There is one approach where you can add an additional header attribute called X-HTTP-METHOD-OVERRIDE with the value you are trying to use such as PUT, DELETE, HEAD to override the verb method selected in the REST connector, but X-HTTP-METHOD-OVERRIDE is only currently supported in NPrinting and not Qlik Sense. You can find more information here https://support.qlik.com/articles/000092526.

In either case, there are feature requests currently open for both issues above, so I recommend contacting support and referencing that article so they can use your case to add more weight to those requests.