Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
MaheswarReddy
Contributor III
Contributor III

JSON with REST API

Hi Everyone/ @evansdar,

 

I need to send data from a JSON file from Talend with REST API.
To verify that my file and my POST URL is working, I did the test on Postman without error, it allows to create new object in my tools.

 

I need this working on  Talend, But unfortunately it is failing due to the below error

 

Here the contents of my JSON file:

 

----------------

{"master":[
   {
      
"startDateTime": {
"value": "2019-08-01T08%3A00%3A00"
},
"endDateTime": {
"value": "2019-08-31T16%3A59%3A59"
},
"serviceId": "2702"
 
   }
   ]}
 
--------------------
 
The json is valid but we are getting an error
 
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<StatusCode>400</StatusCode>
<StatusText>Invalid JSON : Expected BEGIN_OBJECT but was STRING at line 1 column 2 path $</StatusText>
<InfoText></InfoText>
</Error>|400
 
 
Please suggest.
 
 

 

 

 

 

Labels (4)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Your body contains the String " row6.content" (probably not what you expect).

Should be (String)globalMap.get("row6.content") if tFlowToIterate_1 use default settings.

View solution in original post

4 Replies
TRF
Champion II
Champion II

Something with your tREST component?

Can your share its settings?

 

MaheswarReddy
Contributor III
Contributor III
Author

Hi TRF,

 

Attached is the screenshot.

 

Thanks,

Mahesh

 

 


tRest1.PNG
tRest2.PNG
TRF
Champion II
Champion II

Your body contains the String " row6.content" (probably not what you expect).

Should be (String)globalMap.get("row6.content") if tFlowToIterate_1 use default settings.

MaheswarReddy
Contributor III
Contributor III
Author

I tried like this as you mentioned , but still throws an error.

 

 

 

 


Rest3.PNG
Rest4.PNG