Search

Search

Using search QL API you can execute search by specifying search query directly as you specify on the UI. A successful search execution will return one of the following three things :

  1. List of entity ids that matches the search criteria.
  2. List of aggregations.
  3. List of groups.
Request
URI
POST
https://{api_host}/api/ni/search/ql
COPY
Request Body

Search Query Request

SearchQueryRequest of type(s) application/json
Optional
{
    "query": "VM where CPU Cores > 2",
    "size": 10,
    "time_range": {
        "start_time": 1534410000,
        "end_time": 1534410559
    }
}
string
query
Optional

Query

integer As int32 As int32
size
Optional

Page size of results

string
cursor
Optional

cursor

time_range
Optional

time_range

Authentication
This operation uses the following authentication methods.
Responses
200

Success

Returns SearchQueryResponse of type(s) application/json
{
    "search_response_total_hits": 100,
    "entity_list_response": {},
    "aggregation_response": {},
    "groupby_response": {}
}
integer As int32 As int32
search_response_total_hits
Optional

Total number of results

object
entity_list_response
Optional

entity_list_response

object
aggregation_response
Optional

aggregation_response

object
groupby_response
Optional

groupby_response


400

Bad Request

Returns ApiError of type(s) application/json
{
    "code": 0,
    "message": "string",
    "details": [
        {
            "code": 0,
            "message": "string",
            "target": [
                "string"
            ]
        }
    ]
}
integer As int32 As int32
code
Optional

code

string
message
Optional

message

details
Optional

details


401

Unauthorized

Operation doesn't return any data structure

500

Internal Error

Operation doesn't return any data structure