Skip to main content

Filters

You can apply filters to our List API endpoints (e.g. GET /projects) to return a subset of results.

Supported Operators

You can apply one or more filters in the request body with the following operators:

OperatorDateNumberStringNotesExample
=
{
  "field": "number",
  "operator": "=",
  "value": "123"
}
!=
{
  "field": "status",
  "operator": "!=",
  "value": "Active"
}
>
{
  "field": "sent_date",
  "operator": ">",
  "value": "2022-01-01"
}
>=
{
  "field": "sent_date",
  "operator": ">=",
  "value": "2022-01-01"
}
<
{
  "field": "source_create_time",
  "operator": "<",
  "value": "2022-01-01T00:00:00Z"
}
<=
{
  "field": "amount",
  "operator": "<=",
  "value": "125.00"
}
LIKECase-sensitive. Use % for wildcard search.
{
  "field": "name",
  "operator": "LIKE",
  "value": "ABC%"
}
NOT LIKECase-sensitive. Use % for wildcard search.
{
  "field": "name",
  "operator": "NOT LIKE",
  "value": "ABC%"
}
ILIKENot Case-sensitive. Use % for wildcard search.
{
  "field": "name",
  "operator": "ILIKE",
  "value": "ABC%"
}
NOT ILIKENot Case-sensitive. Use % for wildcard search.
{
  "field": "name",
  "operator": "NOT ILIKE",
  "value": "ABC%"
}
INvalue expects a list of items.
{
  "field": "status",
  "operator": "IN",
  "value": ["Active", "Pending"]
}
NOT INvalue expects a list of items.
{
  "field": "status",
  "operator": "NOT IN",
  "value": ["Active", "Pending", "Draft"]
}
BETWEENvalue expects exactly two items.
{
  "field": "sent_date",
  "operator": "BETWEEN",
  "value": ["2022-01-01", "2022-02-01"]
}
NOT BETWEENvalue expects exactly two items.
{
  "field": "source_update_time",
  "operator": "NOT BETWEEN",
  "value": [
    "2022-01-01T00:00:00Z",
    "2022-02-01T00:00:00Z"
  ]
}

Note: we do not yet support filters for all List API endpoints. If you would like a filter that is not yet supported, feel free to let us know at api-support@agaveapi.com and we should be able to quickly add it. For current coverage, see the Coverage section below.

Note

Some HTTP clients, such as Axios (in JavaScript), will not send a request body for GET request. In such cases, you can change the HTTP method to POST to force your client to include the request body, and then include a new request body parameter of "_method": "GET" to ask Agave's servers to treat the request as GET.

Example:

curl https://api.agaveapi.com/projects \
--request POST \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: your_client_id' \
--header 'Client-Secret: your_client_secret' \
--header 'Account-Token: account_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"_method": "GET",
"filters": [
{
"field": "status",
"operator": "=",
"value": "Active"
}
]
}'

Examples

Filter by Value

The below example filters a list of Projects to ones that have a status of "Active":

curl --request GET https://api.agaveapi.com/projects \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: your_client_id' \
--header 'Client-Secret: your_client_secret' \
--header 'Account-Token: account_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"filters": [
{
"field": "status",
"operator": "=",
"value": "Active"
}
]
}'

Filter by Timeframe

The below example filters a list of Transmittals to those sent between 01-01-2022 and 01-31-2022:

curl --request GET https://api.agaveapi.com/transmittals \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: your_client_id' \
--header 'Client-Secret: your_client_secret' \
--header 'Account-Token: account_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"filters": [
{
"field": "sent_date",
"operator": ">=",
"value": "2022-01-01"
},
{
"field": "sent_date",
"operator": "<",
"value": "2022-02-01"
}
]
}'

Filter by Last Updated Time

The below example filters a list of Customers to those that have been updated since 2023-05-01:

curl --request GET https://api.agaveapi.com/customers \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: your_client_id' \
--header 'Client-Secret: your_client_secret' \
--header 'Account-Token: account_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"filters": [
{
"field": "source_update_time",
"operator": ">=",
"value": "2025-05-01"
}
]
}'

Filter by State

The below example filters a list of Vendors in Viewpoint Vista where the source_data.State field is either 'OR' or 'CA':

curl --request GET https://api.agaveapi.com/vendors \
--header 'API-Version: 2021-11-21' \
--header 'Client-Id: your_client_id' \
--header 'Client-Secret: your_client_secret' \
--header 'Account-Token: account_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"filters": [
{
"field": "source_data.State",
"operator": "IN",
"value": ["OR", "CA"]
}
]
}'

Coverage

Currently, we support this filter pattern for the following source systems and endpoints. Let us know if you want us to expand the support for the endpoints you need.