Skip to content

Commit 9139662

Browse files
elasticmachineJoshMock
andauthoredFeb 11, 2025
Auto-generated API code (#2610)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
1 parent 9e4572f commit 9139662

File tree

3 files changed

+98
-54
lines changed

3 files changed

+98
-54
lines changed
 

‎docs/reference.asciidoc

+20-7
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ client.bulk({ ... })
149149
* *Request (object):*
150150
** *`index` (Optional, string)*: The name of the data stream, index, or index alias to perform bulk actions on.
151151
** *`operations` (Optional, { index, create, update, delete } | { detect_noop, doc, doc_as_upsert, script, scripted_upsert, _source, upsert } | object[])*
152+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
152153
** *`list_executed_pipelines` (Optional, boolean)*: If `true`, the response will include the ingest pipelines that were run for each index or create.
153154
** *`pipeline` (Optional, string)*: The pipeline identifier to use to preprocess incoming documents. If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. If a final pipeline is configured, it will always run regardless of the value of this parameter.
154155
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search. If `wait_for`, wait for a refresh to make this operation visible to search. If `false`, do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
@@ -323,6 +324,7 @@ client.create({ id, index })
323324
** *`id` (string)*: A unique identifier for the document. To automatically generate a document ID, use the `POST /<target>/_doc/` request format.
324325
** *`index` (string)*: The name of the data stream or index to target. If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream. If the target doesn't exist and doesn’t match a data stream template, this request creates the index.
325326
** *`document` (Optional, object)*: A document.
327+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
326328
** *`pipeline` (Optional, string)*: The ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. If a final pipeline is configured, it will always run regardless of the value of this parameter.
327329
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search. If `wait_for`, it waits for a refresh to make this operation visible to search. If `false`, it does nothing with refreshes.
328330
** *`routing` (Optional, string)*: A custom value that is used to route operations to a specific shard.
@@ -1031,6 +1033,7 @@ client.index({ index })
10311033
** *`document` (Optional, object)*: A document.
10321034
** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
10331035
** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
1036+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
10341037
** *`op_type` (Optional, Enum("index" | "create"))*: Set to `create` to only index the document if it does not already exist (put if absent). If a document with the specified `_id` already exists, the indexing operation will fail. The behavior is the same as using the `<index>/_create` endpoint. If a document ID is specified, this paramater defaults to `index`. Otherwise, it defaults to `create`. If the request targets a data stream, an `op_type` of `create` is required.
10351038
** *`pipeline` (Optional, string)*: The ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
10361039
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search. If `wait_for`, it waits for a refresh to make this operation visible to search. If `false`, it does nothing with refreshes.
@@ -2140,6 +2143,7 @@ client.update({ id, index })
21402143
** *`upsert` (Optional, object)*: If the document does not already exist, the contents of 'upsert' are inserted as a new document. If the document exists, the 'script' is run.
21412144
** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
21422145
** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
2146+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
21432147
** *`lang` (Optional, string)*: The script language.
21442148
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search. If 'wait_for', it waits for a refresh to make this operation visible to search. If 'false', it does nothing with refreshes.
21452149
** *`require_alias` (Optional, boolean)*: If `true`, the destination must be an index alias.
@@ -2341,7 +2345,7 @@ client.asyncSearch.get({ id })
23412345

23422346
* *Request (object):*
23432347
** *`id` (string)*: A unique identifier for the async search.
2344-
** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search should be available in the cluster.
2348+
** *`keep_alive` (Optional, string | -1 | 0)*: The length of time that the async search should be available in the cluster.
23452349
When not specified, the `keep_alive` set with the corresponding submit async request will be used.
23462350
Otherwise, it is possible to override the value and extend the validity of the request.
23472351
When this period expires, the search, if still running, is cancelled.
@@ -2356,7 +2360,10 @@ By default no timeout is set meaning that the currently available results will b
23562360
Get the async search status.
23572361

23582362
Get the status of a previously submitted async search request given its identifier, without retrieving search results.
2359-
If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
2363+
If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:
2364+
2365+
* The user or API key that submitted the original async search request.
2366+
* Users that have the `monitor` cluster privilege or greater privileges.
23602367

23612368
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit[Endpoint documentation]
23622369
[source,ts]
@@ -2369,7 +2376,7 @@ client.asyncSearch.status({ id })
23692376

23702377
* *Request (object):*
23712378
** *`id` (string)*: A unique identifier for the async search.
2372-
** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search needs to be available.
2379+
** *`keep_alive` (Optional, string | -1 | 0)*: The length of time that the async search needs to be available.
23732380
Ongoing async searches and any saved search results are deleted after this period.
23742381

23752382
[discrete]
@@ -3282,6 +3289,7 @@ If `false`, the request returns a 404 status code when there are no matches or o
32823289
[discrete]
32833290
==== delete_auto_follow_pattern
32843291
Delete auto-follow patterns.
3292+
32853293
Delete a collection of cross-cluster replication auto-follow patterns.
32863294

32873295
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern[Endpoint documentation]
@@ -3294,8 +3302,10 @@ client.ccr.deleteAutoFollowPattern({ name })
32943302
==== Arguments
32953303

32963304
* *Request (object):*
3297-
** *`name` (string)*: The name of the auto follow pattern.
3298-
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
3305+
** *`name` (string)*: The auto-follow pattern collection to delete.
3306+
** *`master_timeout` (Optional, string | -1 | 0)*: The period to wait for a connection to the master node.
3307+
If the master node is not available before the timeout expires, the request fails and returns an error.
3308+
It can also be set to `-1` to indicate that the request should never timeout.
32993309

33003310
[discrete]
33013311
==== follow
@@ -3342,6 +3352,7 @@ remote Lucene segment files to the follower index.
33423352
[discrete]
33433353
==== follow_info
33443354
Get follower information.
3355+
33453356
Get information about all cross-cluster replication follower indices.
33463357
For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.
33473358

@@ -3355,8 +3366,10 @@ client.ccr.followInfo({ index })
33553366
==== Arguments
33563367

33573368
* *Request (object):*
3358-
** *`index` (string | string[])*: A list of index patterns; use `_all` to perform the operation on all indices
3359-
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
3369+
** *`index` (string | string[])*: A comma-delimited list of follower index patterns.
3370+
** *`master_timeout` (Optional, string | -1 | 0)*: The period to wait for a connection to the master node.
3371+
If the master node is not available before the timeout expires, the request fails and returns an error.
3372+
It can also be set to `-1` to indicate that the request should never timeout.
33603373

33613374
[discrete]
33623375
==== follow_stats

‎src/api/api/async_search.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default class AsyncSearch {
128128
}
129129

130130
/**
131-
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
131+
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: * The user or API key that submitted the original async search request. * Users that have the `monitor` cluster privilege or greater privileges.
132132
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit | Elasticsearch API documentation}
133133
*/
134134
async status (this: That, params: T.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>

0 commit comments

Comments
 (0)
Please sign in to comment.