get-trained-models.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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> Indicate if the total feature importance for the features used in training
  24. should be included in the model `metadata` field.
  25. <5> Should the definition be fully decompressed on GET
  26. <6> Allow empty response if no trained models match the provided ID patterns.
  27. If false, an error will be thrown if no trained models match the
  28. ID patterns.
  29. <7> An optional list of tags used to narrow the model search. A trained model
  30. can have many tags or none. The trained models in the response will
  31. contain all the provided tags.
  32. <8> Optional boolean value for requesting the trained model in a format that can
  33. then be put into another cluster. Certain fields that can only be set when
  34. the model is imported are removed.
  35. include::../execution.asciidoc[]
  36. [id="{upid}-{api}-response"]
  37. ==== Response
  38. The returned +{response}+ contains the requested trained model.
  39. ["source","java",subs="attributes,callouts,macros"]
  40. --------------------------------------------------
  41. include-tagged::{doc-tests-file}[{api}-response]
  42. --------------------------------------------------