Assistance converting a BASH command into KNIME

hi There, I was hoping someone might be able to help me as im a little stuck.

Trying to build a flow with a web api but im struggling to get the parameters specified.
I do have a working BASH command which im hoping will help someone point me in the right node direction.
curl -X POST -d ‘{“user”:“USERNAME”, “pass”:“PASSWORD”, “version”:“1.0”}’ WEBADDRESS

currently im usign a table creator and HTTP retriever to connect to the site in question but cant seem to figure out which node will allow me the equivalent of the -d switch in the BASH command.

Any advice or guidance would be gratefully received.

Hi Ataylor,

-d specifies data to send. You can simply put this into a separate column and then select it in the “HTTP entity input” column. As it is obviously JSON, set the “HTTP entity content type” accordingly: application/json

Hope this helps!

– P.

1 Like

Thanks, yes i believe its JSON im trying to pry out. -d put in a separate column and added as the optional HTTP entity input along with setting the type to JSON.

Still struggling to get any data out the other end though, my apologies im sure its obvious im new to this program :slight_smile:

Sorry, to be precise: Only put the content after -d into the dedicated column, i.e. {"user":"USERNAME", "pass":"PASSWORD", "version":"1.0"}.

If this is still not working, what result do you get? What does the output table show?

1 Like

ah sorry this bit ‘{“user”:“ USERNAME ”, “pass”:“ PASSWORD ”, “version”:“1.0”}’ WEBADDRESS"?
doh if so i just put the -d hence the result ?
will give it a proper try thanks again for your help.

Hmm still getting the result ?
any other ideas what im doing wrong?

cheers

think i might have it, so much back and forward i noticed id missed the http:// from the url in the table. its certainly doing a lot of something now! thanks again so much for your help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.