get-trained-models.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --
  2. :api: get-trained-models
  3. :request: GetTrainedModelsRequest
  4. :response: GetTrainedModelsResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Get Trained Models API
  9. experimental[]
  10. Retrieves one or more Trained Models.
  11. The API accepts a +{request}+ object and returns a +{response}+.
  12. [id="{upid}-{api}-request"]
  13. ==== Get Trained Models request
  14. A +{request}+ requires either a Trained Model ID, a comma-separated list of
  15. IDs, or the special wildcard `_all` to get all Trained Models.
  16. ["source","java",subs="attributes,callouts,macros"]
  17. --------------------------------------------------
  18. include-tagged::{doc-tests-file}[{api}-request]
  19. --------------------------------------------------
  20. <1> Constructing a new GET request referencing an existing Trained Model
  21. <2> Set the paging parameters
  22. <3> Indicate if the complete model definition should be included
  23. <4> Should the definition be fully decompressed on GET
  24. <5> Allow empty response if no Trained Models match the provided ID patterns.
  25. If false, an error will be thrown if no Trained Models match the
  26. ID patterns.
  27. include::../execution.asciidoc[]
  28. [id="{upid}-{api}-response"]
  29. ==== Response
  30. The returned +{response}+ contains the requested Trained Model.
  31. ["source","java",subs="attributes,callouts,macros"]
  32. --------------------------------------------------
  33. include-tagged::{doc-tests-file}[{api}-response]
  34. --------------------------------------------------