Skip to main content
Version: 5.0

API SME

Search Queries

API to run an SA query: GET _sme.

Parameters

NameTypeDescription
querystringSA query
dtStartdate-timeStart of the time range in YYYY-ММ-DDThh:mm:ssZ format
dtEnddate-timeEnd of the time range in YYYY-ММ-DDThh:mm:ssZ format
dtFieldNamestringName of the time field (typically @timestamp)
calculateExecutionCoststringSee Sidebar and Timeline API
calculateStatsbooleanSee Sidebar and Timeline API
sidebarHandlerstringSee Sidebar and Timeline API
timelineHandlerstringSee Sidebar and Timeline API

If the query parameter is too long, you can execute the SA query by submitting the parameters in the HTTP request body using JSON format with the POST method (this is the recommended method):

POST _sme

Request Body Parameters

Example of the POST request body:

{
"dtStart": "2022-12-15T07:00:00Z",
"dtEnd": "2023-02-09T13:30:00Z",
"query": "source internal_audit-* qsize=9000",
"dtFieldName": "@timestamp"
}

Example of executing a search query

POST _sme
{
"dtStart": "2022-12-15T07:00:00Z",
"dtEnd": "2023-02-09T13:30:00Z",
"query": "source internal_audit-* qsize=9000",
"dtFieldName": "@timestamp"
}

License Check

To check the license, run the following request:

GET _sme/getLicense