Skip to main content

Filters

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

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

OperatorDateNumberString
=
!=
>
>=
<
<=

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.

Example Requests

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"
}
]
}'