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

Header Name

Header Value

Purpose

Content-Type

application/json

Indicates the request payload is of type JSON

Authorization

Bearer <jwt-token>

HTTP Authentication header

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

Field Name

Field Type

Mandatory

Field Description

pageSize

int

Yes

Specifies the page size to return. Valid values are integers from 1 to 500.

sortBy

JSON array

No

JSON array which specifies fields for sorting.
Even though this field is not mandatory, you should specify it in when retrieving multiple pages, in order to get consistent results.

page

int

No

Specifies the page index to return. The default value is set to 0.

sortDirection

JSON array

No

JSON array which specifies the sorting direction of columns, according to the fields specified in the sortBy parameter.
Valid values are ASC (for ascending sort) / DESC (for descending sorting).
The default value is set to ASC

ruleSet

JSON object

No

Specifies a list of rules for filtering

ruleSet['condition']

string

No

Logical operator for filtering evaluation for the ruleSet['rules'] parameter. Valid values are OR or AND

ruleSet['rules']

JSON array

No

JSON array which specifies the query rules. Used to send one or more query filters.

ruleSet['rules']['field']

string

 

Specifies the Field name for applying a query filter.

ruleSet['rules']['operator']

string

 

The logical operator used the evaluate the relation between ruleSet['rules']['field'] and ruleSet['rules']['value'].
Can be one of following - =, <, >, contains

ruleSet['rules']['value']

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

Field Name

Field Type

Field Description

$type

string

Specifies the record type to return.
Valid values are csv / agg
The default value is csv(which indicates a single record).
You can use the agg to get aggregated results on some fields.
Example usage in the below “Query Examples” section.

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" } ] } }