Adding Query Parameters

Prev Next

The Adapter Team is often asked about adding query parameters or filters to an API call made by an adapter. In the past, this would require a code change as the query parameters were not exposed as parameters on the adapter method. As a result, there was no way to tell the adapter what to add. Adding new parameters was considered a breaking change that could impact customers, so instead of adding parameters, the Adapter Team would add a new call.

With the iapMetadata object, no new call is required. In addition, no code change is required.

Dynamic Query Parameters

When the adapter call has no specific query parameters, but does have an iapMetadata object, you can use the iapMetadata object to provide query parameters. You would do this by passing the information in the iapMetadata object.

Given this query ...

{
  "uriQuery": {
    <query1_key>: <value1>
  }
}

An example would be:

{
  "uriQuery": {
    "size": 20,
    "offset": 60
  }
}

 

The iapMetadata object is one that you can build using the Platform workflow capabilities such as query, merge, etc.

If there is no iapMetadataobject on the method (this will be true for older adapter methods) you can request that this object be added to the methods in the adapter. Be mindful, however, this will require that new methods be created so that Itential does not break the existing methods.