get-trained-models.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. <6> An optional list of tags used to narrow the model search. A Trained Model
  28. can have many tags or none. The trained models in the response will
  29. contain all the provided tags.
  30. <7> Optional boolean value indicating if certain fields should be removed on
  31. retrieval. This is useful for getting the trained model in a format that
  32. can then be put into another cluster.
  33. include::../execution.asciidoc[]
  34. [id="{upid}-{api}-response"]
  35. ==== Response
  36. The returned +{response}+ contains the requested Trained Model.
  37. ["source","java",subs="attributes,callouts,macros"]
  38. --------------------------------------------------
  39. include-tagged::{doc-tests-file}[{api}-response]
  40. --------------------------------------------------