본문 바로가기
WIKI 기술 지식 베이스

Get Controller API

원문 보기 위키 갱신

출처: 문서

본문

Get Controller API

2.12에 도입됨 {: .label .label-purple }

이 API를 사용하면 모델 ID를 통해 특정 모델의 컨트롤러 정보를 조회할 수 있어요.

엔드포인트

GET /_plugins/_ml/controllers/{model_id}

경로 파라미터

다음 표에서 사용 가능한 경로 파라미터를 확인할 수 있어요.

파라미터 데이터 타입 설명
model_id String 컨트롤러를 조회할 모델의 모델 ID예요.

예제 요청

GET /_plugins/_ml/controllers/T_S-cY0BKCJ3ot9qr0aP

{% include copy-curl.html %}

예제 응답

{
  "model_id": "T_S-cY0BKCJ3ot9qr0aP",
  "user_rate_limiter": {
    "user1": {
      "limit": "4",
      "unit": "MINUTES"
    },
    "user2": {
      "limit": "4",
      "unit": "MINUTES"
    }
  }
}

모델에 정의된 컨트롤러가 없으면 OpenSearch가 오류를 반환해요:

{
  "error": {
    "root_cause": [
      {
        "type": "status_exception",
        "reason": "Failed to find model controller with the provided model ID: T_S-cY0BKCJ3ot9qr0aP"
      }
    ],
    "type": "status_exception",
    "reason": "Failed to find model controller with the provided model ID: T_S-cY0BKCJ3ot9qr0aP"
  },
  "status": 404
}

응답 본문 필드

응답 필드에 대한 설명은 Create Controller API 요청 필드를 참고하세요.

필수 권한

Security 플러그인을 사용한다면 적절한 권한이 있어야 해요: cluster:admin/opensearch/ml/controllers/get.

더 알아보기 (Learn more)