List Analytics Collections

List Analytics Collections

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

New API reference

For the most up-to-date API details, refer to Behavioral analytics APIs.

Returns information about Behavioral Analytics Collections.

Request

GET _application/analytics/<criteria>

Prerequisites

Requires the manage_behavioral_analytics cluster privilege.

Path parameters

<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.

Response codes

404

Criteria does not match any Analytics Collections.

Response codes

Examples

The following example lists all configured Analytics Collections:

  1. resp = client.search_application.get_behavioral_analytics()
  2. print(resp)
  1. const response = await client.searchApplication.getBehavioralAnalytics();
  2. console.log(response);
  1. GET _application/analytics/

A sample response:

  1. {
  2. "my_analytics_collection": {
  3. "event_data_stream": {
  4. "name": "behavioral_analytics-events-my_analytics_collection"
  5. }
  6. },
  7. "my_analytics_collection2": {
  8. "event_data_stream": {
  9. "name": "behavioral_analytics-events-my_analytics_collection2"
  10. }
  11. }
  12. }

The following example returns the Analytics Collection that matches my_analytics_collection:

  1. resp = client.search_application.get_behavioral_analytics(
  2. name="my_analytics_collection",
  3. )
  4. print(resp)
  1. const response = await client.searchApplication.getBehavioralAnalytics({
  2. name: "my_analytics_collection",
  3. });
  4. console.log(response);
  1. GET _application/analytics/my_analytics_collection

A sample response:

  1. {
  2. "my_analytics_collection": {
  3. "event_data_stream": {
  4. "name": "behavioral_analytics-events-my_analytics_collection"
  5. }
  6. }
  7. }

The following example returns all Analytics Collections prefixed with my:

  1. resp = client.search_application.get_behavioral_analytics(
  2. name="my*",
  3. )
  4. print(resp)
  1. const response = await client.searchApplication.getBehavioralAnalytics({
  2. name: "my*",
  3. });
  4. console.log(response);
  1. GET _application/analytics/my*

A sample response:

  1. {
  2. "my_analytics_collection": {
  3. "event_data_stream": {
  4. "name": "behavioral_analytics-events-my_analytics_collection"
  5. }
  6. },
  7. "my_analytics_collection2": {
  8. "event_data_stream": {
  9. "name": "behavioral_analytics-events-my_analytics_collection2"
  10. }
  11. }
  12. }