get-buckets.asciidoc 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --
  2. :api: get-buckets
  3. :request: GetBucketsRequest
  4. :response: GetBucketsResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get buckets API
  8. Retrieves one or more bucket results.
  9. It accepts a +{request}+ object and responds
  10. with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Get buckets request
  13. A +{request}+ object gets created with an existing non-null `jobId`.
  14. ["source","java",subs="attributes,callouts,macros"]
  15. --------------------------------------------------
  16. include-tagged::{doc-tests-file}[{api}-request]
  17. --------------------------------------------------
  18. <1> Constructing a new request referencing an existing `jobId`.
  19. ==== Optional arguments
  20. The following arguments are optional:
  21. ["source","java",subs="attributes,callouts,macros"]
  22. --------------------------------------------------
  23. include-tagged::{doc-tests-file}[{api}-timestamp]
  24. --------------------------------------------------
  25. <1> The timestamp of the bucket to get. Otherwise it will return all buckets.
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-anomaly-score]
  29. --------------------------------------------------
  30. <1> Buckets with anomaly scores greater or equal than this value will be returned.
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[{api}-desc]
  34. --------------------------------------------------
  35. <1> If `true`, the buckets are sorted in descending order. Defaults to `false`.
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-end]
  39. --------------------------------------------------
  40. <1> Buckets with timestamps earlier than this time will be returned.
  41. ["source","java",subs="attributes,callouts,macros"]
  42. --------------------------------------------------
  43. include-tagged::{doc-tests-file}[{api}-exclude-interim]
  44. --------------------------------------------------
  45. <1> If `true`, interim results will be excluded. Defaults to `false`.
  46. ["source","java",subs="attributes,callouts,macros"]
  47. --------------------------------------------------
  48. include-tagged::{doc-tests-file}[{api}-expand]
  49. --------------------------------------------------
  50. <1> If `true`, buckets will include their anomaly records. Defaults to `false`.
  51. ["source","java",subs="attributes,callouts,macros"]
  52. --------------------------------------------------
  53. include-tagged::{doc-tests-file}[{api}-page]
  54. --------------------------------------------------
  55. <1> The page parameters `from` and `size`. `from` specifies the number of buckets to skip.
  56. `size` specifies the maximum number of buckets to get. Defaults to `0` and `100` respectively.
  57. ["source","java",subs="attributes,callouts,macros"]
  58. --------------------------------------------------
  59. include-tagged::{doc-tests-file}[{api}-sort]
  60. --------------------------------------------------
  61. <1> The field to sort buckets on. Defaults to `timestamp`.
  62. ["source","java",subs="attributes,callouts,macros"]
  63. --------------------------------------------------
  64. include-tagged::{doc-tests-file}[{api}-start]
  65. --------------------------------------------------
  66. <1> Buckets with timestamps on or after this time will be returned.
  67. include::../execution.asciidoc[]
  68. [id="{upid}-{api}-response"]
  69. ==== Get buckets response
  70. The returned +{response}+ contains the requested buckets:
  71. ["source","java",subs="attributes,callouts,macros"]
  72. --------------------------------------------------
  73. include-tagged::{doc-tests-file}[{api}-response]
  74. --------------------------------------------------
  75. <1> The count of buckets that were matched.
  76. <2> The buckets retrieved.