I would like to build a data extraction automation using POST request and save the data into a json file. I’m using Talend API tester in extracting the data from the endpoint. Need to set the header content-type (application/json) and body text (json format) for username and password. Hope there are examples that are alike to the requirements of the end-point.
Looking forward to your response.
If you know the structure of e.g. JSON Body then it is fairly simple to use a “template” body JSON object in your workflow and to update it using JSON Transformer node.
You can save JSON file using JSON Writer.
The JSON objects you create / modify you can use in GET / POST Request nodes etc.
Minimal example of JSON Transformer and reader in attached workflow:
I tried directly executing the entries in the POST request node but got error : PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
First of all: I removed your first screenshot as it appeared to include credentials like username, password, jwt… not a good idea to reveal sensitive data like that in a public forum…
If you tried my „minimal example“ with your API it is no surprise that it fails. The example shows how to conceptually use knime nodes to create JSON objects (hence minimal…) that you can use in an API. I did not implement it for your API (as I’m not familiar with it).
You could try and copy the content of your first screenshot into post request node to start with to see if it works.
Thank you for your concern about the credentials posted.
I forgot to note that the credentials and sites indicated are dumb entries. The format is the same but the data entries are not valid.
Now i tried using the POST request and make some tweek (to login) and it works fine now.