Integration Object - Test Request - JSON request body with Arrays

I've the same problem reported in this question. https://community.appian.com/discussions/f/integrations/11905/integration-object---test-request---json-request-body-with-arrays

However, the solution does not solve my problem.

The request body expected by the API documentation is as follows (Request body 1). I tested this successfully using Postman with a response as described by the API. However, due to the ssquare brackets, this body is not accepted in Appian editor. When I replaced square brackets with curly braces, I get the error message as given below (Error 1). Then I changed the request body based on the solution to the above question link (Request body 2). And got Error described in Error 1 again. Can you please help with the correct way to construct this request body?

Request body 1:

{ "Inputs": { "input1": { "ColumnNames": [ "vendor_id", "rate_code", "passenger_count", "trip_distance", "payment_type", "fare_amount" ], "Values": [ [ "CMT", "0", "0", "0", "CRD", "0" ], [ "CMT", "0", "0", "0", "CRD", "0" ] ] } }, "GlobalParameters": {} }

Error 1:
Error message in Appian after replacing square brackets with curly braces:


Request body 2:

a!toJson(
  {
    "Inputs": {
      "input1": {
        vendor_id: "CMT",
        rate_code: "0",
        passenger_count: 0,
        trip_distance: 0,
        payment_type: "CRD",
        fare_amount: 0
      }
    }
  }
)

Error 2:

The external system did not understand the request

error-result-guidance

The request was missing required details or was improperly formatted HTTP/1.1 400 Bad Request Next Steps

  • Make sure that you are providing all required headers and parameters and that those values are valid
  • Check the request and response for more details
  • Review the external system’’s documentation for information on what may have caused the problem

  Discussion posts and replies are publicly visible