get-records.asciidoc 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --
  2. :api: get-records
  3. :request: GetRecordsRequest
  4. :response: GetRecordsResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get Records API
  8. The Get Records API retrieves one or more record results.
  9. It accepts a +{request}+ object and responds
  10. with a +{response}+ object.
  11. [id="{upid}-{api}-request"]
  12. ==== Get Records 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}-desc]
  24. --------------------------------------------------
  25. <1> If `true`, the records are sorted in descending order. Defaults to `false`.
  26. ["source","java",subs="attributes,callouts,macros"]
  27. --------------------------------------------------
  28. include-tagged::{doc-tests-file}[{api}-end]
  29. --------------------------------------------------
  30. <1> Records with timestamps earlier than this time will be returned.
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[{api}-exclude-interim]
  34. --------------------------------------------------
  35. <1> If `true`, interim results will be excluded. Defaults to `false`.
  36. ["source","java",subs="attributes,callouts,macros"]
  37. --------------------------------------------------
  38. include-tagged::{doc-tests-file}[{api}-page]
  39. --------------------------------------------------
  40. <1> The page parameters `from` and `size`. `from` specifies the number of records to skip.
  41. `size` specifies the maximum number of records to get. Defaults to `0` and `100` respectively.
  42. ["source","java",subs="attributes,callouts,macros"]
  43. --------------------------------------------------
  44. include-tagged::{doc-tests-file}[{api}-record-score]
  45. --------------------------------------------------
  46. <1> Records with record_score greater or equal than this value will be returned.
  47. ["source","java",subs="attributes,callouts,macros"]
  48. --------------------------------------------------
  49. include-tagged::{doc-tests-file}[{api}-sort]
  50. --------------------------------------------------
  51. <1> The field to sort records on. Defaults to `record_score`.
  52. ["source","java",subs="attributes,callouts,macros"]
  53. --------------------------------------------------
  54. include-tagged::{doc-tests-file}[{api}-start]
  55. --------------------------------------------------
  56. <1> Records with timestamps on or after this time will be returned.
  57. include::../execution.asciidoc[]
  58. [id="{upid}-{api}-response"]
  59. ==== Get Records Response
  60. The returned +{response}+ contains the requested records:
  61. ["source","java",subs="attributes,callouts,macros"]
  62. --------------------------------------------------
  63. include-tagged::{doc-tests-file}[{api}-response]
  64. --------------------------------------------------
  65. <1> The count of records that were matched
  66. <2> The records retrieved