API Query DSL Specifications
General
In order to use Infinipoint’s API, you will need to use our custom DSL for querying object.
The following page will guide you through the query language syntax.
HTTP Headers
When sending API requests, you must send the following HTTP headers -
Header Name | Header Value | Purpose |
---|---|---|
|
| Indicates the request payload is of type JSON |
|
|
Query language Fields
When querying Infinipoint’s objects, you will need to use the HTTP POST method with a query payload.
The following table lists the available query language fields and there usage -
Field Name | Field Type | Mandatory | Field Description |
---|---|---|---|
| int | Yes | Specifies the page size to return. Valid values are integers from 1 to 500. |
| JSON array | No | JSON array which specifies fields for sorting. |
| int | No | Specifies the page index to return. The default value is set to 0. |
| JSON array | No | JSON array which specifies the sorting direction of columns, according to the fields specified in the |
| JSON object | No | Specifies a list of rules for filtering |
| string | No | Logical operator for filtering evaluation for the |
| JSON array | No | JSON array which specifies the query rules. Used to send one or more query filters. |
| string |
| Specifies the Field name for applying a query filter. |
| string |
| The logical operator used the evaluate the relation between |
| string |
| Specifies the Field value for applying a query filter. |
Special Query Fields
The following fields can be used to perform advanced filtering using the ruleSet['rules']['field']
parameter -
Field Name | Field Type | Field Description |
---|---|---|
| string | Specifies the record type to return. |
Query Examples
The following query will return the first 10 results of hosts which contain the phrase ubuntu OR debian in their hostname (using the /api/devices
route) -
{
"pageSize": 10,
"sortBy": [
"lastSeen"
],
"page": 0,
"ruleSet": {
"condition": "OR",
"rules": [
{
"field": "host",
"operator": "contains",
"value": "debian"
},
{
"field": "host",
"operator": "contains",
"value": "ubuntu"
}
]
}
}
The following query will return the first 10 aggregated results of users, in descending order by count (using the /api/assets/users
route) -
{
"pageSize": 10,
"page": 0,
"sortBy": [
"count"
],
"sortDirection": [
"DESC"
],
"ruleSet": {
"condition": "OR",
"rules": [
{
"field": "$type",
"operator": "=",
"value": "agg"
}
]
}
}