Filters are special arguments an action can have that also let you pick an operator. Generally, arguments might look like:
firstName: "Joe"
However, some APIs allow you do things such as search for a record, where:
dateModified > today
By enabling filters at the API level, you specify that this API supports this type of thing, and you define the rules for it.
Filter Properties
Filtering has several properties that define how it can be used within a workflow.
Filter Location:
.png)
Query: Some filters exist in a URL, for example, this might reflect "get users where first name is greater than Joe":
GET /user?firstName=GT_Joe
Body: Other APIs require the filter to be in the body, such as this:
POST /userSearch { firstName: { operator: 'GTE', value: 'Joe' } }
This is uncommon, but the bottom line is that there are very few standards as to how filters are executed, so you need to normalize them here.
Standard Data Types
Here, you can write code that maps filter values, based on their data type. For example, Booleans might need to be formatted as T or F instead of true
or false
.
.png)
Operators
Here, you specify which filter operators the API supports. After enabling an operator you can write code that transforms it into the expected format.
.png)