API Filters
This section describes how to include filters with your API queries. Examples usages are:
Returning all Ad Units with a name that contains
"footer"
Returning all Line Items that started delivering after
2021/01/01
Returning all Line Items in a
RUNNING
orENDED
state
Example Queries
This introduces the filtering capabilities of the API with some concrete examples. A full description of all the available parameters is provided in the next section.
Return all Ad Units with a name
that contains "footer"
name
that contains "footer"
This makes use of the filterBy
and filterByLike
query parameters.
Return all Line Items that started delivering after 2021/01/01
2021/01/01
This makes use of the where
query parameter.
Conditions can be added to the where
clause by using the ;
separator character. So if we wanted to search for Line Items that started delivering between 2021-01-01
and 2021-06-01
we could use:
Return all Line Items in a RUNNING
or ENDED
state
RUNNING
or ENDED
stateThis also makes use of the where
query parameter, and introduces the in
operator.
Likewise, you can also use a not in
operator:
Full Parameter Description
Flags
The following flags are supported:
Flag | Description |
---|---|
| include objects with an |
| include objects with an |
| include objects with a |
| exclude objects with validation warnings |
| only return objects that were created by the current API user |
Basic Filtering Parameters
Flag | Description | Example |
---|---|---|
| the field name of the object |
|
| an exact match on the filtered field value. Requires |
|
| a match on any values in the filtered field that contain the supplied string. Requires |
|
| a match on any values in the filtered field that do NOT contain the supplied string. Requires |
|
| a non-null filter |
|
Advanced where
Clause
where
ClauseYou can chain multiple conditions together into a where clause using the following syntax:
where each CONDITION
can be one of the following:
Condition | Example |
---|---|
Equals |
|
Not Equals |
|
Greater Than |
|
Greater Than Or Equal to |
|
Less Than |
|
Less Than Or Equal to |
|
Is In |
|
Is Not In |
|
Is Null |
|
Is Not Null |
|
The where
filter matches when ALL of the CONDITION
s are met.
Advanced Timestamp where
Clauses
where
ClausesThe following interval expressions are supported:
X minutes later
X minutes ago
1 hour later
1 hour ago
X hours later
X hours ago
1 day later
1 day ago
1 month later
1 month ago
X months later
X months ago
1 year later
1 year ago
X years later
X years ago
Where X
is an integer > 0. The singular minute
, hour
, day
, month
and year
are for convenience only. You can for example specify 1 hours ago
, which is the same as 1 hour ago
.
Last updated