Filtering
Most results that are paginated can also be filtered. This makes it easy to retrieve specific information, like any issues assigned to a particular user, but much more complex queries are also possible. For example, you could fetch all issues associated with a project that is supposed to be completed next week and have not yet been started.
Filtering is currently in Alpha. While we don't anticipate the filtering format to change, it might. Follow our API slack channel to get a heads up on breaking changes.
For example, to return all urgent and high priority issues in the workspace, you can use the following query:
The above query will also return any issues that haven't been given any priority (their priority is 0). To exclude them, you can add another not equals comparator:
Comparators
You can use the following comparators on string, numeric, and date fields:
Comparator | Description |
| Equals the given value |
| Doesn't equal the given value |
| Value is in the given collection of values |
| Value is not in the given collection of values |
Numeric and date fields additionally have the following comparators:
Comparator | Description |
| Less than the given value |
| Less than or equal to the given value |
| Greater than then given value |
| Greater than or equal to the given value |
String fields additionally have the following comparators:
Comparator | Description |
| Case insensitive |
| Case insensitive |
| Starts with the given value |
| Doesn't start with the given value |
| Ends with the given value |
| Doesn't end with the given value |
| Contains the given value |
| Doesn't contain the given value |
| Case insensitive |
| Case insensitive |
Optional values additionally support the null
comparator, which can be used to return entities depending on whether the field has a value or not. The following query will return all issues that don't have a description:
Logical operators
By default, all fields described in the filter need to be matched. The filter merges all the conditions together using a logical and operator.
For example, The below example will find all urgent issues that are due in the year 2021.
To change the logical operator, all filters support the or
keyword that lets you switch to a logical or operator. For example, to filter for low-priority or un-prioritized issues that need to be completed in the year 2021, you can execute the following query:
Filtering by relationship
Data can also be filtered based on their relations. For example, you can filter issues based on the properties of their assignees. To query all issues assigned to a user with a particular email address, you can execute the following query:
Many-to-many relationships can be filtered similarly. The following query will find issues that have the Bug label associated.
The above query returns all issues that have at least one label that matches the name Bug. To create a query where all labels on an issue are matched to the filter criteria, you can use the every
keyword:
The above would also filter out issues that have multiple labels, regardless of what they are.
Relative time
All date fields support relative time, defined as ISO 8601 durations relative to the current date. This lets you create a filter that always returns all issues that are due in the next 2 weeks, regardless of when you run it:
Examples
Find all bugs and defects from projects that are lead by any user named "John":
Find all issues assigned to me that have a comment containing a thumbs-up emoji:
Find all issues that have been created by me and have been closed in the past two weeks:
Find all started issues in ongoing projects that don't have an estimate:
Last updated