Search query parameters
  • 21 Sep 2023
  • 3 Minutes to read
  • Dark
    Light

Search query parameters

  • Dark
    Light

Article summary

You can use the search service to retrieve the necessary information from the system.

The example below searches for employees whose data has changed since 1.1.2022 and the deparment are an external system deparment identifier "DE001" and "DE002". The system returns the name, external identifier, and e-mail address. The information is sorted in ascending order by person's name. A maximum of 1000 rows will be returned.

Example

fields=Name,ExternalId,Email&Filters=(DepartmentId.ExternalId In DE001;DE002) AND (Exmployy.ModifiedOn > 2022-01-01)&Orders=Name ASC&PageSize=1000

Fields

Specify the fields you want to retrieve in the fields parameter and use the GET method of the resource.

The list of database column attributes. If list is empty or "*" then all of fields will be returned.

This method converts a string list to a string with a comma separator.

ℹ️ Please refer to the corresponding method's documentation for the complete list of supported field parameters by record.

Example

Fields=ExternalId,Name
Fields=*

Filters

In the List methods, filtering of resources can be performed using filter parameters.

Field

The name of the database field. Example: "Name" or relation field "OwnerId.Name"

You can also use parent tables as a search filter. For example, the "Employee" table has a "DepartmentId" field, so you can search for a department name using the "DepartmentId.Name" field name. All fields in the parent table are available.

ℹ️ Please refer to the corresponding method's documentation for the complete list of supported filter parameters by record.

Value

The value of the filter.

You can add multiple values separated by comma / semi-colon when using the "In", "NotIn" operators.

Data typeSeparatorExample
DecimalComma1.01, 2345.89767, 34.0
IntegerComma12, 3456, 78901
LongIntegerComma999999999, 123456789013
TextSemi-colonUSA;FIN; RUS

Comparison Operator

The operator must be a standard comparison operator (=, <>, >, >=, <, <=, In, Like, NotIn)

OperatorDescription
=Returns the resource, if the filter attribute's value matches the specified value.
<=Returns the resource, if the filter attribute's value is lesser than or equal to the specified value.
>Returns the resource, if the filter attribute's value is greater than the specified value.
LikeReturns the resource, if the filter attribute's value includes with the specified value.
<Returns the resource, if the filter attribute's value is lesser than the specified value.
>=Returns the resource, if the filter attribute's value is greater than or equal to the specified value.
Not InReturns the resource, if the filter attribute's value doesn't match any of the specified values.
InReturns the resource, if the filter attribute's value matches any one of the specified values.
<>Returns the resource, if the filter attribute's value doesn't match the specified value.

The table below shows the supported operators for different data types.

OperatorBooleanDateDateTimeDecimalIntegerLongIntegerText
=truetruetruetruetruetruetrue
<=falsetruetruetruetruetruefalse
>falsetruetruetruetruetruefalse
Likefalsefalsefalsefalsefalsefalsetrue
<falsetruetruetruetruetruefalse
>=falsetruetruetruetruetruefalse
NotInfalsefalsefalsetruetruetruetrue
Infalsefalsefalsetruetruetruetrue
<>truetruetruetruetruetruetrue

Example of filters

Filters=(DepartmentId.Name = My Department) AND (DepartmentId.CreatedOn = 2021-01-01)

Filters=(DepartmentId.Name = My Department 1) OR (DepartmentId.ExternalId In DE001;DE002)

Filters=ExternalId In S100;S101;S120;100

Filters=Id = 100

Orders

The sort_by parameter is provided for sorting the result in the desired order. Both the attribute based on which sorting needs to be done, and the order of sorting (ascending or descending) can be specified. This method converts a string list to a string with a comma separator.

ℹ️ Please refer to the corresponding method's documentation for the complete list of supported order parameters by record.

SortingDescription
DESCThe keyword is used to sort the result-set in descending order.
ASCThe keyword is used to sort the result-set in ascending order.
?Orders=Name DESC
?Orders=Name DESC, DepartmentId.CreatedOn ASC

StartIndex

The first record to return. Use this parameter to paginate the
results. The default value is 0. If not specified, the first set of resources (number of resources limited by the page size parameter) will be returned.

?StartIndex=10
?StartIndex=101

PageSize

This limits the number of resources to be returned in the response. The value ranges from 1 to 1000 and defaults to 50.

?PageSize=10
?PageSize=1000

Was this article helpful?