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 :
- List of entity ids that matches the search criteria.
- List of aggregations.
- 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
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
401
Unauthorized
Operation doesn't return any data structure
500
Internal Error
Operation doesn't return any data structure