| 1234567891011121314151617181920212223242526272829303132333435363738394041 | --:api: get-trained-models-stats:request: GetTrainedModelsStatsRequest:response: GetTrainedModelsStatsResponse--[role="xpack"][id="{upid}-{api}"]=== Get trained models stats APIRetrieves one or more trained model statistics.The API accepts a +{request}+ object and returns a +{response}+.[id="{upid}-{api}-request"]==== Get trained models stats requestA +{request}+ requires either a trained model ID, a comma-separated list ofIDs, or the special wildcard `_all` to get stats for 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> 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 statisticsfor the requested trained model.["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests-file}[{api}-response]--------------------------------------------------
 |