Search (API v2)
This is an experimental functionality and may change in future releases. |
Certain API v2 requests allow you to define search criteria to filter the response. Note that search in API v2 requests differs from search present in requests such as Search Objects.
Search format
Search query is defined by a list of search criteria connected by a logical OR. Each criterion is defined by a set of conditions. These conditions are connected with a logical AND.
Search supports following parameters:
Parameter | Description |
---|---|
|
Type of value that should be used to filter output. Supported values are |
|
Whether the field name is case insensitive. This setting only applies if the |
|
A list of conditions connected with logical AND. |
|
Condition type. Supports following operators:
|
|
Defines which values to return. |
|
Filtered value. Supports wildcard |
|
Additional search parameters for properties. |
|
Property fields filter. |
|
Property type. This field supports the following property types:
|
Example of a complex search query
{
"filter": {//AND
"owner_ids":[]//OR string,
"parent_ids":[]//OR string,
"child_ids": [//OR
"66c05eec7e8a9b00113f341f",
"66a8972a71ca890012634a03" //string
],
"search": [//OR
{//AND
templateType:{// Parameter name. For objects – exact match, for properties – whether a name contains provided substring
source:"properties",
conditions:[//AND
{
type:"ILIKE",
value:"%sSd",
property:{//AND. Filters property fields. Only applies to "properties" source type
fields:{//AND.
class_id:["234324234"]//AND property contains class_id from the provided list, array values are connected with logical OR
}
}
}
],
},
name:{
source:"object"
conditions:[
{
type:"LIKE",
value:"%aaa%"
}
],
},
created:{
source:"object"
conditions:[ //AND
{
type:">=",
value:1733000400000
},
{
type:"<=",
value:1735246799999
}
],
}
},
{
agentId:{
source:"properties",
conditions:[
{
type:"LIKE",
value:"234324",
property:{ //AND. Filters property fields. Only applies to "properties" source type
fields:{//AND.
type_id:[1,1234,8]//AND. Property has one of the provided type_id. Array values are connected with logical OR
};
type:["integer"]//AND. value has a type from a list, in array - OR
}
},
],
}
},
{
"%":{//% any property name, that contains a value starting with 5566
source:"properties",
conditions:[
{
type:"LIKE",
value:"5566%"
},
],
}
}
],
"state_ids": ["1", "2", "3"], //OR string
"class_ids": [], //OR string
"ids": [], //OR string
"tags": [] //OR string
},
"flags":["paths"],
"fields": [
"name",
"class_id",
"state_id",
],
"order":["field1","!field2"]
"limit": 5,
"offset": 5
}