elasticsearch/docs/reference/behavioral-analytics/apis/list-analytics-collection.a...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

126 lines
2.5 KiB
Plaintext
Raw Normal View History

[role="xpack"]
[[list-analytics-collection]]
=== List Analytics Collections
beta::[]
++++
<titleabbrev>List Analytics Collections</titleabbrev>
++++
////
[source,console]
----
PUT _application/analytics/my_analytics_collection
PUT _application/analytics/my_analytics_collection2
----
// TESTSETUP
[source,console]
----
DELETE _application/analytics/my_analytics_collection
DELETE _application/analytics/my_analytics_collection2
----
// TEARDOWN
////
Returns information about Analytics Collections.
[[list-analytics-collection-request]]
==== {api-request-title}
`GET _application/analytics/<criteria>`
[[list-analytics-collection-prereq]]
==== {api-prereq-title}
Requires the `manage_behavioral_analytics` cluster privilege.
[[list-analytics-collection-path-params]]
==== {api-path-parms-title}
`<criteria>`::
(optional, string)
Criteria is used to find a matching analytics collection. This could be the name of the collection or a pattern to match multiple. If not specified, will return all analytics collections.
[[list-analytics-collection-response-codes]]
==== {api-response-codes-title}
`404`::
Criteria does not match any Analytics Collections.
==== {api-response-codes-title}
[[list-analytics-collection-example]]
==== {api-examples-title}
The following example lists all configured Analytics Collections:
[source,console]
----
GET _application/analytics/
----
A sample response:
[source,console-result]
----
{
"my_analytics_collection": {
"event_data_stream": {
"name": "behavioral_analytics-events-my_analytics_collection"
}
},
"my_analytics_collection2": {
"event_data_stream": {
"name": "behavioral_analytics-events-my_analytics_collection2"
}
}
}
----
The following example returns the Analytics Collection that matches `my_analytics_collection`:
[source,console]
----
GET _application/analytics/my_analytics_collection
----
A sample response:
[source,console-result]
----
{
"my_analytics_collection": {
"event_data_stream": {
"name": "behavioral_analytics-events-my_analytics_collection"
}
}
}
----
The following example returns all Analytics Collections prefixed with `my`:
[source,console]
----
GET _application/analytics/my*
----
A sample response:
[source,console-result]
----
{
"my_analytics_collection": {
"event_data_stream": {
"name": "behavioral_analytics-events-my_analytics_collection"
}
},
"my_analytics_collection2": {
"event_data_stream": {
"name": "behavioral_analytics-events-my_analytics_collection2"
}
}
}
----