Search

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": "VMs group by Application",
    "size": 10,
    "cursor": "MTA=",
    "time_range": {
        "start_time": 1597247025,
        "end_time": 1597247999
    }
}
string
query
Optional

Query

integer As int32 As int32
size
Optional

Page size of results

string
cursor
Optional

cursor

object
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 BadRequestResponse 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

array of object
details
Optional

details


401

Unauthorized

Returns UnauthorizedResponse 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

array of object
details
Optional

details


500

Internal error

Returns InternalErrorResponse 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

array of object
details
Optional

details


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/ni/search/ql