get-trained-models.asciidoc 2.0 KB

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