Discussion about MY API response

Hi all,

I am working with Celigo My API. I am facing an issue with API response. I need response as a json array but Celigo API response giving as a json object. Can anyone knows how to achieve this.

Current response as Json object:

{
  "code": 0,
  "isSuccess": true,
  "message": ""
}

I need response like below as Json array:

[
    {
        "code": 0,
        "isSuccess": true,
        "message": ""
    }
]

Hi @saivamsi_Jeedimalla

In API builder, returning a JSON object is currently supported. In order to return an array, it is recommended to configure the API response body as an object array like shown below.

Once the mapping is configured, and API is invoked, the response is returned as an object array.

Hope this works.. Also is there any particular use case for which you are looking to send a JSON array as response?

Thanks,
Kaustav

Hi @kaustavroy ,

Thank you for the response.

We need the data in Json array because there is a parser which is accepting the entire data in array format. I need to pass entire data set as a json array to that parser. please refer to the below screenshot the highlighted part needs to be in array.

Thank you @saivamsi_Jeedimalla for your valuable suggestion. We will reach out to you to explore this further and add it to our roadmap.