Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
rpc
I am struggling to create a POST connector to the NPrinting API in QlikSense. I have a working GET connector, but when I try to create a POST connector I get a 403 error.
============Extract From PDF ============================
From the
LIB CONNECT TO 'NPrinting REST Login (POST) (qtsel_gpr)';
RestNPReloadMetadataTable:
SQL SELECT
"__KEY_data"
FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "$(vReloadMetadataURL)", HTTPHEADER "cookie" "$(vCookie)");
[metadata_items]:
LOAD [__KEY_data] AS [__KEY_data]
RESIDENT RestNPReloadMetadataTable
WHERE NOT IsNull([__KEY_data]);
DROP TABLE RestNPReloadMetadataTable;
Notice how we needed to switch to the second Qlik Sense REST Connector that we configured at the beginning (see the “LIB CONNECT” instruction). This second connector uses the POST method which is needed to fire a metadata reload.
Once a “POST” connection is established we switched to the right API endpoint using the usual “WITH CONNECTION” trick. Notice how we used the dynamic URL contained in the “vReloadMetadataURL” variable that we created in the previous step.
If you take a look at the NPrinting Task Execution
======================================================
What am I missing?
Hi,
Did you already checked this post Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script?
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Hi,
Did you already checked this post Re: How to use Qlik NPrinting APIs inside a Qlik Sense load script?
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
That is what the PDF extract is from. GET is working nicely (to a point), but POST is a problem
Hi David,
From the link Ruggero mentioned - you need to go through steps to get a session cookie.... Basically try to follow steps as in this document.
Then you need to include this cookie in your POST body... else it will not work..
cheers
Lech
So a POST lib connect must follow a GET lib connect so that it has a cookie?
The document says it is a different connection. If it required the same cookie would it not be better to use a method override?
rpc can you advise on this?
Apologies guys. If I read the instructions properly it would have worked 🙂
I missed both the origin header and the NPrinting trusted origin configuration.
Connection successful now.
Thanks for the feedback 🙂
Best
Ruggero