| 12345678910111213141516171819202122232425262728293031323334353637383940414243 | --:api: get-trained-models:request: GetTrainedModelsRequest:response: GetTrainedModelsResponse--[role="xpack"][id="{upid}-{api}"]=== Get Trained Models APIexperimental[]Retrieves one or more Trained Models.The API accepts a +{request}+ object and returns a +{response}+.[id="{upid}-{api}-request"]==== Get Trained Models requestA +{request}+ requires either a Trained Model ID, a comma-separated list ofIDs, or the special wildcard `_all` to get all Trained Models.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests-file}[{api}-request]--------------------------------------------------<1> Constructing a new GET request referencing an existing Trained Model<2> Set the paging parameters<3> Indicate if the complete model definition should be included<4> Should the definition be fully decompressed on GET<5> Allow empty response if no Trained Models match the provided ID patterns.    If false, an error will be thrown if no Trained Models match the    ID patterns.include::../execution.asciidoc[][id="{upid}-{api}-response"]==== ResponseThe returned +{response}+ contains the requested Trained Model.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests-file}[{api}-response]--------------------------------------------------
 |