Here's a step-by-step.
In Postman, setup a GET to
https://pokeapi.co/api/v2/pokemon/squirtle/Click on the "code" hyperlink and you'll get something like this:
curl --location --request GET 'https://pokeapi.co/api/v2/pokemon/squirtle/' --header 'Cookie: __cfduid=d4d69ba8707f24011389f0e1d7b7ec8fd1620146242'
Modify it to allow it to run under Windows: (change single quotes to double quotes, change GET to -XGET, add --ssl-no-revoke to simplify certificates
curl -XGET --ssl-no-revoke "https://pokeapi.co/api/v2/pokemon/squirtle/" --header "Cookie: __cfduid=d4d69ba8707f24011389f0e1d7b7ec8fd1620146242"
Paste into a .bat file. For our test, we'll just append the following to the line in the .bat file >> C:\temp\squirtle-out.txt
In Javelin, create a process, add a block Invoke Process, and specify the bat file in the Executable Name field. Add the path to the cmd.exe in the Working Directory field.
Execute, and look at the .txt file for the results.
Original Message:
Sent: 04-29-2021 10:19 AM
From: Scott Schmitz
Subject: Javelin Rest Api Call - Query
Javelin would be trying to execute the cURL installed in Windows rather than in Postman - can you try the cURL command interactively from a command line & see if it works. If not, adjust it until it works then incorporate into Javelin.
Original Message:
Sent: 04-29-2021 03:36 AM
From: Karan
Subject: Javelin Rest Api Call - Query
Hi Scott,
I've implemented the same process as suggested by you using the curl command, but the output file is empty and same curl is executing fine from postman.
Below is the screenshot attached of the Invoke process activity and workflow.
Thanks
Original Message:
Sent: 04-23-2021 03:31 PM
From: Scott Schmitz
Subject: Javelin Rest Api Call - Query
As discussed, try executing with curl from a Javelin "Invoke Process" step. You can get the curl string from Postman by clicking the "Code" link
Paste the curl string into a .bat file, then in the Invoke Process activity, specify the full path to the .bat file (surrounded in double-quotes).
For the working directory property, specify "C:\windows\system32"
Original Message:
Sent: 04-20-2021 06:59 AM
From: Karan
Subject: Javelin Rest Api Call - Query
Hi team,
I need to automate some rest api through Javelin, so for that I need to pass "x-www-form-urlencoded" as Body type for REST POST API call.
[Screenshot from Postman]
Can you please suggest some idea on how we can achieve this, any help would be great.
Thanks & Regards