Try removing the Request body and then putting those values in the Query Parameters Name and Value pairs. When you Test Connection this should then enter the values and prove that approach works.
To have it so that you can inject different values each time you will need to clear out those parameters again (that was just to test) and then overwrite them at load time with a WITH CONNECTION statement. This allows you to overwrite parts of your connection with new values. The syntax is:
In your case you will have many QUERY rows, but the rest of the connection may be fine stored in the REST connector, so don't need to be included. Basically the values in the REST connector are either added to (in the case or HTTPHEADER or QUERY rows) or replaced (URL).
I still have an issue, my post request syntax is like below and i have to enter at least 1 "emails" or 1 "phones"; but i don't know how to put the type and value information in the name and value of the "query parameters" of REST conector.
Not sure how you would provide a nested value in the Query Headers parameter, or in the QUERY value in the WITH CONNECTION statement.
There is also a body tag with the WITH CONNECTION suffix, like this:
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION (
This will allow you to put the entire request body in a variable and send it in one hit, with the nested part also.
The WITH CONNECTION is a good way of getting changing input into your API calls. We connect to a number of different APIs and use just two connections for all of them, GenericPOST and GenericREST. Both of these point to a dummy endpoint then whenever we use them the URL and all the parameters are replaced with the values for that particular call.
In your original post you said the line is created but an error appears. It may be that you just need to wrap the call in SET ERRORMODE statements, you will need to check the error state afterwards though, to ensure you don't ignore messages which actually mean the line isn't posted.
In this case it should be as simple as not adding any parameters in the URL of the REST connection, or in the Query Parameters section of the connection. If you test the connection you will get an invalid response returned (as it requires the parameters).
To add the parameters you would use WITH CONNECTION like this:
WITH CONNECTION (
QUERY "origins" "$(vOrigins)",
QUERY "destinations" "$(vDestinations)",
QUERY "mode" "$(vMode)",
This way you can set the variables in the script (let vOrigins = 'Berlin' and then call the same connection for each pair you need a response for.