Convert CURL to Postman

Hi, I need to convert CURL to POSTMAN and have reviewed some of the documentation.
Iā€™ve attempted adjusting the CURL request and still receive the same error message which is ā€œerror while importing curl uri malformedā€

Please help me find a solution to this error. Iā€™m looking to convert this to Postman. The CURL code is:

curl -X POST -d ā€œ{ā€œdomainNameā€:ā€%GIVEN_DOMAIN_NAME%",ā€œreconciliationā€:"%GIVEN_RECONCILIATION%",ā€œtypeā€:"%GIVEN_REQUEST_TYPE%",ā€œinputFileā€:"%GIVEN_FILEPATH%",ā€œstoreResultsā€:"%GIVEN_STORE_RESULTS%",ā€œreportToEmailā€:"%GIVEN_EMAIL_REPORT%"}" -H %HEADER_1% %API_URL% -u %GIVEN_API_AUTH%

Iā€™ve been told I need to add this somewhere:
curl --location --request GET ā€˜https://matchimus-api-acceptance.operartis.comā€™

2 Likes

Hey @dankrm,

This curl command includes variables that will resolve in PowerShell or a Windows command prompt. You can convert these to Postman-style variables. You will need to either replace them once the request is imported or youā€™ll need to keep them and use something like an Environment to store these variable values.

To convert between variable syntax types, change something like %API_URL% to {{API_URL}}.

Reworked example:

curl -X POST -d ā€œ{ā€œdomainNameā€:ā€{{GIVEN_DOMAIN_NAME}}",ā€œreconciliationā€:"{{GIVEN_RECONCILIATION}}",ā€œtypeā€:"{{GIVEN_REQUEST_TYPE}}",ā€œinputFileā€:"{{GIVEN_FILEPATH}}",ā€œstoreResultsā€:"{{GIVEN_STORE_RESULTS}}",ā€œreportToEmailā€:"{{GIVEN_EMAIL_REPORT}}"}" -H {{HEADER_1}} {{API_URL}} -u {{GIVEN_API_AUTH}}
1 Like