How to add an array parameter in API profiles and API Query?

I'm trying to get data from a customer API Endpoint using Matillion API profiles and API Query.

This particular API Endpoint accepts array parameters to get data of more than one record.

API Endpoint is accessed as a GET REQUEST.

 

In Postman I can get data for multiple ids sending the parameter like ?ids=1&ids=2&ids=3.

 

But looks like this is not possible with Matillion.

 

If I send only ONE value for ids, per example ids=1; this totally works, problem is when trying to send multiple values for ids (as it is an array parameter).

 

If I have 3,000 elements, I would not like to call 3,000 times the API Endpoint.

 

Thank you,

 

Hello roberto.rasconxd,

 

If you are getting an error or something like that it would be helpful to help get a solution but I have a similar situation where I needed a list of fields in the body of the request and I had to escape the "[" and "]" using a "/". See example below. More info is needed to address your particular issue but you may need to add the escape char when setting the "Ids" property. Hope this helps.

 

Example: (Had to manually edit RDS file)

<!-- The GET method corresponds to SELECT. Here you can override the default processing of the SELECT statement. The results of processing are pushed to the schema's output. See SELECT Execution for more information. -->

 <api:script method="GET">

  <api:set attr="method" value="POST"/> <!-- HTTP request type -->

  <api:set attr="data">

{

  "typeName": "RLTimePhaseDaily",

  "fields": \[...\],

  "orders": \[{

    "fieldName": "CreatedOn", 

    "order": "Ascending"

    }\],

    "paging": {

      "from": [userns.from],

     "limit": [userns.limit],

     "hasMore": [userns.hasMore]

    } 

@nathan.lang1614377435484

I'm also facing the same issue , escaping the square braces does not help. I have hardcoded the input for testing purpose.

Error Before escape square brackets

Error After escape square brackets

Hello All

 

We have recently started looking into this issue and would be very interested in getting feedback on some of our assumptions.

If anyone here would be interested in talking to me this, please DM me and we can arrange a time that is suitable.

 

Thank You

Ben Smiles

Matillion Product Team

I recently created a new API Profile and found that an extra method was generated in the RSD file. I commented out the highlighted line and was able to get the profile to work.

 

Thanks @nathan.lang1614377435484​ It worked , after removing the extra method from the rsd file.