Qlik Community

Ask a Question

Qlik Connectors Discussions

Discussion Board for collaboration regarding Qlik Connectors.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor

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?

24 Replies
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,

Partner
Partner

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

 

Partner
Partner

Hi Steve,

 

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

 

Regards,

Vinoth

Partner
Partner

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
Partner
Partner

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