-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
915 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
openapi: 3.1.0 | ||
info: | ||
title: OpenSearch ISM API | ||
description: Use the index state management operations to programmatically work with policies and managed indexes. | ||
version: 1.0.0 | ||
paths: | ||
/_plugins/_ism/policies/{policy_id}: | ||
get: | ||
operationId: ism.get_policy.0 | ||
x-operation-group: ism.get_policy | ||
description: Gets the policy. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy | ||
parameters: | ||
- $ref: '#/components/parameters/ism.get_policy::path.policy_id' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/ism.get_policy@200' | ||
put: | ||
operationId: ism.put_policy.0 | ||
x-operation-group: ism.put_policy | ||
description: Creates or updates a policy. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy | ||
parameters: | ||
- $ref: '#/components/parameters/ism.put_policy::path.policy_id' | ||
- $ref: '#/components/parameters/ism.put_policy::query.if_primary_term' | ||
- $ref: '#/components/parameters/ism.put_policy::query.if_seq_no' | ||
requestBody: | ||
$ref: '#/components/requestBodies/ism.put_policy' | ||
responses: | ||
'201': | ||
$ref: '#/components/responses/ism.put_policy@201' | ||
'200': | ||
$ref: '#/components/responses/ism.put_policy@200' | ||
delete: | ||
operationId: ism.delete_policy.0 | ||
x-operation-group: ism.delete_policy | ||
description: Deletes a policy. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy | ||
parameters: | ||
- $ref: '#/components/parameters/ism.delete_policy::path.policy_id' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/ism.delete_policy@200' | ||
/_plugins/_ism/add/{index}: | ||
post: | ||
operationId: ism.add_policy.0 | ||
x-operation-group: ism.add_policy | ||
description: Adds a policy to an index. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy | ||
parameters: | ||
- $ref: '#/components/parameters/ism.add_policy::path.index' | ||
requestBody: | ||
$ref: '#/components/requestBodies/ism.add_policy' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/ism.add_policy@200' | ||
/_plugins/_ism/remove/{index}: | ||
post: | ||
operationId: ism.remove_policy.0 | ||
x-operation-group: ism.remove_policy | ||
description: Removes a policy from an index. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy | ||
parameters: | ||
- $ref: '#/components/parameters/ism.remove_policy::path.index' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/ism.remove_policy@200' | ||
/_plugins/_ism/change_policy/{index}: | ||
post: | ||
operationId: ism.change_policy.0 | ||
x-operation-group: ism.change_policy | ||
description: Updates the managed index policy to a new policy. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy | ||
parameters: | ||
- $ref: '#/components/parameters/ism.change_policy::path.index' | ||
requestBody: | ||
$ref: '#/components/requestBodies/ism.change_policy' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/ism.change_policy@200' | ||
/_plugins/_ism/explain/{index}: | ||
get: | ||
operationId: ism.explain_index.0 | ||
x-operation-group: ism.explain_index | ||
description: Gets the currently applied policy on an index. | ||
externalDocs: | ||
url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index | ||
parameters: | ||
- $ref: '#/components/parameters/ism.explain_index::path.index' | ||
responses: | ||
'200': | ||
$ref: '#/components/responses/ism.explain_index@200' | ||
components: | ||
requestBodies: | ||
ism.put_policy: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/PutPolicyRequest' | ||
ism.add_policy: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/AddPolicyRequest' | ||
ism.change_policy: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/ChangePolicyRequest' | ||
responses: | ||
ism.get_policy@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/GetPolicyResponse' | ||
ism.put_policy@201: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/PutPolicyResponse' | ||
ism.put_policy@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/PutPolicyResponse' | ||
ism.delete_policy@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/DeletePolicyResponse' | ||
ism.add_policy@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/AddPolicyResponse' | ||
ism.remove_policy@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/RemovePolicyResponse' | ||
ism.change_policy@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/ChangePolicyResponse' | ||
ism.explain_index@200: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../schemas/ism._common.yaml#/components/schemas/ExplainIndexResponse' | ||
parameters: | ||
ism.get_policy::path.policy_id: | ||
name: policy_id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
ism.put_policy::path.policy_id: | ||
name: policy_id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
ism.delete_policy::path.policy_id: | ||
name: policy_id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
ism.put_policy::query.if_seq_no: | ||
name: if_seq_no | ||
in: query | ||
description: Only perform the operation if the document has this sequence number. | ||
schema: | ||
$ref: '../schemas/_common.yaml#/components/schemas/SequenceNumber' | ||
style: form | ||
ism.put_policy::query.if_primary_term: | ||
name: if_primary_term | ||
in: query | ||
description: Only perform the operation if the document has this primary term. | ||
schema: | ||
type: number | ||
style: form | ||
ism.add_policy::path.index: | ||
name: index | ||
in: path | ||
description: |- | ||
Comma-separated list of data streams, indices, and aliases. | ||
Supports wildcards (`*`). | ||
required: true | ||
schema: | ||
$ref: '../schemas/_common.yaml#/components/schemas/IndexName' | ||
style: simple | ||
ism.remove_policy::path.index: | ||
name: index | ||
in: path | ||
description: |- | ||
Comma-separated list of data streams, indices, and aliases. | ||
Supports wildcards (`*`). | ||
required: true | ||
schema: | ||
$ref: '../schemas/_common.yaml#/components/schemas/IndexName' | ||
style: simple | ||
ism.change_policy::path.index: | ||
name: index | ||
in: path | ||
description: |- | ||
Comma-separated list of data streams, indices, and aliases. | ||
Supports wildcards (`*`). | ||
required: true | ||
schema: | ||
$ref: '../schemas/_common.yaml#/components/schemas/IndexName' | ||
style: simple | ||
ism.explain_index::path.index: | ||
name: index | ||
in: path | ||
description: |- | ||
Comma-separated list of data streams, indices, and aliases. | ||
Supports wildcards (`*`). | ||
required: true | ||
schema: | ||
$ref: '../schemas/_common.yaml#/components/schemas/IndexName' | ||
style: simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.