CAT Templates API
CAT templates 작업은 인덱스 템플릿의 이름, 패턴, 순서 번호, 버전 번호를 나열해요.
출처: OpenSearch 문서
본문
엔드포인트 (Endpoints)
GET /_cat/templates
GET /_cat/templates/{name}
쿼리 매개변수 (Query parameters)
다음 표는 사용할 수 있는 쿼리 매개변수를 나열한 것이에요. 모든 쿼리 매개변수는 선택 사항이에요.
| Parameter | Data type | Description | Default | | cluster_manager_timeout | String | The amount of time allowed to establish a connection to the cluster manager node. | N/A | | format | String | A short version of the Accept header, such as json or yaml. | N/A | | h | List | A comma-separated list of column names to display. | N/A | | help | Boolean | Returns help information. | false | | local | Boolean | Returns local information but does not retrieve the state from the cluster manager node. | false | | s | List | A comma-separated list of column names or column aliases to sort by. | N/A | | v | Boolean | Enables verbose mode, which displays column headers. | false |
예제 요청 (Example requests)
다음 예제 요청은 모든 템플릿에 대한 정보를 반환해요.
GET /_cat/templates?v
response = client.cat.templates(
params = { "v": "true" }
)
특정 템플릿이나 패턴에 대한 정보를 얻으려면 다음처럼 해요.
GET /_cat/templates/
response = client.cat.templates(
name = ""
)
예제 응답 (Example response)
name | index_patterns order version composed_of
tenant_template | [opensearch-dashboards*] | 0 |
인덱스 템플릿에 대해 더 알아보려면 Index templates 문서를 참고하세요.
필요한 권한 (Required permissions)
Security 플러그인을 사용한다면 적절한 권한을 확인하세요: indices:admin/template/get