Skip to content

Commit 733affa

Browse files
[DOCS] Adds descriptions to index APIs (G-Z) (#2230)
Co-authored-by: Abdon Pijpelink <[email protected]>
1 parent 4f8e9bc commit 733affa

28 files changed

+1113
-165
lines changed

output/schema/schema.json

Lines changed: 310 additions & 157 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
api-date-math-index-names,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#api-date-math-index-names
12
async-search,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/async-search.html
23
autoscaling-delete-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-delete-autoscaling-policy.html
34
autoscaling-get-autoscaling-capacity,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-get-autoscaling-capacity.html
45
autoscaling-get-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-get-autoscaling-policy.html
56
autoscaling-put-autoscaling-policy,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-put-autoscaling-policy.html
7+
avoid-index-pattern-collisions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/index-templates.html#avoid-index-pattern-collisions
68
docs-bulk,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-bulk.html
79
cat-alias,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cat-alias.html
810
cat-allocation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cat-allocation.html

specification/indices/_types/IndexTemplate.ts

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,43 @@ import {
2929
} from '@indices/_types/DataLifecycle'
3030

3131
export class IndexTemplate {
32+
/**
33+
* Name of the index template.
34+
*/
3235
index_patterns: Names
36+
/**
37+
* An ordered list of component template names.
38+
* Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
39+
*/
3340
composed_of: Name[]
41+
/**
42+
* Template to be applied.
43+
* It may optionally include an `aliases`, `mappings`, or `settings` configuration.
44+
*/
3445
template?: IndexTemplateSummary
46+
/**
47+
* Version number used to manage index templates externally.
48+
* This number is not automatically generated by Elasticsearch.
49+
*/
3550
version?: VersionNumber
51+
/**
52+
* Priority to determine index template precedence when a new data stream or index is created.
53+
* The index template with the highest priority is chosen.
54+
* If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
55+
* This number is not automatically generated by Elasticsearch.
56+
*/
3657
priority?: long
37-
/** @doc_id mapping-meta-field */
58+
/**
59+
* Optional user metadata about the index template. May have any contents.
60+
* This map is not automatically generated by Elasticsearch.
61+
* @doc_id mapping-meta-field */
3862
_meta?: Metadata
3963
allow_auto_create?: boolean
64+
/**
65+
* If this object is included, the template is used to create data streams and their backing indices.
66+
* Supports an empty object.
67+
* Data streams require a matching index template with a `data_stream` object.
68+
*/
4069
data_stream?: IndexTemplateDataStreamConfiguration
4170
}
4271

@@ -54,8 +83,21 @@ export class IndexTemplateDataStreamConfiguration {
5483
}
5584

5685
export class IndexTemplateSummary {
86+
/**
87+
* Aliases to add.
88+
* If the index template includes a `data_stream` object, these are data stream aliases.
89+
* Otherwise, these are index aliases.
90+
* Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
91+
*/
5792
aliases?: Dictionary<IndexName, Alias>
93+
/**
94+
* Mapping for fields in the index.
95+
* If specified, this mapping can include field names, field data types, and mapping parameters.
96+
*/
5897
mappings?: TypeMapping
98+
/**
99+
* Configuration options for the index.
100+
*/
59101
settings?: IndexSettings
60102
/**
61103
* @availability stack since=8.8.0 stability=experimental

specification/indices/get_alias/IndicesGetAliasRequest.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,50 @@ import { RequestBase } from '@_types/Base'
2121
import { ExpandWildcards, Indices, Names } from '@_types/common'
2222

2323
/**
24+
* Retrieves information for one or more aliases.
2425
* @rest_spec_name indices.get_alias
2526
* @availability stack since=0.0.0 stability=stable
2627
* @availability serverless stability=stable visibility=public
2728
*/
2829
export interface Request extends RequestBase {
2930
path_parts: {
31+
/**
32+
* Comma-separated list of aliases to retrieve.
33+
* Supports wildcards (`*`).
34+
* To retrieve all aliases, omit this parameter or use `*` or `_all`.
35+
*/
3036
name?: Names
37+
/**
38+
* Comma-separated list of data streams or indices used to limit the request.
39+
* Supports wildcards (`*`).
40+
* To target all data streams and indices, omit this parameter or use `*` or `_all`.
41+
*/
3142
index?: Indices
3243
}
3344
query_parameters: {
45+
/**
46+
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
47+
* This behavior applies even if the request targets other open indices.
48+
* @server_default true
49+
*/
3450
allow_no_indices?: boolean
51+
/**
52+
* Type of index that wildcard patterns can match.
53+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
54+
* Supports comma-separated values, such as `open,hidden`.
55+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
56+
* @server_default open
57+
*/
3558
expand_wildcards?: ExpandWildcards
59+
/**
60+
* If `false`, the request returns an error if it targets a missing or closed index.
61+
* @server_default false
62+
*/
3663
ignore_unavailable?: boolean
64+
/**
65+
* If `true`, the request retrieves information from the local node only.
66+
* @server_default false
67+
*/
3768
local?: boolean
3869
}
3970
}

specification/indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,25 @@ import { ExpandWildcards, DataStreamNames } from '@_types/common'
2828
*/
2929
export interface Request extends RequestBase {
3030
path_parts: {
31+
/**
32+
* Comma-separated list of data streams to limit the request.
33+
* Supports wildcards (`*`).
34+
* To target all data streams, omit this parameter or use `*` or `_all`.
35+
*/
3136
name: DataStreamNames
3237
}
3338
query_parameters: {
39+
/**
40+
* Type of data stream that wildcard patterns can match.
41+
* Supports comma-separated values, such as `open,hidden`.
42+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
43+
* @server_default open
44+
*/
3445
expand_wildcards?: ExpandWildcards
46+
/**
47+
* If `true`, return all default settings in the response.
48+
* @server_default false
49+
*/
3550
include_defaults?: boolean
3651
}
3752
}

specification/indices/get_field_mapping/IndicesGetFieldMappingRequest.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,53 @@ import { RequestBase } from '@_types/Base'
2121
import { ExpandWildcards, Fields, Indices } from '@_types/common'
2222

2323
/**
24+
* Retrieves mapping definitions for one or more fields.
25+
* For data streams, the API retrieves field mappings for the stream’s backing indices.
2426
* @rest_spec_name indices.get_field_mapping
2527
* @availability stack since=0.0.0 stability=stable
2628
*/
2729
export interface Request extends RequestBase {
2830
path_parts: {
31+
/**
32+
* Comma-separated list or wildcard expression of fields used to limit returned information.
33+
*/
2934
fields: Fields
35+
/**
36+
* Comma-separated list of data streams, indices, and aliases used to limit the request.
37+
* Supports wildcards (`*`).
38+
* To target all data streams and indices, omit this parameter or use `*` or `_all`.
39+
*/
3040
index?: Indices
3141
}
3242
query_parameters: {
43+
/**
44+
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
45+
* This behavior applies even if the request targets other open indices.
46+
* @server_default true
47+
*/
3348
allow_no_indices?: boolean
49+
/**
50+
* Type of index that wildcard patterns can match.
51+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
52+
* Supports comma-separated values, such as `open,hidden`.
53+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
54+
* @server_default open
55+
*/
3456
expand_wildcards?: ExpandWildcards
57+
/**
58+
* If `false`, the request returns an error if it targets a missing or closed index.
59+
* @server_default false
60+
*/
3561
ignore_unavailable?: boolean
62+
/**
63+
* If `true`, return all default settings in the response.
64+
* @server_default false
65+
*/
3666
include_defaults?: boolean
67+
/**
68+
* If `true`, the request retrieves information from the local node only.
69+
* @server_default false
70+
*/
3771
local?: boolean
3872
}
3973
}

specification/indices/get_mapping/IndicesGetMappingRequest.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,51 @@ import { ExpandWildcards, Indices } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Retrieves mapping definitions for one or more indices.
26+
* For data streams, the API retrieves mappings for the stream’s backing indices.
2527
* @rest_spec_name indices.get_mapping
2628
* @availability stack since=0.0.0 stability=stable
2729
* @availability serverless stability=stable visibility=public
2830
*/
2931
export interface Request extends RequestBase {
3032
path_parts: {
33+
/**
34+
* Comma-separated list of data streams, indices, and aliases used to limit the request.
35+
* Supports wildcards (`*`).
36+
* To target all data streams and indices, omit this parameter or use `*` or `_all`.
37+
*/
3138
index?: Indices
3239
}
3340
query_parameters: {
41+
/**
42+
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
43+
* This behavior applies even if the request targets other open indices.
44+
* @server_default true
45+
*/
3446
allow_no_indices?: boolean
47+
/**
48+
* Type of index that wildcard patterns can match.
49+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
50+
* Supports comma-separated values, such as `open,hidden`.
51+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
52+
* @server_default open
53+
*/
3554
expand_wildcards?: ExpandWildcards
55+
/**
56+
* If `false`, the request returns an error if it targets a missing or closed index.
57+
* @server_default false
58+
*/
3659
ignore_unavailable?: boolean
60+
/**
61+
* If `true`, the request retrieves information from the local node only.
62+
* @server_default false
63+
*/
3764
local?: boolean
65+
/**
66+
* Period to wait for a connection to the master node.
67+
* If no response is received before the timeout expires, the request fails and returns an error.
68+
* @server_default 30s
69+
*/
3870
master_timeout?: Duration
3971
}
4072
}

specification/indices/get_template/IndicesGetTemplateRequest.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,36 @@ import { Names } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Retrieves information about one or more index templates.
2526
* @rest_spec_name indices.get_template
2627
* @availability stack since=0.0.0 stability=stable
2728
* @availability serverless stability=stable visibility=public
2829
*/
2930
export interface Request extends RequestBase {
3031
path_parts: {
32+
/**
33+
* Comma-separated list of index template names used to limit the request.
34+
* Wildcard (`*`) expressions are supported.
35+
* To return all index templates, omit this parameter or use a value of `_all` or `*`.
36+
*/
3137
name?: Names
3238
}
3339
query_parameters: {
40+
/**
41+
* If `true`, returns settings in flat format.
42+
* @server_default false
43+
*/
3444
flat_settings?: boolean
45+
/**
46+
* If `true`, the request retrieves information from the local node only.
47+
* @server_default false
48+
*/
3549
local?: boolean
50+
/**
51+
* Period to wait for a connection to the master node.
52+
* If no response is received before the timeout expires, the request fails and returns an error.
53+
* @server_default 30s
54+
*/
3655
master_timeout?: Duration
3756
}
3857
}

specification/indices/open/IndicesOpenRequest.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,61 @@ import { ExpandWildcards, Indices, WaitForActiveShards } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Opens a closed index.
26+
* For data streams, the API opens any closed backing indices.
2527
* @rest_spec_name indices.open
2628
* @availability stack since=0.0.0 stability=stable
2729
* @availability serverless stability=stable visibility=private
2830
*/
2931
export interface Request extends RequestBase {
3032
path_parts: {
33+
/**
34+
* Comma-separated list of data streams, indices, and aliases used to limit the request.
35+
* Supports wildcards (`*`).
36+
* By default, you must explicitly name the indices you using to limit the request.
37+
* To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false.
38+
* You can update this setting in the `elasticsearch.yml` file or using the cluster update settings API.
39+
* @doc_id cluster-update-settings
40+
*/
3141
index: Indices
3242
}
3343
query_parameters: {
44+
/**
45+
* If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
46+
* This behavior applies even if the request targets other open indices.
47+
* @server_default true
48+
*/
3449
allow_no_indices?: boolean
50+
/**
51+
* Type of index that wildcard patterns can match.
52+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
53+
* Supports comma-separated values, such as `open,hidden`.
54+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
55+
* @server_default open
56+
*/
3557
expand_wildcards?: ExpandWildcards
58+
/**
59+
* If `false`, the request returns an error if it targets a missing or closed index.
60+
* @server_default false
61+
*/
3662
ignore_unavailable?: boolean
63+
/**
64+
* Period to wait for a connection to the master node.
65+
* If no response is received before the timeout expires, the request fails and returns an error.
66+
* @server_default 30s
67+
*/
3768
master_timeout?: Duration
69+
/**
70+
* Period to wait for a response.
71+
* If no response is received before the timeout expires, the request fails and returns an error.
72+
* @server_default 30s
73+
*/
3874
timeout?: Duration
75+
/**
76+
* The number of shard copies that must be active before proceeding with the operation.
77+
* Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
78+
* @server_default 1
79+
*/
3980
wait_for_active_shards?: WaitForActiveShards
4081
}
4182
}

0 commit comments

Comments
 (0)