Search insights
- Base URL
-
https://api.elastic-cloud.com/apiElastic Cloud API.
- POST /v1/monitoring/{resourceType}/{resourceId}/insights/_search
Returns a paginatable list of insights that were open (active) at any
point during the selected time interval and that match the specified criteria.
An insight matches the time interval when it started at or before to and it is
still open, or was closed at or after from. By default, only insights that are
currently open are returned; closed insights that overlapped the selected time
interval are included only when include_closed is set to true in the request body.
Insights of rules that were disabled for the resource are never returned.
The insights are sorted by their start time (event.start).
Each criterion narrows the results: an insight is returned only when it matches all the criteria that are set. Within a criterion that takes a list, an insight matches when it matches any of the values.
Results are paginated with a cursor: when return_count equals the page size, which is
the requested size capped at 5000, the response carries a cursor; pass it in the next
request to get the next page. Because a full page always carries a cursor, even when no
insights remain, the page that follows the last insight can be empty.
The caller must be authorized to read AutoOps data for the deployment, project, or connected cluster named in the path, and the resource must belong to the organization of the caller. Access is checked for that single resource on every request.
Request body
The search criteria. When the body is omitted, every default applies.
-
fromstring -
The start of the time window, either in ISO 8601 format with seconds and a
Zor offset time zone, or as a UNIX epoch in milliseconds. The bound is inclusive. Insights that are still open or that closed at or after this time are included. Defaults to 24 hours before the time of the request. -
tostring -
The end of the time window, either in ISO 8601 format with seconds and a
Zor offset time zone, or as a UNIX epoch in milliseconds. The bound is inclusive. Only insights that started at or before this time are included. Defaults to the time of the request. Must not be earlier thanfrom. -
orderenum · default: desc -
By default, the most recent insights are returned first. Use
ascto return the oldest insights first. The value is case-sensitive. -
Values:
ascdesc -
cursorstring -
When paginating over a list of insights, the cursor found in the previous page leads to the next page of insights. When this parameter is set, the search criteria and the order of the request that returned the cursor are used, and all the other parameters except
sizeare validated but otherwise ignored. The cursor is an opaque value: pass it back exactly as received, and do not parse it or build one yourself, because its format can change without notice. -
sizeinteger · format: int64 · min: 1 · default: 1000 -
When paginating over a list of insights, the number of insights to return. Defaults to 1000 when omitted. Values above 5000 are hard capped to 5000.
-
rulesstring[] -
The IDs of the rules whose insights to return. Values are matched case-insensitively. The list of rule IDs is available at https://ela.st/autoops-insights. An unknown rule ID is rejected with a
400error. Which rules can raise insights depends on the resource type in the URL. - The list of rule IDs.
-
severitiesenum[] -
The severities of the insights to return. Values are case-sensitive and lowercase. The severity matched is the one recorded when the insight was raised, which can differ from
autoops.severityif the severity of the rule changed afterwards. -
Values:
criticalhighmediumlowinfo -
include_closedboolean · default: false -
A boolean indicating whether closed insights should also be returned.
-
actionable_onlyboolean · default: false -
When true, only insights with at least one recommended action are returned.
-
tagsstring[] -
The tags to match. A tag matches the whole value of a tag of the insight, case-insensitively. The available insight tags depend on the rule and on the resource type in the URL, and they are namespaced, for example
domain:performanceorscope:node. The list of tags is available at https://ela.st/autoops-insights. - The list of tags.
-
modified_onlyboolean · default: false -
When true, the
fromandtotime window is matched against the time each insight was last updated (event.updated) instead of its start and end times. Only the latest update time of the insight is considered, so an insight that was open during the time window is not returned if it was updated again afterto. Theinclude_closedsetting still applies.
Responses
The insights that match the search criteria.
-
match_countinteger · format: int64required -
The total number of insights that match the search criteria, across all pages. When the request carries a cursor, it is the total for the criteria of the original search, not the number of insights that remain.
-
return_countinteger · format: int64required -
The number of insights that have been returned in the response. When this number equals the page size, which is the requested
sizecapped at 5000, the response carries acursorand there might be more insights to return. -
cursorstring -
The cursor to the next page of insights. Pass it in the
cursorfield of the next search request. It is omitted when the page has fewer insights than the page size, which is the requestedsizecapped at 5000. For example, a request with asizeof 6000 that returns 5000 insights carries a cursor. The cursor is an opaque value: do not parse it or build one yourself, because its format can change without notice. -
insightsobject[]required -
The insights that match the search criteria.
-
@timestampstring · format: date-timerequired -
The time when the insight was raised, in ISO 8601 format (UTC).
-
eventobjectrequired -
startstring · format: date-timerequired -
The time when the insight was raised, in ISO 8601 format (UTC).
-
endstring · format: date-time -
The time when the insight was closed, in ISO 8601 format (UTC). Omitted while the insight is open.
-
durationinteger · format: int64 -
The duration of the insight in nanoseconds (
endminusstart). Omitted while the insight is open. -
tagsstring[] -
The tags of the insight, for example
domain:performanceorscope:node. Tag values keep the casing in which they are defined. The list of tags is available at https://ela.st/autoops-insights. - The list of tags.
-
ruleobjectrequired -
idstringrequired -
The ID of the rule that raised the insight, in lowercase. Use it in the
rulesfield of a search request. The list of rule IDs is available at https://ela.st/autoops-insights. - The list of rule IDs.
-
messagestringrequired -
The context and conditions that led to the insight being raised, as plain text.
Bad request: a malformed body, a value that cannot be read as the type of its field,
an unknown enumeration value, an unknown rule ID, a date that is not valid, a size
lower than 1, an invalid cursor, or a to date earlier than from.
Unauthorized: the credentials are missing, invalid, or expired, the organization they belong to has no AutoOps account, or the credentials could not be verified.
Forbidden: the caller is not authorized to read AutoOps data for the resource
named in the path, or resourceType is not one of the supported values.
Not found: AutoOps has no resource with that ID for the organization of the caller,
or the resource is not of the type given in resourceType.
Too many requests: the organization exceeded the request rate limit of the API,
which is applied per organization. Retry after a few seconds. Responses from this
API don't include Retry-After or x-ratelimit-* headers.
An unexpected error occurred on the server. Retry the request later. When AutoOps is temporarily unavailable, the response has no body.