get-trained-models.asciidoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. Retrieves one or more trained models.
  10. The API accepts a +{request}+ object and returns a +{response}+.
  11. [id="{upid}-{api}-request"]
  12. ==== Get trained models request
  13. A +{request}+ requires either a trained model ID, a comma-separated list of
  14. IDs, or the special wildcard `_all` to get all trained models.
  15. ["source","java",subs="attributes,callouts,macros"]
  16. --------------------------------------------------
  17. include-tagged::{doc-tests-file}[{api}-request]
  18. --------------------------------------------------
  19. <1> Constructing a new GET request referencing an existing trained model.
  20. <2> Set the paging parameters.
  21. <3> Indicate if the complete model definition should be included.
  22. <4> Indicate if the total feature importance for the features used in training
  23. should is included in the metadata.
  24. <5> Indicate if the feature importance baselines that were used in training are
  25. included in the metadata.
  26. <6> Should the definition be fully decompressed on GET.
  27. <7> Allow empty response if no trained models match the provided ID patterns.
  28. If false, an error will be thrown if no trained models match the
  29. ID patterns.
  30. <8> An optional list of tags used to narrow the model search. A trained model
  31. can have many tags or none. The trained models in the response will
  32. contain all the provided tags.
  33. <9> Optional boolean value for requesting the trained model in a format that can
  34. then be put into another cluster. Certain fields that can only be set when
  35. the model is imported are removed.
  36. include::../execution.asciidoc[]
  37. [id="{upid}-{api}-response"]
  38. ==== Response
  39. The returned +{response}+ contains the requested trained model.
  40. ["source","java",subs="attributes,callouts,macros"]
  41. --------------------------------------------------
  42. include-tagged::{doc-tests-file}[{api}-response]
  43. --------------------------------------------------