Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to use DELETE method in Qlik Sense REST API connection. When I am creating the data connection, it gives options for only GET and POST. Is there any way to use DELETE method in Qlik Sense ?
Looking forward to the replies!
Thanks and Regards,
Madhuparna Dhar
By default, the Qlik Sense Rest Connector doesn´t provide data manipulation, only read data:
"The Qlik REST Connector enables Qlik Sense and QlikView to efficiently load data into Qlik apps from a REST data source"
Hi,
you can't set up DELETE method directly in connection but you can override POST method using solution presented below (HTTPHEADER "X-HTTP-Method-Override" "DELETE", ).
I use it in scripts calling NPrinting API via Qlik RESTFull connector (look here if you are interested)
Let vDeleteUserURL = 'https://$(vNPrintingServer):4993/api/v1/users/'&'$(vUserId)';
Trace Deleting user: $(vDeleteUserURL);
LIB CONNECT TO '$(vConnection_POST)';
RestDeleteUserTable:
SQL SELECT
"__KEY_data"
FROM
JSON (wrap off) "data" PK "__KEY_data"
WITH
CONNECTION( URL "$(vDeleteUserURL)",
HTTPHEADER "Content-Type" "application/json",
HTTPHEADER "X-HTTP-Method-Override" "DELETE",
HTTPHEADER "cookie" "$(vCookie)")
;
Cheers
Lech
Thanks for you reply!
The name of this connector is wrong!
How can you name a connector "REST" and do not allow all the Representational State Transfer methods?
It should be called "only read REST".