The Search APIs can be used to apply filter conditions to return specific resources based on your requirements. Each module has a search API where you can apply filters and look for particular tasks, projects, templates, or even time entries. These filters are added as query parameters to the Search APIs.

It may take a couple of seconds for a change made in an API to reflect in Search. Give example.


How to add filter query parameters to your search APIs?

Filters are added as query parameters and have a defined structure to get back search results that match the query. You can add multiple filters to a Search API by separating them using commas.

  • Syntax: field.operation=value
  • Eg: dueDate.lt=2023-09-31, minutes.eq=250

Which operations are permitted for search APIs?

OperationDefinitionExample
field.gtYou can use this parameter to indicate a field's value, and the responses will only include those particular resources whose field value is greater than the specified field value.startDate.gt=2023-09-31
field.eqYou can use this parameter to indicate a field's value, and the responses will only include those particular resources whose field value matches the specified field value.project.eq
field.ltYou can use this parameter to indicate a field's value, and the responses will only include those particular resources whose field value is less than the specified field value.startDateActual.lt
field.geYou can use this parameter to indicate a field's value, and the responses will only include those particular resources whose field value is greater than or equal to the specified field value.startDateActual.ge
field.leYou can use this parameter to indicate a field's value, and the responses will only include those particular resources whose field value is less than or equal to the specified field value.dueDateActual.le
field.cnYou can use this param to specify some text and the responses will include those particular resources that contain the given text in their field value.category.cn
field.ncYou can use this param to specify some text and the responses will include those particular resources that DO NOT contain the given text in their field value. EactivityName.nc

Examples for searching using custom fields

OperationExampleDefinition
{type}.field.{field_id}.value=<value>
(value operator is analogy of equals operation)
Let's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.value=2023-12-24
This will return all the projects whose mentioned field's fieldValue exactly equals to 2023-12-24
{type}.field.{field_id}.contains=<value>Let's consider TEXT FIELD_TYPE for this example, type = project, field_id = 12
Example: project.field.12.contains="SearchText"
This will return all the projects whose mentioned field's fieldValue contains the string "SearchText"
{type}.field.{field_id}.notContains=<value> Let's consider TEXT FIELD_TYPE for this example, type = project, field_id = 12
Example: project.field.12.notContains="SearchText"
This will return all the projects whose mentioned field's fieldValue does not contain the string "SearchText"
{type}.field.{field_id}.greaterThan=<value> Let's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.greaterThan=20220-12-24
This will return all the projects whose mentioned field's fieldValue is greater than the date 20220-12-24
{type}.field.{field_id}.lessThan=<value>Let's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.lessThan=20220-12-24
This will return all the projects whose mentioned field's fieldValue is lesser than the date 20220-12-24
{type}.field.{field_id}.greaterThanEqual=<value>Let's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.greaterThanEqual=20220-12-24
This will return all the projects whose mentioned field's fieldValue is greater than or equal to the date 20220-12-24
{type}.field.{field_id}.lessThanEqual=<value>Let's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.lessThanEqual=20220-12-24
This will return all the projects whose mentioned field's fieldValue is lesser than or equal to the date 20220-12-24
{type}.field.{field_id}.isEmptyLet's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.isEmpty
This will return all the projects whose mentioned field's fieldValue is empty
{type}.field.{field_id}.isNotEmptyLet's consider DATE FIELD_TYPE for this example, type = project, field_id = 14
Example: project.field.14.isNotEmpty
This will return all the projects whose mentioned field's fieldValue is not empty
{type}.field.{field_id}.isNot=<value>Let's consider SINGLE_CHOICE FIELD_TYPE for this example, type = project, field_id = 16
Example: project.field.16.isNot=2
This will return all the projects whose mentioned field's fieldValue is not 2
{type}.field.{field_id}.isTrueLet's consider YES_OR_NO FIELD_TYPE for this example, type = project, field_id = 32
Example: project.field.32.isTrue
This will return all the projects whose mentioned field's fieldValue is true
{type}.field.{field_id}.isFalseLet's consider YES_OR_NO FIELD_TYPE for this example, type = project, field_id = 32
Example: project.field.32.isFalse
This will return all the projects whose mentioned field's fieldValue is false
{type}.field.{field_id}.oneOf=<value1,value2,..>Let's consider SINGLE_CHOICE FIELD_TYPE for this example, type = project, field_id = 16
Example: project.field.16.oneOf = 1,3
This will return all the projects whose mentioned field's fieldValue is one of 1 and 3
{type}.field.{field_id}.noneOf=<value1,value2,..>Let's consider SINGLE_CHOICE FIELD_TYPE for this example, type = project, field_id = 16
Example: project.field.16.noneOf = 1,3
This will return all the projects whose mentioned field's fieldValue is none of 1 and 3