Get a controller

Introduced 2.12

Use this API to retrieve information about a controller for a model by model ID.

Path and HTTP methods

  1. GET /_plugins/_ml/controllers/<model_id>

Path parameters

The following table lists the available path parameters.

ParameterData typeDescription
model_idStringThe model ID of the model for which to retrieve the controller.

Example request

  1. GET /_plugins/_ml/controllers/T_S-cY0BKCJ3ot9qr0aP

copy

Example response

  1. {
  2. "model_id": "T_S-cY0BKCJ3ot9qr0aP",
  3. "user_rate_limiter": {
  4. "user1": {
  5. "limit": "4",
  6. "unit": "MINUTES"
  7. },
  8. "user2": {
  9. "limit": "4",
  10. "unit": "MINUTES"
  11. }
  12. }
  13. }

If there is no controller defined for the model, OpenSearch returns an error:

  1. {
  2. "error": {
  3. "root_cause": [
  4. {
  5. "type": "status_exception",
  6. "reason": "Failed to find model controller with the provided model ID: T_S-cY0BKCJ3ot9qr0aP"
  7. }
  8. ],
  9. "type": "status_exception",
  10. "reason": "Failed to find model controller with the provided model ID: T_S-cY0BKCJ3ot9qr0aP"
  11. },
  12. "status": 404
  13. }

Response body fields

For response field descriptions, see Create Controller API request fields.

Required permissions

If you use the Security plugin, make sure you have the appropriate permissions: cluster:admin/opensearch/ml/controllers/get.