list-analytics-collection.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. [role="xpack"]
  2. [[list-analytics-collection]]
  3. === List Analytics Collections
  4. ++++
  5. <titleabbrev>List Analytics Collections</titleabbrev>
  6. ++++
  7. Returns information about Analytics Collections.
  8. [[list-analytics-collection-request]]
  9. ==== {api-request-title}
  10. `GET _application/analytics/<criteria>`
  11. [[list-analytics-collection-prereq]]
  12. ==== {api-prereq-title}
  13. Requires the `manage_behavioral_analytics` cluster privilege.
  14. [[list-analytics-collection-path-params]]
  15. ==== {api-path-parms-title}
  16. `<criteria>`::
  17. (optional, string)
  18. 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.
  19. [[list-analytics-collection-response-codes]]
  20. ==== {api-response-codes-title}
  21. `404`::
  22. Criteria does not match any Analytics Collections.
  23. ==== {api-response-codes-title}
  24. [[list-analytics-collection-example]]
  25. ==== {api-examples-title}
  26. The following example lists all configured Analytics Collections:
  27. [source,console]
  28. ----
  29. GET _application/analytics/
  30. ----
  31. // TEST[skip:TBD]
  32. A sample response:
  33. [source,console-result]
  34. ----
  35. {
  36. "my_analytics_collection": {
  37. "event_data_stream": {
  38. "name": "behavioral_analytics-events-my_analytics_collection"
  39. }
  40. },
  41. "my_analytics_collection2": {
  42. "event_data_stream": {
  43. "name": "behavioral_analytics-events-my_analytics_collection2"
  44. }
  45. }
  46. }
  47. ----
  48. The following example returns the Analytics Collection that matches `my_analytics_collection`:
  49. [source,console]
  50. ----
  51. GET _application/analytics/my_analytics_collection
  52. ----
  53. // TEST[skip:TBD]
  54. A sample response:
  55. [source,console-result]
  56. ----
  57. {
  58. "my_analytics_collection": {
  59. "event_data_stream": {
  60. "name": "behavioral_analytics-events-my_analytics_collection"
  61. }
  62. }
  63. }
  64. ----
  65. The following example returns all Analytics Collections prefixed with `my`:
  66. [source,console]
  67. ----
  68. GET _application/analytics/my*
  69. ----
  70. // TEST[skip:TBD]
  71. A sample response:
  72. [source,console-result]
  73. ----
  74. {
  75. "my_analytics_collection": {
  76. "event_data_stream": {
  77. "name": "behavioral_analytics-events-my_analytics_collection"
  78. }
  79. },
  80. "my_analytics_collection2": {
  81. "event_data_stream": {
  82. "name": "behavioral_analytics-events-my_analytics_collection2"
  83. }
  84. }
  85. }
  86. ----
  87. // TEST[skip:TBD]