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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Mopi
Contributor
Contributor

tRESTClient POST request

Hi people,

I deleted my first thread, as it seems the way I described my problem was a bit confusing. So I decided to keep it simple this time and focus on the core of my problem.

I want to call the Commerzbank API with a POST request that parses the Login Name and PIN of the bank customer:

0695b00000Dt4WSAAZ.png

My current approach is to a tRESTClient component, with the URL of the endpoint of the login and a JSON file as input schema, that contains username and PIN. The JSON looks like this:

0695b00000Dt4UvAAJ.png

I took "username" and "password" from the name of the input forms of the login page, is that the right thing to do?

My tRESTClient looks like this:

0695b00000Dt4WmAAJ.png

However, when I run the job, I am getting an "HTTP 400 Bad Request". Does my JSON need to have a certain format (right now it is a string)? The JSON tree inside the tWriteJSON component looks like this:

0695b00000Dt4XkAAJ.png

The schema looks like this:

0695b00000Dt4Y9AAJ.png

Thank you in advance, every hint is greatly appreciated!

Mopi

Labels (4)
2 Replies
prg
Employee
Employee

Hello @Moritz Opitz​ ,

 

Please note that Talend APIs use standard HTTP status codes to indicate the status of a response. Error "400: Bad request" means The request is not valid or the wrong parameter format was used in your request. The request had bad syntax or was inherently impossible to be satisfied.

 

  • Cloud API's Error handling:

https://help.talend.com/r/vQuyKbfUusdSpNfjXGRM1Q/p~5Ke3hkzNB642ZLevy7Kg

 

  • tRestClient components and its scenario's: https://help.talend.com/r/7NvFnkWpbH8Gy3Rm6mUXnw/V4DayMUD1TrO522ClO0fBw

 

Regards,

Vaishnavi

Mopi
Contributor
Contributor
Author

Hi Vaishnavi,

thank you for the response. I went trough both your links. From what I see in the TRESTClient docu, a simple GET call with Auhorization type "Basic HTTP" should do the job. After all, this is all I want to accomplish:

0695b00000Dt721AAB.pngHowever, when I call the URL described on the picture along with the customer credentials, all I get as a response is an HTML of the login page.

Very weird....