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: 
Anonymous
Not applicable

POST Data using REST Connector

Hello Community,

I am trying to POST data in from Qlik (sense or view) in BDD using REST connector.

When I enter the url, the authorisation token , and the format, and press "TEST CONNECTION", I create my lines in the BDD.

But when I want to "CREATE" the connection I have an error.

I would like to create every new customer.

Any idea?

Labels (1)
24 Replies
agni_gold
Specialist III
Specialist III

Hi,

How you are connecting to qliksense app and posting filters on the app using POSTMAN, can you please tell me some steps, i am trying but it is not happening.

Thanks,

vinothkumarr
Partner - Contributor II
Partner - Contributor II

Hi Steve,

 

The information you provided is really useful and I could see to a level but i got stuck up in a place.

I am passing the HTTPHeader "Cookie" "<Cookie I received>"

It's throwing me a string error because my cookie is in the below format and contain " " in it which is recognized as the condition is closed as per qlik's statment. Also another issue that whenever a symbol or delimiter is available in the cookie Qlik is not considering and throwing me the error from the string where the delimiter starts.

Example: /YBpAQAAAAAAAAAAAAAu8P2AaQEAACwBC/ from the below cookie.

Cookie :  pajpm1-test="1QINAC7w/YBpAQAAAAAAAAAAAAAu8P2AaQEAACwBC/bPfLdV7BxxK8cTVP+6Xwx9zug="

Could you please help to rectify the same and get my code working.

Thanks in Advance,

Vinoth

 

vinothkumarr
Partner - Contributor II
Partner - Contributor II

Hi Steve,

 

If i remove the "" I am receiving 'HTTPHeader' Expected 'CloseBracket' error.

 

Regards,

Vinoth

pascal_theurot
Partner - Creator II
Partner - Creator II

Hi Steve,

Which format do you have for you variable $(vRequestBody) ?

I'm not able to use it as it's always misinterpreted. I've tried many syntaxes.

syntax displayed during reloadtime (looks good) :

 

RestConnectorMasterTable:
SQL SELECT 
	"subjectId",
	"resourceId",
	"schemaPath",
	"__KEY_matrix",
	(SELECT 
		"access",
		"__FK_audit"
	FROM "audit" FK "__FK_audit")
FROM JSON (wrap off) "matrix" PK "__KEY_matrix"
WITH CONNECTION (
     BODY "{"resourceType" : "App.Object","resourceRef" : {"resourceFilter" : ""},
                "subjectRef" : {
                               "resourceFilter" : ""},
                "actions" : 46,
                "environmentAttributes" : "undefined",
                "resourceProperties" : ["name"],
                "subjectProperties" : ["id", "name", "userId", "userDirectory"],
                "auditLimit" : 100000,
                "outputObjectsPrivileges" : 4
}"
    )

but I get the following error message (seems to be partially interpreted and truncated) :

Connector reply error: Unknown substring, string, or value at (12,28): 
'.Object","resourceRef" : {"resource'

We'll, if you have some suceedeed method, it could help.

Regards

Pascal

 

Pascal
DanHomer25
Partner - Contributor
Partner - Contributor

Pascal,

Put

 Let vRequestBody = replace(vRequestBody,'"', chr(34)&chr(34));

after the place you create the variable. It because you have Double quotes within double quotes!

Dan