Skip to content

Commit d11b609

Browse files
Add api spec for tiering of indices from hot to warm
Signed-off-by: Neetika Singhal <[email protected]>
1 parent 7cae0b8 commit d11b609

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

spec/namespaces/indices.yaml

+85
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,22 @@ paths:
17931793
responses:
17941794
'200':
17951795
$ref: '#/components/responses/indices.stats@200'
1796+
/{index}/_tier/warm:
1797+
post:
1798+
operationId: indices.tier_hot_to_warm.0
1799+
x-operation-group: indices.tier_hot_to_warm
1800+
x-version-added: 2.16.0
1801+
description: Tier the index from hot to warm in the cluster.
1802+
parameters:
1803+
- $ref: '#/components/parameters/indices.tier_hot_to_warm::path.index'
1804+
- $ref: '#/components/parameters/indices.tier_hot_to_warm::query.allow_no_indices'
1805+
- $ref: '#/components/parameters/indices.tier_hot_to_warm::query.cluster_manager_timeout'
1806+
- $ref: '#/components/parameters/indices.tier_hot_to_warm::query.ignore_unavailable'
1807+
- $ref: '#/components/parameters/indices.tier_hot_to_warm::query.timeout'
1808+
- $ref: '#/components/parameters/indices.tier_hot_to_warm::query.wait_for_completion'
1809+
responses:
1810+
'200':
1811+
$ref: '#/components/responses/indices.tier_hot_to_warm@200'
17961812
/{index}/_upgrade:
17971813
get:
17981814
operationId: indices.get_upgrade.1
@@ -2743,6 +2759,22 @@ components:
27432759
required:
27442760
- _all
27452761
- _shards
2762+
indices.tier_hot_to_warm@200:
2763+
description: Hot to warm tiering response
2764+
content:
2765+
application/json:
2766+
schema:
2767+
type: object
2768+
properties:
2769+
acknowledged:
2770+
type: boolean
2771+
failed_indices:
2772+
type: array
2773+
items:
2774+
$ref: '../schemas/tier.hot_to_warm.yaml#/components/schemas/FailedIndex'
2775+
required:
2776+
- acknowledged
2777+
- failed_indices
27462778
indices.update_aliases@200:
27472779
description: ''
27482780
content:
@@ -5126,6 +5158,59 @@ components:
51265158
schema:
51275159
$ref: '../schemas/_common.yaml#/components/schemas/Level'
51285160
style: form
5161+
indices.tier_hot_to_warm::path.index:
5162+
in: path
5163+
name: index
5164+
description: |-
5165+
Comma-separated list of data streams, indices, and aliases to tier from hot to warm.
5166+
Supports wildcards (`*`).
5167+
To search all data streams or indices, omit this parameter or use `*` or `_all`.
5168+
required: true
5169+
schema:
5170+
$ref: '../schemas/_common.yaml#/components/schemas/Indices'
5171+
style: simple
5172+
indices.tier_hot_to_warm::query.allow_no_indices:
5173+
in: query
5174+
name: allow_no_indices
5175+
description: |-
5176+
If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
5177+
This behavior applies even if the request targets other open indices.
5178+
schema:
5179+
type: boolean
5180+
default: false
5181+
style: form
5182+
indices.tier_hot_to_warm::query.cluster_manager_timeout:
5183+
name: cluster_manager_timeout
5184+
in: query
5185+
description: Operation timeout for connection to cluster-manager node.
5186+
schema:
5187+
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
5188+
x-version-added: 2.0.0
5189+
indices.tier_hot_to_warm::query.ignore_unavailable:
5190+
in: query
5191+
name: ignore_unavailable
5192+
description: If `false`, the request returns an error if it targets a missing or closed index.
5193+
schema:
5194+
type: boolean
5195+
default: false
5196+
style: form
5197+
indices.tier_hot_to_warm::query.timeout:
5198+
in: query
5199+
name: timeout
5200+
description: |-
5201+
Period to wait for a response.
5202+
If no response is received before the timeout expires, the request fails and returns an error.
5203+
schema:
5204+
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
5205+
style: form
5206+
indices.tier_hot_to_warm::query.wait_for_completion:
5207+
name: wait_for_completion
5208+
in: query
5209+
description: Should this request wait until the operation has completed before returning.
5210+
schema:
5211+
type: boolean
5212+
default: true
5213+
description: Should this request wait until the operation has completed before returning.
51295214
indices.update_aliases::query.cluster_manager_timeout:
51305215
name: cluster_manager_timeout
51315216
in: query

spec/schemas/tier.hot_to_warm.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
openapi: 3.1.0
2+
info:
3+
title: Schemas of tier_hot_to_warm category
4+
description: Schemas of tier_hot_to_warm category
5+
version: 1.0.0
6+
paths: {}
7+
components:
8+
schemas:
9+
FailedIndex:
10+
type: object
11+
properties:
12+
indices:
13+
type: array
14+
items:
15+
$ref: '_common.yaml#/components/schemas/IndexName'
16+
reason:
17+
type: string
18+
required:
19+
- indices
20+
- reason

tests/indices/index.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ chapters:
8383
parameters:
8484
index: books
8585

86+
- synopsis: Tier the `books` and `games` indices from hot to warm.
87+
path: /{index}/_tier/warm
88+
method: POST
89+
parameters:
90+
index: books,games
91+
response:
92+
status: 200
93+
8694
- synopsis: Delete the `books` and `games` indices.
8795
path: /{index}
8896
method: DELETE

0 commit comments

Comments
 (0)