2024-02-20 12:09:31 -05:00
---
layout : default
title : Get controller
parent : Controller APIs
2026-11-30 10:49:53 -05:00
grand_parent : ML APIs
2024-02-20 12:09:31 -05:00
nav_order : 20
---
2026-11-30 10:49:53 -05:00
# Get Controller API
2024-02-20 12:09:31 -05:00
**Introduced 2.12**
{: .label .label-purple }
Use this API to retrieve information about a controller for a model by model ID.
2026-11-30 10:49:53 -05:00
## Endpoints
2024-02-20 12:09:31 -05:00
```json
2026-11-30 10:49:53 -05:00
GET /_plugins/_ml/controllers/ { model_id }
2024-02-20 12:09:31 -05:00
```
## Path parameters
The following table lists the available path parameters.
| Parameter | Data type | Description |
| :--- | :--- | :--- |
| `model_id` | String | The model ID of the model for which to retrieve the controller. |
2026-11-30 10:49:53 -05:00
## Example request
2024-02-20 12:09:31 -05:00
```json
GET /_plugins/_ml/controllers/T_S-cY 0 BKCJ 3 ot 9 qr 0 aP
```
{% include copy-curl.html %}
2026-11-30 10:49:53 -05:00
## Example response
2024-02-20 12:09:31 -05:00
```json
{
"model_id" : "T_S-cY0BKCJ3ot9qr0aP" ,
"user_rate_limiter" : {
"user1" : {
"limit" : "4" ,
"unit" : "MINUTES"
},
"user2" : {
"limit" : "4" ,
"unit" : "MINUTES"
}
}
}
```
If there is no controller defined for the model, OpenSearch returns an error:
```json
{
"error" : {
"root_cause" : [
{
"type" : "status_exception" ,
2026-11-30 10:49:53 -05:00
"reason" : "Failed to find model controller with the provided model ID"
2024-02-20 12:09:31 -05:00
}
],
"type" : "status_exception" ,
2026-11-30 10:49:53 -05:00
"reason" : "Failed to find model controller with the provided model ID"
2024-02-20 12:09:31 -05:00
},
"status" : 404
}
```
2026-11-30 10:49:53 -05:00
## Response body fields
2024-02-20 12:09:31 -05:00
2026-11-30 10:49:53 -05:00
For response field descriptions, see [Create Controller API request fields ]({{site.url}}{{site.baseurl}}/ml-commons-plugin/api/controller-apis/create-controller#request-body-fields ).
2024-02-20 12:09:31 -05:00
## Required permissions
If you use the Security plugin, make sure you have the appropriate permissions: `cluster:admin/opensearch/ml/controllers/get` .