|
| 1 | +openapi: 3.1.0 |
| 2 | +info: |
| 3 | + title: OpenSearch ISM API |
| 4 | + description: Use the index state management operations to programmatically work with policies and managed indexes. |
| 5 | + version: 1.0.0 |
| 6 | +paths: |
| 7 | + /_plugins/_ism/policies/{policy_id}: |
| 8 | + get: |
| 9 | + operationId: ism.get_policy.0 |
| 10 | + x-operation-group: ism.get_policy |
| 11 | + description: Gets the policy. |
| 12 | + externalDocs: |
| 13 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#get-policy |
| 14 | + parameters: |
| 15 | + - $ref: '#/components/parameters/ism.get_policy::path.policy_id' |
| 16 | + responses: |
| 17 | + '200': |
| 18 | + $ref: '#/components/responses/ism.get_policy@200' |
| 19 | + put: |
| 20 | + operationId: ism.put_policy.0 |
| 21 | + x-operation-group: ism.put_policy |
| 22 | + description: Creates or updates a policy. |
| 23 | + externalDocs: |
| 24 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#create-policy |
| 25 | + parameters: |
| 26 | + - $ref: '#/components/parameters/ism.put_policy::path.policy_id' |
| 27 | + - $ref: '#/components/parameters/ism.put_policy::query.if_primary_term' |
| 28 | + - $ref: '#/components/parameters/ism.put_policy::query.if_seq_no' |
| 29 | + requestBody: |
| 30 | + $ref: '#/components/requestBodies/ism.put_policy' |
| 31 | + responses: |
| 32 | + '201': |
| 33 | + $ref: '#/components/responses/ism.put_policy@201' |
| 34 | + '200': |
| 35 | + $ref: '#/components/responses/ism.put_policy@200' |
| 36 | + delete: |
| 37 | + operationId: ism.delete_policy.0 |
| 38 | + x-operation-group: ism.delete_policy |
| 39 | + description: Deletes a policy. |
| 40 | + externalDocs: |
| 41 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#delete-policy |
| 42 | + parameters: |
| 43 | + - $ref: '#/components/parameters/ism.delete_policy::path.policy_id' |
| 44 | + responses: |
| 45 | + '200': |
| 46 | + $ref: '#/components/responses/ism.delete_policy@200' |
| 47 | + /_plugins/_ism/add/{index}: |
| 48 | + post: |
| 49 | + operationId: ism.add_policy.0 |
| 50 | + x-operation-group: ism.add_policy |
| 51 | + description: Adds a policy to an index. |
| 52 | + externalDocs: |
| 53 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#add-policy |
| 54 | + parameters: |
| 55 | + - $ref: '#/components/parameters/ism.add_policy::path.index' |
| 56 | + requestBody: |
| 57 | + $ref: '#/components/requestBodies/ism.add_policy' |
| 58 | + responses: |
| 59 | + '200': |
| 60 | + $ref: '#/components/responses/ism.add_policy@200' |
| 61 | + /_plugins/_ism/remove/{index}: |
| 62 | + post: |
| 63 | + operationId: ism.remove_policy.0 |
| 64 | + x-operation-group: ism.remove_policy |
| 65 | + description: Removes a policy from an index. |
| 66 | + externalDocs: |
| 67 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#remove-policy |
| 68 | + parameters: |
| 69 | + - $ref: '#/components/parameters/ism.remove_policy::path.index' |
| 70 | + responses: |
| 71 | + '200': |
| 72 | + $ref: '#/components/responses/ism.remove_policy@200' |
| 73 | + /_plugins/_ism/change_policy/{index}: |
| 74 | + post: |
| 75 | + operationId: ism.change_policy.0 |
| 76 | + x-operation-group: ism.change_policy |
| 77 | + description: Updates the managed index policy to a new policy. |
| 78 | + externalDocs: |
| 79 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#update-managed-index-policy |
| 80 | + parameters: |
| 81 | + - $ref: '#/components/parameters/ism.change_policy::path.index' |
| 82 | + requestBody: |
| 83 | + $ref: '#/components/requestBodies/ism.change_policy' |
| 84 | + responses: |
| 85 | + '200': |
| 86 | + $ref: '#/components/responses/ism.change_policy@200' |
| 87 | + /_plugins/_ism/explain/{index}: |
| 88 | + get: |
| 89 | + operationId: ism.explain_index.0 |
| 90 | + x-operation-group: ism.explain_index |
| 91 | + description: Gets the currently applied policy on an index. |
| 92 | + externalDocs: |
| 93 | + url: https://opensearch.org/docs/latest/im-plugin/ism/api/#explain-index |
| 94 | + parameters: |
| 95 | + - $ref: '#/components/parameters/ism.explain_index::path.index' |
| 96 | + responses: |
| 97 | + '200': |
| 98 | + $ref: '#/components/responses/ism.explain_index@200' |
| 99 | +components: |
| 100 | + requestBodies: |
| 101 | + ism.put_policy: |
| 102 | + content: |
| 103 | + application/json: |
| 104 | + schema: |
| 105 | + $ref: '../schemas/ism._common.yaml#/components/schemas/PutPolicyRequest' |
| 106 | + ism.add_policy: |
| 107 | + content: |
| 108 | + application/json: |
| 109 | + schema: |
| 110 | + $ref: '../schemas/ism._common.yaml#/components/schemas/AddPolicyRequest' |
| 111 | + ism.change_policy: |
| 112 | + content: |
| 113 | + application/json: |
| 114 | + schema: |
| 115 | + $ref: '../schemas/ism._common.yaml#/components/schemas/ChangePolicyRequest' |
| 116 | + responses: |
| 117 | + ism.get_policy@200: |
| 118 | + content: |
| 119 | + application/json: |
| 120 | + schema: |
| 121 | + $ref: '../schemas/ism._common.yaml#/components/schemas/GetPolicyResponse' |
| 122 | + ism.put_policy@201: |
| 123 | + content: |
| 124 | + application/json: |
| 125 | + schema: |
| 126 | + $ref: '../schemas/ism._common.yaml#/components/schemas/PutPolicyResponse' |
| 127 | + ism.put_policy@200: |
| 128 | + content: |
| 129 | + application/json: |
| 130 | + schema: |
| 131 | + $ref: '../schemas/ism._common.yaml#/components/schemas/PutPolicyResponse' |
| 132 | + ism.delete_policy@200: |
| 133 | + content: |
| 134 | + application/json: |
| 135 | + schema: |
| 136 | + $ref: '../schemas/ism._common.yaml#/components/schemas/DeletePolicyResponse' |
| 137 | + ism.add_policy@200: |
| 138 | + content: |
| 139 | + application/json: |
| 140 | + schema: |
| 141 | + $ref: '../schemas/ism._common.yaml#/components/schemas/AddPolicyResponse' |
| 142 | + ism.remove_policy@200: |
| 143 | + content: |
| 144 | + application/json: |
| 145 | + schema: |
| 146 | + $ref: '../schemas/ism._common.yaml#/components/schemas/RemovePolicyResponse' |
| 147 | + ism.change_policy@200: |
| 148 | + content: |
| 149 | + application/json: |
| 150 | + schema: |
| 151 | + $ref: '../schemas/ism._common.yaml#/components/schemas/ChangePolicyResponse' |
| 152 | + ism.explain_index@200: |
| 153 | + content: |
| 154 | + application/json: |
| 155 | + schema: |
| 156 | + $ref: '../schemas/ism._common.yaml#/components/schemas/ExplainIndexResponse' |
| 157 | + parameters: |
| 158 | + ism.get_policy::path.policy_id: |
| 159 | + name: policy_id |
| 160 | + in: path |
| 161 | + required: true |
| 162 | + schema: |
| 163 | + type: string |
| 164 | + ism.put_policy::path.policy_id: |
| 165 | + name: policy_id |
| 166 | + in: path |
| 167 | + required: true |
| 168 | + schema: |
| 169 | + type: string |
| 170 | + ism.delete_policy::path.policy_id: |
| 171 | + name: policy_id |
| 172 | + in: path |
| 173 | + required: true |
| 174 | + schema: |
| 175 | + type: string |
| 176 | + ism.put_policy::query.if_seq_no: |
| 177 | + name: if_seq_no |
| 178 | + in: query |
| 179 | + description: Only perform the operation if the document has this sequence number. |
| 180 | + schema: |
| 181 | + $ref: '../schemas/_common.yaml#/components/schemas/SequenceNumber' |
| 182 | + style: form |
| 183 | + ism.put_policy::query.if_primary_term: |
| 184 | + name: if_primary_term |
| 185 | + in: query |
| 186 | + description: Only perform the operation if the document has this primary term. |
| 187 | + schema: |
| 188 | + type: number |
| 189 | + style: form |
| 190 | + ism.add_policy::path.index: |
| 191 | + name: index |
| 192 | + in: path |
| 193 | + description: |- |
| 194 | + Comma-separated list of data streams, indices, and aliases. |
| 195 | + Supports wildcards (`*`). |
| 196 | + required: true |
| 197 | + schema: |
| 198 | + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' |
| 199 | + style: simple |
| 200 | + ism.remove_policy::path.index: |
| 201 | + name: index |
| 202 | + in: path |
| 203 | + description: |- |
| 204 | + Comma-separated list of data streams, indices, and aliases. |
| 205 | + Supports wildcards (`*`). |
| 206 | + required: true |
| 207 | + schema: |
| 208 | + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' |
| 209 | + style: simple |
| 210 | + ism.change_policy::path.index: |
| 211 | + name: index |
| 212 | + in: path |
| 213 | + description: |- |
| 214 | + Comma-separated list of data streams, indices, and aliases. |
| 215 | + Supports wildcards (`*`). |
| 216 | + required: true |
| 217 | + schema: |
| 218 | + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' |
| 219 | + style: simple |
| 220 | + ism.explain_index::path.index: |
| 221 | + name: index |
| 222 | + in: path |
| 223 | + description: |- |
| 224 | + Comma-separated list of data streams, indices, and aliases. |
| 225 | + Supports wildcards (`*`). |
| 226 | + required: true |
| 227 | + schema: |
| 228 | + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' |
| 229 | + style: simple |
0 commit comments