Auto-generated API code (#2579)

This commit is contained in:
Elastic Machine
2025-01-28 18:52:01 +01:00
committed by GitHub
parent aa7d327d20
commit 4e6cbf96aa
40 changed files with 3024 additions and 1024 deletions

View File

@ -0,0 +1,20 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.transport.request({
method: "POST",
path: "/_inference/chat_completion/openai-completion/_stream",
body: {
model: "gpt-4o",
messages: [
{
role: "user",
content: "What is Elastic?",
},
],
},
});
console.log(response);
----

View File

@ -3,12 +3,14 @@
[source, js]
----
const response = await client.inference.inference({
const response = await client.inference.put({
task_type: "my-inference-endpoint",
inference_id: "_update",
inference_config: {
service_settings: {
api_key: "<API_KEY>",
},
},
});
console.log(response);
----

View File

@ -0,0 +1,23 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.indices.create({
index: "test-index",
mappings: {
properties: {
source_field: {
type: "text",
fields: {
infer_field: {
type: "semantic_text",
inference_id: ".elser-2-elasticsearch",
},
},
},
},
},
});
console.log(response);
----

View File

@ -1,10 +0,0 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.indices.unfreeze({
index: "my-index-000001",
});
console.log(response);
----

View File

@ -1,23 +0,0 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.bulk({
index: "test-index",
operations: [
{
update: {
_id: "1",
},
},
{
doc: {
infer_field: "updated inference field",
source_field: "updated source field",
},
},
],
});
console.log(response);
----

View File

@ -0,0 +1,47 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.transport.request({
method: "POST",
path: "/_inference/chat_completion/openai-completion/_stream",
body: {
messages: [
{
role: "user",
content: [
{
type: "text",
text: "What's the price of a scarf?",
},
],
},
],
tools: [
{
type: "function",
function: {
name: "get_current_price",
description: "Get the current price of a item",
parameters: {
type: "object",
properties: {
item: {
id: "123",
},
},
},
},
},
],
tool_choice: {
type: "function",
function: {
name: "get_current_price",
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,20 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.search({
index: "image-index",
knn: {
field: "image-vector",
query_vector: [-5, 9, -12],
k: 10,
num_candidates: 100,
rescore_vector: {
oversample: 2,
},
},
fields: ["title", "file-type"],
});
console.log(response);
----

View File

@ -5,6 +5,9 @@
----
const response = await client.indices.create({
index: "retrievers_example",
settings: {
number_of_shards: 1,
},
mappings: {
properties: {
vector: {
@ -12,6 +15,9 @@ const response = await client.indices.create({
dims: 3,
similarity: "l2_norm",
index: true,
index_options: {
type: "flat",
},
},
text: {
type: "text",

View File

@ -5,7 +5,8 @@
----
const response = await client.cluster.putSettings({
persistent: {
"cluster.routing.allocation.disk.watermark.low": "30gb",
"cluster.routing.allocation.disk.watermark.low": "90%",
"cluster.routing.allocation.disk.watermark.high": "95%",
},
});
console.log(response);

View File

@ -7,14 +7,14 @@ const response = await client.indices.create({
index: "test-index",
mappings: {
properties: {
infer_field: {
type: "semantic_text",
inference_id: ".elser-2-elasticsearch",
},
source_field: {
type: "text",
copy_to: "infer_field",
},
infer_field: {
type: "semantic_text",
inference_id: ".elser-2-elasticsearch",
},
},
},
});

View File

@ -0,0 +1,34 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
[source, js]
----
const response = await client.transport.request({
method: "POST",
path: "/_inference/chat_completion/openai-completion/_stream",
body: {
messages: [
{
role: "assistant",
content: "Let's find out what the weather is",
tool_calls: [
{
id: "call_KcAjWtAww20AihPHphUh46Gd",
type: "function",
function: {
name: "get_current_weather",
arguments: '{"location":"Boston, MA"}',
},
},
],
},
{
role: "tool",
content: "The weather is cold",
tool_call_id: "call_KcAjWtAww20AihPHphUh46Gd",
},
],
},
});
console.log(response);
----

View File

@ -5,6 +5,9 @@
----
const response = await client.indices.create({
index: "retrievers_example_nested",
settings: {
number_of_shards: 1,
},
mappings: {
properties: {
nested_field: {
@ -18,6 +21,9 @@ const response = await client.indices.create({
dims: 3,
similarity: "l2_norm",
index: true,
index_options: {
type: "flat",
},
},
},
},

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -45,7 +45,7 @@ export default class Cat {
}
/**
* Get aliases. Retrieves the clusters index aliases, including filter and routing information. The API does not return data stream aliases. CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
* Get aliases. Get the cluster's index aliases, including filter and routing information. This API does not return data stream aliases. IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-alias.html | Elasticsearch API documentation}
*/
async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatAliasesResponse>
@ -85,7 +85,7 @@ export default class Cat {
}
/**
* Provides a snapshot of the number of shards allocated to each data node and their disk space. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
* Get shard allocation information. Get a snapshot of the number of shards allocated to each data node and their disk space. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-allocation.html | Elasticsearch API documentation}
*/
async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatAllocationResponse>
@ -125,7 +125,7 @@ export default class Cat {
}
/**
* Get component templates. Returns information about component templates in a cluster. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get component template API.
* Get component templates. Get information about component templates in a cluster. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get component template API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-component-templates.html | Elasticsearch API documentation}
*/
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatComponentTemplatesResponse>
@ -165,7 +165,7 @@ export default class Cat {
}
/**
* Get a document count. Provides quick access to a document count for a data stream, an index, or an entire cluster. The document count only includes live documents, not deleted documents which have not yet been removed by the merge process. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the count API.
* Get a document count. Get quick access to a document count for a data stream, an index, or an entire cluster. The document count only includes live documents, not deleted documents which have not yet been removed by the merge process. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the count API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-count.html | Elasticsearch API documentation}
*/
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatCountResponse>
@ -205,7 +205,7 @@ export default class Cat {
}
/**
* Returns the amount of heap memory currently used by the field data cache on every data node in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes stats API.
* Get field data cache information. Get the amount of heap memory currently used by the field data cache on every data node in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes stats API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-fielddata.html | Elasticsearch API documentation}
*/
async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatFielddataResponse>
@ -245,7 +245,7 @@ export default class Cat {
}
/**
* Returns the health status of a cluster, similar to the cluster health API. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the cluster health API. This API is often used to check malfunctioning clusters. To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats: `HH:MM:SS`, which is human-readable but includes no date information; `Unix epoch time`, which is machine-sortable and includes date information. The latter format is useful for cluster recoveries that take multiple days. You can use the cat health API to verify cluster health across multiple nodes. You also can use the API to track the recovery of a large cluster over a longer period of time.
* Get the cluster health status. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the cluster health API. This API is often used to check malfunctioning clusters. To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats: `HH:MM:SS`, which is human-readable but includes no date information; `Unix epoch time`, which is machine-sortable and includes date information. The latter format is useful for cluster recoveries that take multiple days. You can use the cat health API to verify cluster health across multiple nodes. You also can use the API to track the recovery of a large cluster over a longer period of time.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-health.html | Elasticsearch API documentation}
*/
async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatHealthResponse>
@ -275,7 +275,7 @@ export default class Cat {
}
/**
* Get CAT help. Returns help for the CAT APIs.
* Get CAT help. Get help for the CAT APIs.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat.html | Elasticsearch API documentation}
*/
async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatHelpResponse>
@ -305,7 +305,7 @@ export default class Cat {
}
/**
* Get index information. Returns high-level information about indices in a cluster, including backing indices for data streams. Use this request to get the following information for each index in a cluster: - shard count - document count - deleted document count - primary store size - total store size of all shards, including shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.
* Get index information. Get high-level information about indices in a cluster, including backing indices for data streams. Use this request to get the following information for each index in a cluster: - shard count - document count - deleted document count - primary store size - total store size of all shards, including shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-indices.html | Elasticsearch API documentation}
*/
async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatIndicesResponse>
@ -345,7 +345,7 @@ export default class Cat {
}
/**
* Returns information about the master node, including the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* Get master node information. Get information about the master node, including the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-master.html | Elasticsearch API documentation}
*/
async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMasterResponse>
@ -375,7 +375,7 @@ export default class Cat {
}
/**
* Get data frame analytics jobs. Returns configuration and usage information about data frame analytics jobs. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get data frame analytics jobs statistics API.
* Get data frame analytics jobs. Get configuration and usage information about data frame analytics jobs. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get data frame analytics jobs statistics API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-dfanalytics.html | Elasticsearch API documentation}
*/
async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlDataFrameAnalyticsResponse>
@ -415,7 +415,7 @@ export default class Cat {
}
/**
* Get datafeeds. Returns configuration and usage information about datafeeds. This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get datafeed statistics API.
* Get datafeeds. Get configuration and usage information about datafeeds. This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get datafeed statistics API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-datafeeds.html | Elasticsearch API documentation}
*/
async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlDatafeedsResponse>
@ -455,7 +455,7 @@ export default class Cat {
}
/**
* Get anomaly detection jobs. Returns configuration and usage information for anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get anomaly detection job statistics API.
* Get anomaly detection jobs. Get configuration and usage information for anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get anomaly detection job statistics API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-anomaly-detectors.html | Elasticsearch API documentation}
*/
async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlJobsResponse>
@ -495,7 +495,7 @@ export default class Cat {
}
/**
* Get trained models. Returns configuration and usage information about inference trained models. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get trained models statistics API.
* Get trained models. Get configuration and usage information about inference trained models. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get trained models statistics API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-trained-model.html | Elasticsearch API documentation}
*/
async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlTrainedModelsResponse>
@ -535,7 +535,7 @@ export default class Cat {
}
/**
* Returns information about custom node attributes. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* Get node attribute information. Get information about custom node attributes. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-nodeattrs.html | Elasticsearch API documentation}
*/
async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatNodeattrsResponse>
@ -565,7 +565,7 @@ export default class Cat {
}
/**
* Returns information about the nodes in a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* Get node information. Get information about the nodes in a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-nodes.html | Elasticsearch API documentation}
*/
async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatNodesResponse>
@ -595,7 +595,7 @@ export default class Cat {
}
/**
* Returns cluster-level changes that have not yet been executed. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.
* Get pending task information. Get information about cluster-level changes that have not yet taken effect. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-pending-tasks.html | Elasticsearch API documentation}
*/
async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatPendingTasksResponse>
@ -625,7 +625,7 @@ export default class Cat {
}
/**
* Returns a list of plugins running on each node of a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* Get plugin information. Get a list of plugins running on each node of a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-plugins.html | Elasticsearch API documentation}
*/
async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatPluginsResponse>
@ -655,7 +655,7 @@ export default class Cat {
}
/**
* Returns information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the streams backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
* Get shard recovery information. Get information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the streams backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-recovery.html | Elasticsearch API documentation}
*/
async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatRecoveryResponse>
@ -695,7 +695,7 @@ export default class Cat {
}
/**
* Returns the snapshot repositories for a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.
* Get snapshot repository information. Get a list of snapshot repositories for a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-repositories.html | Elasticsearch API documentation}
*/
async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatRepositoriesResponse>
@ -725,7 +725,7 @@ export default class Cat {
}
/**
* Returns low-level information about the Lucene segments in index shards. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.
* Get segment information. Get low-level information about the Lucene segments in index shards. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-segments.html | Elasticsearch API documentation}
*/
async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatSegmentsResponse>
@ -765,7 +765,7 @@ export default class Cat {
}
/**
* Returns information about the shards in a cluster. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
* Get shard information. Get information about the shards in a cluster. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-shards.html | Elasticsearch API documentation}
*/
async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatShardsResponse>
@ -805,7 +805,7 @@ export default class Cat {
}
/**
* Returns information about the snapshots stored in one or more repositories. A snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.
* Get snapshot information. Get information about the snapshots stored in one or more repositories. A snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-snapshots.html | Elasticsearch API documentation}
*/
async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatSnapshotsResponse>
@ -845,7 +845,7 @@ export default class Cat {
}
/**
* Returns information about tasks currently executing in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
* Get task information. Get information about tasks currently running in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html | Elasticsearch API documentation}
*/
async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTasksResponse>
@ -875,7 +875,7 @@ export default class Cat {
}
/**
* Returns information about index templates in a cluster. You can use index templates to apply index settings and field mappings to new indices at creation. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.
* Get index template information. Get information about the index templates in a cluster. You can use index templates to apply index settings and field mappings to new indices at creation. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-templates.html | Elasticsearch API documentation}
*/
async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTemplatesResponse>
@ -915,7 +915,7 @@ export default class Cat {
}
/**
* Returns thread pool statistics for each node in a cluster. Returned information includes all built-in thread pools and custom thread pools. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* Get thread pool statistics. Get thread pool statistics for each node in a cluster. Returned information includes all built-in thread pools and custom thread pools. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-thread-pool.html | Elasticsearch API documentation}
*/
async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatThreadPoolResponse>
@ -955,7 +955,7 @@ export default class Cat {
}
/**
* Get transforms. Returns configuration and usage information about transforms. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get transform statistics API.
* Get transform information. Get configuration and usage information about transforms. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get transform statistics API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cat-transforms.html | Elasticsearch API documentation}
*/
async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTransformsResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Count search results. Get the number of documents matching a query.
* Count search results. Get the number of documents matching a query. The query can either be provided using a simple query string as a parameter or using the Query DSL defined within the request body. The latter must be nested in a `query` key, which is the same as the search API. The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices. The operation is broadcast across all shards. For each shard ID group, a replica is chosen and the search is run against it. This means that replicas increase the scalability of the count.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-count.html | Elasticsearch API documentation}
*/
export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CountResponse>

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Delete a document. Removes a JSON document from the specified index.
* Delete a document. Remove a JSON document from the specified index. NOTE: You cannot send deletion requests directly to a data stream. To delete a document in a data stream, you must target the backing index containing the document. **Optimistic concurrency control** Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters. If a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`. **Versioning** Each document indexed is versioned. When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime. Every write operation run on a document, deletes included, causes its version to be incremented. The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations. The length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting. **Routing** If routing is used during indexing, the routing value also needs to be specified to delete a document. If the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request. For example: ``` DELETE /my-index-000001/_doc/1?routing=shard-1 ``` This request deletes the document with ID 1, but it is routed based on the user. The document is not deleted if the correct routing is not specified. **Distributed** The delete operation gets hashed into a specific shard ID. It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete.html | Elasticsearch API documentation}
*/
export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteResponse>

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,7 @@ interface That { transport: Transport }
/**
* Throttle a delete by query operation. Change the number of requests per second for a particular delete by query operation. Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete-by-query.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-delete-by-query.html#docs-delete-by-query-rethrottle | Elasticsearch API documentation}
*/
export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteByQueryRethrottleResponse>
export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteByQueryRethrottleResponse, unknown>>

View File

@ -45,22 +45,34 @@ export default class Esql {
}
/**
* Executes an ESQL request asynchronously
* Run an async ES|QL query. Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available. The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-api.html | Elasticsearch API documentation}
*/
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryResponse>
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryResponse, unknown>>
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryResponse>
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = []
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'profile', 'query', 'tables']
const querystring: Record<string, any> = {}
const body = undefined
// @ts-expect-error
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
@ -74,22 +86,54 @@ export default class Esql {
}
/**
* Retrieves the results of a previously submitted async query request given its ID.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-get-api.html | Elasticsearch API documentation}
* Delete an async ES|QL query. If the query is still running, it is cancelled. Otherwise, the stored results are deleted. If the Elasticsearch security features are enabled, only the following users can use this API to delete a query: * The authenticated user that submitted the original query request * Users with the `cancel_task` cluster privilege
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-delete-api.html | Elasticsearch API documentation}
*/
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryDeleteResponse>
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryDeleteResponse, unknown>>
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryDeleteResponse>
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['id']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
const method = 'DELETE'
const path = `/_query/async/${encodeURIComponent(params.id.toString())}`
const meta: TransportRequestMetadata = {
name: 'esql.async_query_delete',
pathParts: {
id: params.id
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Get async ES|QL query results. Get the current status and available results or stored results for an ES|QL asynchronous query. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/esql-async-query-get-api.html | Elasticsearch API documentation}
*/
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryGetResponse>
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryGetResponse, unknown>>
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryGetResponse>
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['id']
const querystring: Record<string, any> = {}
const body = undefined
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Check a document. Checks if a specified document exists.
* Check a document. Verify that a document exists. For example, check to see if a document with the `_id` 0 exists: ``` HEAD my-index-000001/_doc/0 ``` If the document exists, the API returns a status code of `200 - OK`. If the document doesnt exist, the API returns `404 - Not Found`. **Versioning support** You can use the `version` parameter to check the document only if its current version is equal to the specified one. Internally, Elasticsearch has marked the old document as deleted and added an entirely new document. The old version of the document doesn't disappear immediately, although you won't be able to access it. Elasticsearch cleans up deleted documents in the background as you continue to index more data.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html | Elasticsearch API documentation}
*/
export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Check for a document source. Checks if a document's `_source` is stored.
* Check for a document source. Check whether a document source exists in an index. For example: ``` HEAD my-index-000001/_source/1 ``` A document's source is not available if it is disabled in the mapping.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html | Elasticsearch API documentation}
*/
export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsSourceResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Get a document by its ID. Retrieves the document with the specified ID from an index.
* Get a document by its ID. Get a document and its source or stored fields from an index. By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search). In the case where stored fields are requested with the `stored_fields` parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields. To turn off realtime behavior, set the `realtime` parameter to false. **Source filtering** By default, the API returns the contents of the `_source` field unless you have used the `stored_fields` parameter or the `_source` field is turned off. You can turn off `_source` retrieval by using the `_source` parameter: ``` GET my-index-000001/_doc/0?_source=false ``` If you only need one or two fields from the `_source`, use the `_source_includes` or `_source_excludes` parameters to include or filter out particular fields. This can be helpful with large documents where partial retrieval can save on network overhead Both parameters take a comma separated list of fields or wildcard expressions. For example: ``` GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities ``` If you only want to specify includes, you can use a shorter notation: ``` GET my-index-000001/_doc/0?_source=*.id ``` **Routing** If routing is used during indexing, the routing value also needs to be specified to retrieve a document. For example: ``` GET my-index-000001/_doc/2?routing=user1 ``` This request gets the document with ID 2, but it is routed based on the user. The document is not fetched if the correct routing is not specified. **Distributed** The GET operation is hashed into a specific shard ID. It is then redirected to one of the replicas within that shard ID and returns the result. The replicas are the primary shard and its replicas within that shard ID group. This means that the more replicas you have, the better your GET scaling will be. **Versioning support** You can use the `version` parameter to retrieve the document only if its current version is equal to the specified one. Internally, Elasticsearch has marked the old document as deleted and added an entirely new document. The old version of the document doesn't disappear immediately, although you won't be able to access it. Elasticsearch cleans up deleted documents in the background as you continue to index more data.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html | Elasticsearch API documentation}
*/
export default async function GetApi<TDocument = unknown> (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetResponse<TDocument>>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Get a document's source. Returns the source of a document.
* Get a document's source. Get the source of a document. For example: ``` GET my-index-000001/_source/1 ``` You can use the source filtering parameters to control which parts of the `_source` are returned: ``` GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities ```
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-get.html | Elasticsearch API documentation}
*/
export default async function GetSourceApi<TDocument = unknown> (this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetSourceResponse<TDocument>>

File diff suppressed because one or more lines are too long

View File

@ -946,6 +946,7 @@ export default class Indices {
/**
* Get aliases. Retrieves information for one or more data stream or index aliases.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/indices-get-alias.html | Elasticsearch API documentation}
*/
async getAlias (this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetAliasResponse>
async getAlias (this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetAliasResponse, unknown>>

View File

@ -226,22 +226,34 @@ export default class Inference {
}
/**
* Perform streaming inference
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-stream-inference-api.html | Elasticsearch API documentation}
* Perform streaming inference. Get real-time responses for completion tasks by delivering answers incrementally, reducing response times during computation. This API works only with the completion task type. IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. This API requires the `monitor_inference` cluster privilege (the built-in `inference_admin` and `inference_user` roles grant this privilege). You must use a client that supports streaming.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/stream-inference-api.html | Elasticsearch API documentation}
*/
async streamInference (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async streamInference (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async streamInference (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async streamInference (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async streamInference (this: That, params: T.InferenceStreamInferenceRequest | TB.InferenceStreamInferenceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceStreamInferenceResponse>
async streamInference (this: That, params: T.InferenceStreamInferenceRequest | TB.InferenceStreamInferenceRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceStreamInferenceResponse, unknown>>
async streamInference (this: That, params: T.InferenceStreamInferenceRequest | TB.InferenceStreamInferenceRequest, options?: TransportRequestOptions): Promise<T.InferenceStreamInferenceResponse>
async streamInference (this: That, params: T.InferenceStreamInferenceRequest | TB.InferenceStreamInferenceRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['inference_id', 'task_type']
const acceptedBody: string[] = ['input']
const querystring: Record<string, any> = {}
const body = undefined
// @ts-expect-error
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
@ -264,4 +276,49 @@ export default class Inference {
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
/**
* Update an inference endpoint. Modify `task_settings`, secrets (within `service_settings`), or `num_allocations` for an inference endpoint, depending on the specific endpoint service and `task_type`. IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-inference-api.html | Elasticsearch API documentation}
*/
async update (this: That, params: T.InferenceUpdateRequest | TB.InferenceUpdateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceUpdateResponse>
async update (this: That, params: T.InferenceUpdateRequest | TB.InferenceUpdateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceUpdateResponse, unknown>>
async update (this: That, params: T.InferenceUpdateRequest | TB.InferenceUpdateRequest, options?: TransportRequestOptions): Promise<T.InferenceUpdateResponse>
async update (this: That, params: T.InferenceUpdateRequest | TB.InferenceUpdateRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['inference_id', 'task_type']
const acceptedBody: string[] = ['inference_config']
const querystring: Record<string, any> = {}
// @ts-expect-error
let body: any = params.body ?? undefined
for (const key in params) {
if (acceptedBody.includes(key)) {
// @ts-expect-error
body = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
let method = ''
let path = ''
if (params.task_type != null && params.inference_id != null) {
method = 'POST'
path = `/_inference/${encodeURIComponent(params.task_type.toString())}/${encodeURIComponent(params.inference_id.toString())}/_update`
} else {
method = 'POST'
path = `/_inference/${encodeURIComponent(params.inference_id.toString())}/_update`
}
const meta: TransportRequestMetadata = {
name: 'inference.update',
pathParts: {
inference_id: params.inference_id,
task_type: params.task_type
}
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}
}

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Open a point in time. A search request by default runs against the most recent visible data of the target indices, which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the state of the data as it existed when initiated. In some cases, its preferred to perform multiple search requests using the same point in time. For example, if refreshes happen between `search_after` requests, then the results of those requests might not be consistent as changes happening between searches are only visible to the more recent point in time. A point in time must be opened explicitly before being used in search requests. The `keep_alive` parameter tells Elasticsearch how long it should persist.
* Open a point in time. A search request by default runs against the most recent visible data of the target indices, which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the state of the data as it existed when initiated. In some cases, its preferred to perform multiple search requests using the same point in time. For example, if refreshes happen between `search_after` requests, then the results of those requests might not be consistent as changes happening between searches are only visible to the more recent point in time. A point in time must be opened explicitly before being used in search requests. A subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time. Just like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits. If you want to retrieve more hits, use PIT with `search_after`. IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request. When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception. To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime. **Keeping point in time alive** The `keep_alive` parameter, which is passed to a open point in time request and search request, extends the time to live of the corresponding point in time. The value does not need to be long enough to process all data — it just needs to be long enough for the next request. Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments. Once the smaller segments are no longer needed they are deleted. However, open point-in-times prevent the old segments from being deleted since they are still in use. TIP: Keeping older segments alive means that more disk space and file handles are needed. Ensure that you have configured your nodes to have ample free file handles. Additionally, if a segment contains deleted or updated documents then the point in time must keep track of whether each document in the segment was live at the time of the initial search request. Ensure that your nodes have sufficient heap space if you have many open point-in-times on an index that is subject to ongoing deletes or updates. Note that a point-in-time doesn't prevent its associated indices from being deleted. You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/point-in-time-api.html | Elasticsearch API documentation}
*/
export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.OpenPointInTimeResponse>

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Throttle a reindex operation. Change the number of requests per second for a particular reindex operation.
* Throttle a reindex operation. Change the number of requests per second for a particular reindex operation. For example: ``` POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1 ``` Rethrottling that speeds up the query takes effect immediately. Rethrottling that slows down the query will take effect after completing the current batch. This behavior prevents scroll timeouts.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-reindex.html | Elasticsearch API documentation}
*/
export default async function ReindexRethrottleApi (this: That, params: T.ReindexRethrottleRequest | TB.ReindexRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ReindexRethrottleResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Run a search. Get search hits that match the query defined in the request. You can provide search queries using the `q` query string parameter or the request body. If both are specified, only the query parameter is used.
* Run a search. Get search hits that match the query defined in the request. You can provide search queries using the `q` query string parameter or the request body. If both are specified, only the query parameter is used. If the Elasticsearch security features are enabled, you must have the read index privilege for the target data stream, index, or alias. For cross-cluster search, refer to the documentation about configuring CCS privileges. To search a point in time (PIT) for an alias, you must have the `read` index privilege for the alias's data streams or indices. **Search slicing** When paging through a large number of documents, it can be helpful to split the search into multiple slices to consume them independently with the `slice` and `pit` properties. By default the splitting is done first on the shards, then locally on each shard. The local splitting partitions the shard into contiguous ranges based on Lucene document IDs. For instance if the number of shards is equal to 2 and you request 4 slices, the slices 0 and 2 are assigned to the first shard and the slices 1 and 3 are assigned to the second shard. IMPORTANT: The same point-in-time ID should be used for all slices. If different PIT IDs are used, slices can overlap and miss documents. This situation can occur because the splitting criterion is based on Lucene document IDs, which are not stable across changes to the index.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/search-search.html | Elasticsearch API documentation}
*/
export default async function SearchApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchResponse<TDocument, TAggregations>>

View File

@ -45,7 +45,7 @@ export default class Security {
}
/**
* Activate a user profile. Create or update a user profile on behalf of another user.
* Activate a user profile. Create or update a user profile on behalf of another user. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. The calling application must have either an `access_token` or a combination of `username` and `password` for the user that the profile document is intended for. Elastic reserves the right to change or remove this feature in future releases without prior notice. This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including `username`, `full_name,` `roles`, and the authentication realm. For example, in the JWT `access_token` case, the profile user's `username` is extracted from the JWT token claim pointed to by the `claims.principal` setting of the JWT realm that authenticated the token. When updating a profile document, the API enables the document if it was disabled. Any updates do not change existing content for either the `labels` or `data` fields.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-activate-user-profile.html | Elasticsearch API documentation}
*/
async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityActivateUserProfileResponse>
@ -355,7 +355,7 @@ export default class Security {
}
/**
* Clear the user cache. Evict users from the user cache. You can completely clear the cache or evict specific users.
* Clear the user cache. Evict users from the user cache. You can completely clear the cache or evict specific users. User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. There are realm settings that you can use to configure the user cache. For more information, refer to the documentation about controlling the user cache.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-cache.html | Elasticsearch API documentation}
*/
async clearCachedRealms (this: That, params: T.SecurityClearCachedRealmsRequest | TB.SecurityClearCachedRealmsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityClearCachedRealmsResponse>
@ -419,7 +419,7 @@ export default class Security {
}
/**
* Clear service account token caches. Evict a subset of all entries from the service account token caches.
* Clear service account token caches. Evict a subset of all entries from the service account token caches. Two separate caches exist for service account tokens: one cache for tokens backed by the `service_tokens` file, and another for tokens backed by the `.security` index. This API clears matching entries from both caches. The cache for service account tokens backed by the `.security` index is cleared automatically on state changes of the security index. The cache for tokens backed by the `service_tokens` file is cleared automatically on file changes.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-service-token-caches.html | Elasticsearch API documentation}
*/
async clearCachedServiceTokens (this: That, params: T.SecurityClearCachedServiceTokensRequest | TB.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityClearCachedServiceTokensResponse>
@ -453,7 +453,7 @@ export default class Security {
}
/**
* Create an API key. Create an API key for access without requiring basic authentication. A successful request returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.
* Create an API key. Create an API key for access without requiring basic authentication. IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges. If you specify privileges, the API returns an error. A successful request returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys. The API keys are created by the Elasticsearch API key service, which is automatically enabled. To configure or turn off the API key service, refer to API key service setting documentation.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-api-key.html | Elasticsearch API documentation}
*/
async createApiKey (this: That, params?: T.SecurityCreateApiKeyRequest | TB.SecurityCreateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityCreateApiKeyResponse>
@ -536,7 +536,7 @@ export default class Security {
}
/**
* Create a service account token. Create a service accounts token for access without requiring basic authentication.
* Create a service account token. Create a service accounts token for access without requiring basic authentication. NOTE: Service account tokens never expire. You must actively delete them if they are no longer needed.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-service-token.html | Elasticsearch API documentation}
*/
async createServiceToken (this: That, params: T.SecurityCreateServiceTokenRequest | TB.SecurityCreateServiceTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityCreateServiceTokenResponse>
@ -618,7 +618,7 @@ export default class Security {
}
/**
* Delete application privileges.
* Delete application privileges. To use this API, you must have one of the following privileges: * The `manage_security` cluster privilege (or a greater privilege such as `all`). * The "Manage Application Privileges" global privilege for the application being referenced in the request.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-privilege.html | Elasticsearch API documentation}
*/
async deletePrivileges (this: That, params: T.SecurityDeletePrivilegesRequest | TB.SecurityDeletePrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityDeletePrivilegesResponse>
@ -651,7 +651,7 @@ export default class Security {
}
/**
* Delete roles. Delete roles in the native realm.
* Delete roles. Delete roles in the native realm. The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The delete roles API cannot remove roles that are defined in roles files.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role.html | Elasticsearch API documentation}
*/
async deleteRole (this: That, params: T.SecurityDeleteRoleRequest | TB.SecurityDeleteRoleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityDeleteRoleResponse>
@ -683,7 +683,7 @@ export default class Security {
}
/**
* Delete role mappings.
* Delete role mappings. Role mappings define which roles are assigned to each user. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The delete role mappings API cannot remove role mappings that are defined in role mapping files.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role-mapping.html | Elasticsearch API documentation}
*/
async deleteRoleMapping (this: That, params: T.SecurityDeleteRoleMappingRequest | TB.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityDeleteRoleMappingResponse>
@ -781,7 +781,7 @@ export default class Security {
}
/**
* Disable users. Disable users in the native realm.
* Disable users. Disable users in the native realm. By default, when you create users, they are enabled. You can use this API to revoke a user's access to Elasticsearch.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user.html | Elasticsearch API documentation}
*/
async disableUser (this: That, params: T.SecurityDisableUserRequest | TB.SecurityDisableUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityDisableUserResponse>
@ -813,7 +813,7 @@ export default class Security {
}
/**
* Disable a user profile. Disable user profiles so that they are not visible in user profile searches.
* Disable a user profile. Disable user profiles so that they are not visible in user profile searches. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice. When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so its not visible in these searches. To re-enable a disabled user profile, use the enable user profile API .
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user-profile.html | Elasticsearch API documentation}
*/
async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityDisableUserProfileResponse>
@ -845,7 +845,7 @@ export default class Security {
}
/**
* Enable users. Enable users in the native realm.
* Enable users. Enable users in the native realm. By default, when you create users, they are enabled.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user.html | Elasticsearch API documentation}
*/
async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnableUserResponse>
@ -877,7 +877,7 @@ export default class Security {
}
/**
* Enable a user profile. Enable user profiles to make them visible in user profile searches.
* Enable a user profile. Enable user profiles to make them visible in user profile searches. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice. When you activate a user profile, it's automatically enabled and visible in user profile searches. If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user-profile.html | Elasticsearch API documentation}
*/
async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnableUserProfileResponse>
@ -909,7 +909,7 @@ export default class Security {
}
/**
* Enroll Kibana. Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.
* Enroll Kibana. Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster. NOTE: This API is currently intended for internal use only by Kibana. Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-kibana-enrollment.html | Elasticsearch API documentation}
*/
async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnrollKibanaResponse>
@ -939,7 +939,7 @@ export default class Security {
}
/**
* Enroll a node. Enroll a new node to allow it to join an existing cluster with security features enabled.
* Enroll a node. Enroll a new node to allow it to join an existing cluster with security features enabled. The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster. The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-node-enrollment.html | Elasticsearch API documentation}
*/
async enrollNode (this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnrollNodeResponse>
@ -1029,7 +1029,7 @@ export default class Security {
}
/**
* Get application privileges.
* Get application privileges. To use this API, you must have one of the following privileges: * The `read_security` cluster privilege (or a greater privilege such as `manage_security` or `all`). * The "Manage Application Privileges" global privilege for the application being referenced in the request.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-privileges.html | Elasticsearch API documentation}
*/
async getPrivileges (this: That, params?: T.SecurityGetPrivilegesRequest | TB.SecurityGetPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetPrivilegesResponse>
@ -1153,7 +1153,7 @@ export default class Security {
}
/**
* Get service accounts. Get a list of service accounts that match the provided path parameters.
* Get service accounts. Get a list of service accounts that match the provided path parameters. NOTE: Currently, only the `elastic/fleet-server` service account is available.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-accounts.html | Elasticsearch API documentation}
*/
async getServiceAccounts (this: That, params?: T.SecurityGetServiceAccountsRequest | TB.SecurityGetServiceAccountsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetServiceAccountsResponse>
@ -1197,7 +1197,7 @@ export default class Security {
}
/**
* Get service account credentials.
* Get service account credentials. To use this API, you must have at least the `read_security` cluster privilege (or a greater privilege such as `manage_service_account` or `manage_security`). The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster. NOTE: For tokens backed by the `service_tokens` file, the API collects them from all nodes of the cluster. Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-credentials.html | Elasticsearch API documentation}
*/
async getServiceCredentials (this: That, params: T.SecurityGetServiceCredentialsRequest | TB.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetServiceCredentialsResponse>
@ -1230,13 +1230,13 @@ export default class Security {
}
/**
* Retrieve settings for the security system indices
* Get security index settings. Get the user-configurable settings for the security internal index (`.security` and associated indices). Only a subset of the index settings — those that are user-configurable—will be shown. This includes: * `index.auto_expand_replicas` * `index.number_of_replicas`
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-settings.html | Elasticsearch API documentation}
*/
async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async getSettings (this: That, params?: T.SecurityGetSettingsRequest | TB.SecurityGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetSettingsResponse>
async getSettings (this: That, params?: T.SecurityGetSettingsRequest | TB.SecurityGetSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityGetSettingsResponse, unknown>>
async getSettings (this: That, params?: T.SecurityGetSettingsRequest | TB.SecurityGetSettingsRequest, options?: TransportRequestOptions): Promise<T.SecurityGetSettingsResponse>
async getSettings (this: That, params?: T.SecurityGetSettingsRequest | TB.SecurityGetSettingsRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = []
const querystring: Record<string, any> = {}
const body = undefined
@ -1246,6 +1246,7 @@ export default class Security {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
@ -1259,7 +1260,7 @@ export default class Security {
}
/**
* Get a token. Create a bearer token for access without requiring basic authentication.
* Get a token. Create a bearer token for access without requiring basic authentication. The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface. Alternatively, you can explicitly enable the `xpack.security.authc.token.enabled` setting. When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface. The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body. A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available. The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used. That time period is defined by the `xpack.security.authc.token.timeout` setting. If you want to invalidate a token immediately, you can do so by using the invalidate token API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-token.html | Elasticsearch API documentation}
*/
async getToken (this: That, params?: T.SecurityGetTokenRequest | TB.SecurityGetTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetTokenResponse>
@ -1341,7 +1342,7 @@ export default class Security {
}
/**
* Get user privileges.
* Get user privileges. Get the security privileges for the logged in user. All users can use this API, but only to determine their own privileges. To check the privileges of other users, you must use the run as feature. To check whether a user has a specific list of privileges, use the has privileges API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-privileges.html | Elasticsearch API documentation}
*/
async getUserPrivileges (this: That, params?: T.SecurityGetUserPrivilegesRequest | TB.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetUserPrivilegesResponse>
@ -1371,7 +1372,7 @@ export default class Security {
}
/**
* Get a user profile. Get a user's profile using the unique profile ID.
* Get a user profile. Get a user's profile using the unique profile ID. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-profile.html | Elasticsearch API documentation}
*/
async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetUserProfileResponse>
@ -1403,7 +1404,7 @@ export default class Security {
}
/**
* Grant an API key. Create an API key on behalf of another user. This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created. It is not possible to use this API to create an API key without that users credentials. The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. In this case, the API key will be created on behalf of the impersonated user. This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. By default, API keys never expire. You can specify expiration information when you create the API keys.
* Grant an API key. Create an API key on behalf of another user. This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API. The caller must have authentication credentials for the user on whose behalf the API key will be created. It is not possible to use this API to create an API key without that user's credentials. The supported user authentication credential types are: * username and password * Elasticsearch access tokens * JWTs The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user. In this case, the API key will be created on behalf of the impersonated user. This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf. The API keys are created by the Elasticsearch API key service, which is automatically enabled. A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name. If applicable, it also returns expiration information for the API key in milliseconds. By default, API keys never expire. You can specify expiration information when you create the API keys.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-grant-api-key.html | Elasticsearch API documentation}
*/
async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGrantApiKeyResponse>
@ -1444,7 +1445,7 @@ export default class Security {
}
/**
* Check user privileges. Determine whether the specified user has a specified list of privileges.
* Check user privileges. Determine whether the specified user has a specified list of privileges. All users can use this API, but only to determine their own privileges. To check the privileges of other users, you must use the run as feature.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges.html | Elasticsearch API documentation}
*/
async hasPrivileges (this: That, params?: T.SecurityHasPrivilegesRequest | TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityHasPrivilegesResponse>
@ -1496,7 +1497,7 @@ export default class Security {
}
/**
* Check user profile privileges. Determine whether the users associated with the specified user profile IDs have all the requested privileges.
* Check user profile privileges. Determine whether the users associated with the specified user profile IDs have all the requested privileges. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges-user-profile.html | Elasticsearch API documentation}
*/
async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityHasPrivilegesUserProfileResponse>
@ -1537,7 +1538,7 @@ export default class Security {
}
/**
* Invalidate API keys. This API invalidates API keys created by the create API key or grant API key APIs. Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. The `manage_api_key` privilege allows deleting any API keys. The `manage_own_api_key` only allows deleting API keys that are owned by the user. In addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats: - Set the parameter `owner=true`. - Or, set both `username` and `realm_name` to match the users identity. - Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the `ids` field.
* Invalidate API keys. This API invalidates API keys created by the create API key or grant API key APIs. Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted. To use this API, you must have at least the `manage_security`, `manage_api_key`, or `manage_own_api_key` cluster privileges. The `manage_security` privilege allows deleting any API key, including both REST and cross cluster API keys. The `manage_api_key` privilege allows deleting any REST API key, but not cross cluster API keys. The `manage_own_api_key` only allows deleting REST API keys that are owned by the user. In addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats: - Set the parameter `owner=true`. - Or, set both `username` and `realm_name` to match the user's identity. - Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the `ids` field.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-api-key.html | Elasticsearch API documentation}
*/
async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityInvalidateApiKeyResponse>
@ -1579,7 +1580,7 @@ export default class Security {
}
/**
* Invalidate a token. The access tokens returned by the get token API have a finite period of time for which they are valid. After that time period, they can no longer be used. The time period is defined by the `xpack.security.authc.token.timeout` setting. The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
* Invalidate a token. The access tokens returned by the get token API have a finite period of time for which they are valid. After that time period, they can no longer be used. The time period is defined by the `xpack.security.authc.token.timeout` setting. The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once. If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API. NOTE: While all parameters are optional, at least one of them is required. More specifically, either one of `token` or `refresh_token` parameters is required. If none of these two are specified, then `realm_name` and/or `username` need to be specified.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-token.html | Elasticsearch API documentation}
*/
async invalidateToken (this: That, params?: T.SecurityInvalidateTokenRequest | TB.SecurityInvalidateTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityInvalidateTokenResponse>
@ -1745,7 +1746,7 @@ export default class Security {
}
/**
* Create or update application privileges.
* Create or update application privileges. To use this API, you must have one of the following privileges: * The `manage_security` cluster privilege (or a greater privilege such as `all`). * The "Manage Application Privileges" global privilege for the application being referenced in the request. Application names are formed from a prefix, with an optional suffix that conform to the following rules: * The prefix must begin with a lowercase ASCII letter. * The prefix must contain only ASCII letters or digits. * The prefix must be at least 3 characters long. * If the suffix exists, it must begin with either a dash `-` or `_`. * The suffix cannot contain any of the following characters: `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`, `*`. * No part of the name can contain whitespace. Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters `_`, `-`, and `.`. Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: `/`, `*`, `:`.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-privileges.html | Elasticsearch API documentation}
*/
async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityPutPrivilegesResponse>
@ -1823,7 +1824,7 @@ export default class Security {
}
/**
* Create or update role mappings. Role mappings define which roles are assigned to each user. Each mapping has rules that identify users and a list of roles that are granted to those users. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. This API does not create roles. Rather, it maps users to existing roles. Roles can be created by using the create or update roles API or roles files.
* Create or update role mappings. Role mappings define which roles are assigned to each user. Each mapping has rules that identify users and a list of roles that are granted to those users. The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. NOTE: This API does not create roles. Rather, it maps users to existing roles. Roles can be created by using the create or update roles API or roles files. **Role templates** The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. For example, all users in the `cn=admin,dc=example,dc=com` LDAP group should be given the superuser role in Elasticsearch. The `roles` field is used for this purpose. For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. The `role_templates` field is used for this purpose. NOTE: To use role templates successfully, the relevant scripting feature must be enabled. Otherwise, all attempts to create a role mapping with role templates fail. All of the user fields that are available in the role mapping rules are also available in the role templates. Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role-mapping.html | Elasticsearch API documentation}
*/
async putRoleMapping (this: That, params: T.SecurityPutRoleMappingRequest | TB.SecurityPutRoleMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityPutRoleMappingResponse>
@ -1867,7 +1868,7 @@ export default class Security {
}
/**
* Create or update users. A password is required for adding a new user but is optional when updating an existing user. To change a users password without updating any other fields, use the change password API.
* Create or update users. Add and update users in the native realm. A password is required for adding a new user but is optional when updating an existing user. To change a user's password without updating any other fields, use the change password API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-user.html | Elasticsearch API documentation}
*/
async putUser (this: That, params: T.SecurityPutUserRequest | TB.SecurityPutUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityPutUserResponse>
@ -1911,7 +1912,7 @@ export default class Security {
}
/**
* Find API keys with a query. Get a paginated list of API keys and their information. You can optionally filter the results with a query.
* Find API keys with a query. Get a paginated list of API keys and their information. You can optionally filter the results with a query. To use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges. If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own. If you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-api-key.html | Elasticsearch API documentation}
*/
async queryApiKeys (this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityQueryApiKeysResponse>
@ -1953,7 +1954,7 @@ export default class Security {
}
/**
* Find roles with a query. Get roles in a paginated manner. You can optionally filter the results with a query.
* Find roles with a query. Get roles in a paginated manner. The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The query roles API does not retrieve roles that are defined in roles files, nor built-in ones. You can optionally filter the results with a query. Also, the results can be paginated and sorted.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-role.html | Elasticsearch API documentation}
*/
async queryRole (this: That, params?: T.SecurityQueryRoleRequest | TB.SecurityQueryRoleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityQueryRoleResponse>
@ -1995,7 +1996,7 @@ export default class Security {
}
/**
* Find users with a query. Get information for users in a paginated manner. You can optionally filter the results with a query.
* Find users with a query. Get information for users in a paginated manner. You can optionally filter the results with a query. NOTE: As opposed to the get user API, built-in users are excluded from the result. This API is only for native users.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-user.html | Elasticsearch API documentation}
*/
async queryUser (this: That, params?: T.SecurityQueryUserRequest | TB.SecurityQueryUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityQueryUserResponse>
@ -2037,7 +2038,7 @@ export default class Security {
}
/**
* Authenticate SAML. Submits a SAML response message to Elasticsearch for consumption.
* Authenticate SAML. Submit a SAML response message to Elasticsearch for consumption. NOTE: This API is intended for use by custom web applications other than Kibana. If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. The SAML message that is submitted can be: * A response to a SAML authentication request that was previously created using the SAML prepare authentication API. * An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow. In either case, the SAML message needs to be a base64 encoded XML document with a root element of `<Response>`. After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication. This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-authenticate.html | Elasticsearch API documentation}
*/
async samlAuthenticate (this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlAuthenticateResponse>
@ -2078,7 +2079,7 @@ export default class Security {
}
/**
* Logout of SAML completely. Verifies the logout response sent from the SAML IdP.
* Logout of SAML completely. Verifies the logout response sent from the SAML IdP. NOTE: This API is intended for use by custom web applications other than Kibana. If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout. This API verifies the response by ensuring the content is relevant and validating its signature. An empty response is returned if the verification process is successful. The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding. The caller of this API must prepare the request accordingly so that this API can handle either of them.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-complete-logout.html | Elasticsearch API documentation}
*/
async samlCompleteLogout (this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlCompleteLogoutResponse>
@ -2119,7 +2120,7 @@ export default class Security {
}
/**
* Invalidate SAML. Submits a SAML LogoutRequest message to Elasticsearch for consumption.
* Invalidate SAML. Submit a SAML LogoutRequest message to Elasticsearch for consumption. NOTE: This API is intended for use by custom web applications other than Kibana. If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. The logout request comes from the SAML IdP during an IdP initiated Single Logout. The custom web application can use this API to have Elasticsearch process the `LogoutRequest`. After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message. Thus the user can be redirected back to their IdP.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-invalidate.html | Elasticsearch API documentation}
*/
async samlInvalidate (this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlInvalidateResponse>
@ -2160,7 +2161,7 @@ export default class Security {
}
/**
* Logout of SAML. Submits a request to invalidate an access token and refresh token.
* Logout of SAML. Submits a request to invalidate an access token and refresh token. NOTE: This API is intended for use by custom web applications other than Kibana. If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. This API invalidates the tokens that were generated for a user by the SAML authenticate API. If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout).
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-logout.html | Elasticsearch API documentation}
*/
async samlLogout (this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlLogoutResponse>
@ -2201,7 +2202,7 @@ export default class Security {
}
/**
* Prepare SAML authentication. Creates a SAML authentication request (`<AuthnRequest>`) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.
* Prepare SAML authentication. Create a SAML authentication request (`<AuthnRequest>`) as a URL string based on the configuration of the respective SAML realm in Elasticsearch. NOTE: This API is intended for use by custom web applications other than Kibana. If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack. This API returns a URL pointing to the SAML Identity Provider. You can use the URL to redirect the browser of the user in order to continue the authentication process. The URL includes a single parameter named `SAMLRequest`, which contains a SAML Authentication request that is deflated and Base64 encoded. If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named `SigAlg` and `Signature`. These parameters contain the algorithm used for the signature and the signature value itself. It also returns a random string that uniquely identifies this SAML Authentication request. The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-prepare-authentication.html | Elasticsearch API documentation}
*/
async samlPrepareAuthentication (this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlPrepareAuthenticationResponse>
@ -2243,7 +2244,7 @@ export default class Security {
}
/**
* Create SAML service provider metadata. Generate SAML metadata for a SAML 2.0 Service Provider.
* Create SAML service provider metadata. Generate SAML metadata for a SAML 2.0 Service Provider. The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file. This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-sp-metadata.html | Elasticsearch API documentation}
*/
async samlServiceProviderMetadata (this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySamlServiceProviderMetadataResponse>
@ -2275,7 +2276,7 @@ export default class Security {
}
/**
* Suggest a user profile. Get suggestions for user profiles that match specified search criteria.
* Suggest a user profile. Get suggestions for user profiles that match specified search criteria. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-suggest-user-profile.html | Elasticsearch API documentation}
*/
async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySuggestUserProfilesResponse>
@ -2317,7 +2318,7 @@ export default class Security {
}
/**
* Update an API key. Updates attributes of an existing API key. Users can only update API keys that they created or that were granted to them. Use this API to update API keys created by the create API Key or grant API Key APIs. If you need to apply the same update to many API keys, you can use bulk update API Keys to reduce overhead. Its not possible to update expired API keys, or API keys that have been invalidated by invalidate API Key. This API supports updates to an API keys access scope and metadata. The access scope of an API key is derived from the `role_descriptors` you specify in the request, and a snapshot of the owner users permissions at the time of the request. The snapshot of the owners permissions is updated automatically on every call. If you dont specify `role_descriptors` in the request, a call to this API might still change the API keys access scope. This change can occur if the owner users permissions have changed since the API key was created or last modified. To update another users API key, use the `run_as` feature to submit a request on behalf of another user. IMPORTANT: Its not possible to use an API key as the authentication credential for this API. To update an API key, the owner users credentials are required.
* Update an API key. Update attributes of an existing API key. This API supports updates to an API key's access scope, expiration, and metadata. To use this API, you must have at least the `manage_own_api_key` cluster privilege. Users can only update API keys that they created or that were granted to them. To update another users API key, use the `run_as` feature to submit a request on behalf of another user. IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner users credentials are required. Use this API to update API keys created by the create API key or grant API Key APIs. If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead. It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API. The access scope of an API key is derived from the `role_descriptors` you specify in the request and a snapshot of the owner user's permissions at the time of the request. The snapshot of the owner's permissions is updated automatically on every call. IMPORTANT: If you don't specify `role_descriptors` in the request, a call to this API might still change the API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-api-key.html | Elasticsearch API documentation}
*/
async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateApiKeyResponse>
@ -2361,7 +2362,7 @@ export default class Security {
}
/**
* Update a cross-cluster API key. Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.
* Update a cross-cluster API key. Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access. To use this API, you must have at least the `manage_security` cluster privilege. Users can only update API keys that they created. To update another user's API key, use the `run_as` feature to submit a request on behalf of another user. IMPORTANT: It's not possible to use an API key as the authentication credential for this API. To update an API key, the owner user's credentials are required. It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API. This API supports updates to an API key's access scope, metadata, and expiration. The owner user's information, such as the `username` and `realm`, is also updated automatically on every call. NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-cross-cluster-api-key.html | Elasticsearch API documentation}
*/
async updateCrossClusterApiKey (this: That, params: T.SecurityUpdateCrossClusterApiKeyRequest | TB.SecurityUpdateCrossClusterApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateCrossClusterApiKeyResponse>
@ -2405,22 +2406,35 @@ export default class Security {
}
/**
* Update settings for the security system index
* Update security index settings. Update the user-configurable settings for the security internal index (`.security` and associated indices). Only a subset of settings are allowed to be modified. This includes `index.auto_expand_replicas` and `index.number_of_replicas`. NOTE: If `index.auto_expand_replicas` is set, `index.number_of_replicas` will be ignored during updates. If a specific index is not in use on the system and settings are provided for it, the request will be rejected. This API does not yet support configuring the settings for indices before they are in use.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-settings.html | Elasticsearch API documentation}
*/
async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
async updateSettings (this: That, params?: T.SecurityUpdateSettingsRequest | TB.SecurityUpdateSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateSettingsResponse>
async updateSettings (this: That, params?: T.SecurityUpdateSettingsRequest | TB.SecurityUpdateSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityUpdateSettingsResponse, unknown>>
async updateSettings (this: That, params?: T.SecurityUpdateSettingsRequest | TB.SecurityUpdateSettingsRequest, options?: TransportRequestOptions): Promise<T.SecurityUpdateSettingsResponse>
async updateSettings (this: That, params?: T.SecurityUpdateSettingsRequest | TB.SecurityUpdateSettingsRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = []
const acceptedBody: string[] = ['security', 'security-profile', 'security-tokens']
const querystring: Record<string, any> = {}
const body = undefined
// @ts-expect-error
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
// @ts-expect-error
querystring[key] = params[key]
}
}
@ -2434,7 +2448,7 @@ export default class Security {
}
/**
* Update user profile data. Update specific data for the user profile that is associated with a unique ID.
* Update user profile data. Update specific data for the user profile that is associated with a unique ID. NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice. To use this API, you must have one of the following privileges: * The `manage_user_profile` cluster privilege. * The `update_profile_data` global privilege for the namespaces that are referenced in the request. This API updates the `labels` and `data` fields of an existing user profile document with JSON objects. New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request. For both labels and data, content is namespaced by the top-level fields. The `update_profile_data` global privilege grants privileges for updating only the allowed namespaces.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-user-profile-data.html | Elasticsearch API documentation}
*/
async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateUserProfileDataResponse>

File diff suppressed because one or more lines are too long

View File

@ -45,7 +45,7 @@ export default class Tasks {
}
/**
* Cancel a task. A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. The get task information API will continue to list these cancelled tasks until they complete. The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible. To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running. You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.
* Cancel a task. WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away. It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation. The get task information API will continue to list these cancelled tasks until they complete. The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible. To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the `?detailed` parameter to identify the other tasks the system is running. You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html | Elasticsearch API documentation}
*/
async cancel (this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TasksCancelResponse>
@ -85,7 +85,7 @@ export default class Tasks {
}
/**
* Get task information. Get information about a task currently running in the cluster.
* Get task information. Get information about a task currently running in the cluster. WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html | Elasticsearch API documentation}
*/
async get (this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TasksGetResponse>
@ -117,7 +117,7 @@ export default class Tasks {
}
/**
* Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster.
* Get all tasks. Get information about the tasks currently running on one or more nodes in the cluster. WARNING: The task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. **Identifying running tasks** The `X-Opaque-Id header`, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information. This enables you to track certain calls or associate certain tasks with the client that started them. For example: ``` curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents" ``` The API returns the following result: ``` HTTP/1.1 200 OK X-Opaque-Id: 123456 content-type: application/json; charset=UTF-8 content-length: 831 { "tasks" : { "u5lcZHqcQhu-rUoFaqDphA:45" : { "node" : "u5lcZHqcQhu-rUoFaqDphA", "id" : 45, "type" : "transport", "action" : "cluster:monitor/tasks/lists", "start_time_in_millis" : 1513823752749, "running_time_in_nanos" : 293139, "cancellable" : false, "headers" : { "X-Opaque-Id" : "123456" }, "children" : [ { "node" : "u5lcZHqcQhu-rUoFaqDphA", "id" : 46, "type" : "direct", "action" : "cluster:monitor/tasks/lists[n]", "start_time_in_millis" : 1513823752750, "running_time_in_nanos" : 92133, "cancellable" : false, "parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45", "headers" : { "X-Opaque-Id" : "123456" } } ] } } } ``` In this example, `X-Opaque-Id: 123456` is the ID as a part of the response header. The `X-Opaque-Id` in the task `headers` is the ID for the task that was initiated by the REST request. The `X-Opaque-Id` in the children `headers` is the child task of the task that was initiated by the REST request.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html | Elasticsearch API documentation}
*/
async list (this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TasksListResponse>

View File

@ -39,7 +39,7 @@ import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
/**
* Update a document. Updates a document by running a script or passing a partial document.
* Update a document. Update a document by running a script or passing a partial document. If the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias. The script can update, delete, or skip modifying the document. The API also supports passing a partial document, which is merged into the existing document. To fully replace an existing document, use the index API. This operation: * Gets the document (collocated with the shard) from the index. * Runs the specified script. * Indexes the result. The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation. The `_source` field must be enabled to use this API. In addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update.html | Elasticsearch API documentation}
*/
export default async function UpdateApi<TDocument = unknown, TPartialDocument = unknown, TDocumentR = unknown> (this: That, params: T.UpdateRequest<TDocument, TPartialDocument> | TB.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.UpdateResponse<TDocumentR>>

File diff suppressed because one or more lines are too long

View File

@ -40,7 +40,7 @@ interface That { transport: Transport }
/**
* Throttle an update by query operation. Change the number of requests per second for a particular update by query operation. Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update-by-query.html | Elasticsearch API documentation}
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/docs-update-by-query.html#docs-update-by-query-rethrottle | Elasticsearch API documentation}
*/
export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.UpdateByQueryRethrottleResponse>
export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.UpdateByQueryRethrottleResponse, unknown>>

View File

@ -2829,6 +2829,8 @@ export interface StoredScript {
source: string
}
export type StreamResult = ArrayBuffer
export type SuggestMode = 'missing' | 'popular' | 'always'
export type SuggestionName = string
@ -6904,7 +6906,7 @@ export type CatAllocationResponse = CatAllocationAllocationRecord[]
export interface CatComponentTemplatesComponentTemplate {
name: string
version: string
version: string | null
alias_count: string
mapping_count: string
settings_count: string
@ -10287,6 +10289,8 @@ export type EqlSearchResponse<TEvent = unknown> = EqlEqlSearchResponseBase<TEven
export type EqlSearchResultPosition = 'tail' | 'head'
export type EsqlEsqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' | 'arrow'
export interface EsqlTableValuesContainer {
integer?: EsqlTableValuesIntegerValue[]
keyword?: EsqlTableValuesKeywordValue[]
@ -10302,10 +10306,48 @@ export type EsqlTableValuesLongDouble = double | double[]
export type EsqlTableValuesLongValue = long | long[]
export type EsqlQueryEsqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' | 'arrow'
export interface EsqlAsyncQueryRequest extends RequestBase {
delimiter?: string
drop_null_columns?: boolean
format?: EsqlEsqlFormat
keep_alive?: Duration
keep_on_completion?: boolean
wait_for_completion_timeout?: Duration
columnar?: boolean
filter?: QueryDslQueryContainer
locale?: string
params?: FieldValue[]
profile?: boolean
query: string
tables?: Record<string, Record<string, EsqlTableValuesContainer>>
}
export interface EsqlAsyncQueryResponse {
columns?: EsqlColumns
id?: string
is_running: boolean
}
export interface EsqlAsyncQueryDeleteRequest extends RequestBase {
id: Id
}
export type EsqlAsyncQueryDeleteResponse = AcknowledgedResponseBase
export interface EsqlAsyncQueryGetRequest extends RequestBase {
id: Id
drop_null_columns?: boolean
keep_alive?: Duration
wait_for_completion_timeout?: Duration
}
export interface EsqlAsyncQueryGetResponse {
columns?: EsqlColumns
is_running: boolean
}
export interface EsqlQueryRequest extends RequestBase {
format?: EsqlQueryEsqlFormat
format?: EsqlEsqlFormat
delimiter?: string
drop_null_columns?: boolean
columnar?: boolean
@ -10567,7 +10609,7 @@ export interface IlmMigrateAction {
export interface IlmPhase {
actions?: IlmActions
min_age?: Duration | long
min_age?: Duration
}
export interface IlmPhases {
@ -10997,6 +11039,7 @@ export interface IndicesIndexSettingsLifecycle {
parse_origination_date?: boolean
step?: IndicesIndexSettingsLifecycleStep
rollover_alias?: string
prefer_ilm?: boolean | string
}
export interface IndicesIndexSettingsLifecycleStep {
@ -12684,6 +12727,22 @@ export interface InferencePutRequest extends RequestBase {
export type InferencePutResponse = InferenceInferenceEndpointInfo
export interface InferenceStreamInferenceRequest extends RequestBase {
inference_id: Id
task_type?: InferenceTaskType
input: string | string[]
}
export type InferenceStreamInferenceResponse = StreamResult
export interface InferenceUpdateRequest extends RequestBase {
inference_id: Id
task_type?: InferenceTaskType
inference_config?: InferenceInferenceEndpoint
}
export type InferenceUpdateResponse = InferenceInferenceEndpointInfo
export interface IngestAppendProcessor extends IngestProcessorBase {
field: Field
value: any | any[]
@ -17702,6 +17761,10 @@ export interface SecuritySearchAccess {
allow_restricted_indices?: boolean
}
export interface SecuritySecuritySettings {
index?: IndicesIndexSettings
}
export type SecurityTemplateFormat = 'string' | 'json'
export interface SecurityUser {
@ -18158,6 +18221,16 @@ export interface SecurityGetServiceCredentialsResponse {
nodes_credentials: SecurityGetServiceCredentialsNodesCredentials
}
export interface SecurityGetSettingsRequest extends RequestBase {
master_timeout?: Duration
}
export interface SecurityGetSettingsResponse {
security: SecuritySecuritySettings
'security-profile': SecuritySecuritySettings
'security-tokens': SecuritySecuritySettings
}
export type SecurityGetTokenAccessTokenGrantType = 'password' | 'client_credentials' | '_kerberos' | 'refresh_token'
export interface SecurityGetTokenAuthenticatedUser extends SecurityUser {
@ -18679,6 +18752,18 @@ export interface SecurityUpdateCrossClusterApiKeyResponse {
updated: boolean
}
export interface SecurityUpdateSettingsRequest extends RequestBase {
master_timeout?: Duration
timeout?: Duration
security?: SecuritySecuritySettings
'security-profile'?: SecuritySecuritySettings
'security-tokens'?: SecuritySecuritySettings
}
export interface SecurityUpdateSettingsResponse {
acknowledged: boolean
}
export interface SecurityUpdateUserProfileDataRequest extends RequestBase {
uid: SecurityUserProfileId
if_seq_no?: SequenceNumber
@ -19220,6 +19305,113 @@ export interface SnapshotGetRepositoryRequest extends RequestBase {
export type SnapshotGetRepositoryResponse = Record<string, SnapshotRepository>
export interface SnapshotRepositoryAnalyzeBlobDetails {
name: string
overwritten: boolean
read_early: boolean
read_end: long
read_start: long
reads: SnapshotRepositoryAnalyzeReadBlobDetails
size: ByteSize
size_bytes: long
}
export interface SnapshotRepositoryAnalyzeDetailsInfo {
blob: SnapshotRepositoryAnalyzeBlobDetails
overwrite_elapsed?: Duration
overwrite_elapsed_nanos?: DurationValue<UnitNanos>
write_elapsed: Duration
write_elapsed_nanos: DurationValue<UnitNanos>
write_throttled: Duration
write_throttled_nanos: DurationValue<UnitNanos>
writer_node: SnapshotRepositoryAnalyzeNodeInfo
}
export interface SnapshotRepositoryAnalyzeNodeInfo {
id: Id
name: Name
}
export interface SnapshotRepositoryAnalyzeReadBlobDetails {
before_write_complete?: boolean
elapsed?: Duration
elapsed_nanos?: DurationValue<UnitNanos>
first_byte_time?: Duration
first_byte_time_nanos: DurationValue<UnitNanos>
found: boolean
node: SnapshotRepositoryAnalyzeNodeInfo
throttled?: Duration
throttled_nanos?: DurationValue<UnitNanos>
}
export interface SnapshotRepositoryAnalyzeReadSummaryInfo {
count: integer
max_wait: Duration
max_wait_nanos: DurationValue<UnitNanos>
total_elapsed: Duration
total_elapsed_nanos: DurationValue<UnitNanos>
total_size: ByteSize
total_size_bytes: long
total_throttled: Duration
total_throttled_nanos: DurationValue<UnitNanos>
total_wait: Duration
total_wait_nanos: DurationValue<UnitNanos>
}
export interface SnapshotRepositoryAnalyzeRequest extends RequestBase {
name: Name
blob_count?: integer
concurrency?: integer
detailed?: boolean
early_read_node_count?: integer
max_blob_size?: ByteSize
max_total_data_size?: ByteSize
rare_action_probability?: double
rarely_abort_writes?: boolean
read_node_count?: integer
register_operation_count?: integer
seed?: integer
timeout?: Duration
}
export interface SnapshotRepositoryAnalyzeResponse {
blob_count: integer
blob_path: string
concurrency: integer
coordinating_node: SnapshotRepositoryAnalyzeNodeInfo
delete_elapsed: Duration
delete_elapsed_nanos: DurationValue<UnitNanos>
details: SnapshotRepositoryAnalyzeDetailsInfo
early_read_node_count: integer
issues_detected: string[]
listing_elapsed: Duration
listing_elapsed_nanos: DurationValue<UnitNanos>
max_blob_size: ByteSize
max_blob_size_bytes: long
max_total_data_size: ByteSize
max_total_data_size_bytes: long
rare_action_probability: double
read_node_count: integer
repository: string
seed: long
summary: SnapshotRepositoryAnalyzeSummaryInfo
}
export interface SnapshotRepositoryAnalyzeSummaryInfo {
read: SnapshotRepositoryAnalyzeReadSummaryInfo
write: SnapshotRepositoryAnalyzeWriteSummaryInfo
}
export interface SnapshotRepositoryAnalyzeWriteSummaryInfo {
count: integer
total_elapsed: Duration
total_elapsed_nanos: DurationValue<UnitNanos>
total_size: ByteSize
total_size_bytes: long
total_throttled: Duration
total_throttled_nanos: long
}
export interface SnapshotRepositoryVerifyIntegrityRequest extends RequestBase {
name: Names
meta_thread_pool_concurrency?: integer
@ -20901,7 +21093,7 @@ export interface XpackUsageIlm {
export interface XpackUsageIlmPolicyStatistics {
indices_managed: integer
phases: IlmPhases
phases: XpackUsagePhases
}
export interface XpackUsageInvocations {
@ -21013,6 +21205,19 @@ export interface XpackUsageMonitoring extends XpackUsageBase {
enabled_exporters: Record<string, long>
}
export interface XpackUsagePhase {
actions: string[]
min_age: DurationValue<UnitMillis>
}
export interface XpackUsagePhases {
cold?: XpackUsagePhase
delete?: XpackUsagePhase
frozen?: XpackUsagePhase
hot?: XpackUsagePhase
warm?: XpackUsagePhase
}
export interface XpackUsageQuery {
count?: integer
failed?: integer

View File

@ -2905,6 +2905,8 @@ export interface StoredScript {
source: string
}
export type StreamResult = ArrayBuffer
export type SuggestMode = 'missing' | 'popular' | 'always'
export type SuggestionName = string
@ -6984,7 +6986,7 @@ export type CatAllocationResponse = CatAllocationAllocationRecord[]
export interface CatComponentTemplatesComponentTemplate {
name: string
version: string
version: string | null
alias_count: string
mapping_count: string
settings_count: string
@ -10457,6 +10459,8 @@ export type EqlSearchResponse<TEvent = unknown> = EqlEqlSearchResponseBase<TEven
export type EqlSearchResultPosition = 'tail' | 'head'
export type EsqlEsqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' | 'arrow'
export interface EsqlTableValuesContainer {
integer?: EsqlTableValuesIntegerValue[]
keyword?: EsqlTableValuesKeywordValue[]
@ -10472,10 +10476,51 @@ export type EsqlTableValuesLongDouble = double | double[]
export type EsqlTableValuesLongValue = long | long[]
export type EsqlQueryEsqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' | 'arrow'
export interface EsqlAsyncQueryRequest extends RequestBase {
delimiter?: string
drop_null_columns?: boolean
format?: EsqlEsqlFormat
keep_alive?: Duration
keep_on_completion?: boolean
wait_for_completion_timeout?: Duration
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
columnar?: boolean
filter?: QueryDslQueryContainer
locale?: string
params?: FieldValue[]
profile?: boolean
query: string
tables?: Record<string, Record<string, EsqlTableValuesContainer>>
}
}
export interface EsqlAsyncQueryResponse {
columns?: EsqlColumns
id?: string
is_running: boolean
}
export interface EsqlAsyncQueryDeleteRequest extends RequestBase {
id: Id
}
export type EsqlAsyncQueryDeleteResponse = AcknowledgedResponseBase
export interface EsqlAsyncQueryGetRequest extends RequestBase {
id: Id
drop_null_columns?: boolean
keep_alive?: Duration
wait_for_completion_timeout?: Duration
}
export interface EsqlAsyncQueryGetResponse {
columns?: EsqlColumns
is_running: boolean
}
export interface EsqlQueryRequest extends RequestBase {
format?: EsqlQueryEsqlFormat
format?: EsqlEsqlFormat
delimiter?: string
drop_null_columns?: boolean
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
@ -10747,7 +10792,7 @@ export interface IlmMigrateAction {
export interface IlmPhase {
actions?: IlmActions
min_age?: Duration | long
min_age?: Duration
}
export interface IlmPhases {
@ -11186,6 +11231,7 @@ export interface IndicesIndexSettingsLifecycle {
parse_origination_date?: boolean
step?: IndicesIndexSettingsLifecycleStep
rollover_alias?: string
prefer_ilm?: boolean | string
}
export interface IndicesIndexSettingsLifecycleStep {
@ -12924,6 +12970,26 @@ export interface InferencePutRequest extends RequestBase {
export type InferencePutResponse = InferenceInferenceEndpointInfo
export interface InferenceStreamInferenceRequest extends RequestBase {
inference_id: Id
task_type?: InferenceTaskType
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
input: string | string[]
}
}
export type InferenceStreamInferenceResponse = StreamResult
export interface InferenceUpdateRequest extends RequestBase {
inference_id: Id
task_type?: InferenceTaskType
/** @deprecated The use of the 'body' key has been deprecated, use 'inference_config' instead. */
body?: InferenceInferenceEndpoint
}
export type InferenceUpdateResponse = InferenceInferenceEndpointInfo
export interface IngestAppendProcessor extends IngestProcessorBase {
field: Field
value: any | any[]
@ -18100,6 +18166,10 @@ export interface SecuritySearchAccess {
allow_restricted_indices?: boolean
}
export interface SecuritySecuritySettings {
index?: IndicesIndexSettings
}
export type SecurityTemplateFormat = 'string' | 'json'
export interface SecurityUser {
@ -18580,6 +18650,16 @@ export interface SecurityGetServiceCredentialsResponse {
nodes_credentials: SecurityGetServiceCredentialsNodesCredentials
}
export interface SecurityGetSettingsRequest extends RequestBase {
master_timeout?: Duration
}
export interface SecurityGetSettingsResponse {
security: SecuritySecuritySettings
'security-profile': SecuritySecuritySettings
'security-tokens': SecuritySecuritySettings
}
export type SecurityGetTokenAccessTokenGrantType = 'password' | 'client_credentials' | '_kerberos' | 'refresh_token'
export interface SecurityGetTokenAuthenticatedUser extends SecurityUser {
@ -19172,6 +19252,21 @@ export interface SecurityUpdateCrossClusterApiKeyResponse {
updated: boolean
}
export interface SecurityUpdateSettingsRequest extends RequestBase {
master_timeout?: Duration
timeout?: Duration
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
security?: SecuritySecuritySettings
'security-profile'?: SecuritySecuritySettings
'security-tokens'?: SecuritySecuritySettings
}
}
export interface SecurityUpdateSettingsResponse {
acknowledged: boolean
}
export interface SecurityUpdateUserProfileDataRequest extends RequestBase {
uid: SecurityUserProfileId
if_seq_no?: SequenceNumber
@ -19732,6 +19827,113 @@ export interface SnapshotGetRepositoryRequest extends RequestBase {
export type SnapshotGetRepositoryResponse = Record<string, SnapshotRepository>
export interface SnapshotRepositoryAnalyzeBlobDetails {
name: string
overwritten: boolean
read_early: boolean
read_end: long
read_start: long
reads: SnapshotRepositoryAnalyzeReadBlobDetails
size: ByteSize
size_bytes: long
}
export interface SnapshotRepositoryAnalyzeDetailsInfo {
blob: SnapshotRepositoryAnalyzeBlobDetails
overwrite_elapsed?: Duration
overwrite_elapsed_nanos?: DurationValue<UnitNanos>
write_elapsed: Duration
write_elapsed_nanos: DurationValue<UnitNanos>
write_throttled: Duration
write_throttled_nanos: DurationValue<UnitNanos>
writer_node: SnapshotRepositoryAnalyzeNodeInfo
}
export interface SnapshotRepositoryAnalyzeNodeInfo {
id: Id
name: Name
}
export interface SnapshotRepositoryAnalyzeReadBlobDetails {
before_write_complete?: boolean
elapsed?: Duration
elapsed_nanos?: DurationValue<UnitNanos>
first_byte_time?: Duration
first_byte_time_nanos: DurationValue<UnitNanos>
found: boolean
node: SnapshotRepositoryAnalyzeNodeInfo
throttled?: Duration
throttled_nanos?: DurationValue<UnitNanos>
}
export interface SnapshotRepositoryAnalyzeReadSummaryInfo {
count: integer
max_wait: Duration
max_wait_nanos: DurationValue<UnitNanos>
total_elapsed: Duration
total_elapsed_nanos: DurationValue<UnitNanos>
total_size: ByteSize
total_size_bytes: long
total_throttled: Duration
total_throttled_nanos: DurationValue<UnitNanos>
total_wait: Duration
total_wait_nanos: DurationValue<UnitNanos>
}
export interface SnapshotRepositoryAnalyzeRequest extends RequestBase {
name: Name
blob_count?: integer
concurrency?: integer
detailed?: boolean
early_read_node_count?: integer
max_blob_size?: ByteSize
max_total_data_size?: ByteSize
rare_action_probability?: double
rarely_abort_writes?: boolean
read_node_count?: integer
register_operation_count?: integer
seed?: integer
timeout?: Duration
}
export interface SnapshotRepositoryAnalyzeResponse {
blob_count: integer
blob_path: string
concurrency: integer
coordinating_node: SnapshotRepositoryAnalyzeNodeInfo
delete_elapsed: Duration
delete_elapsed_nanos: DurationValue<UnitNanos>
details: SnapshotRepositoryAnalyzeDetailsInfo
early_read_node_count: integer
issues_detected: string[]
listing_elapsed: Duration
listing_elapsed_nanos: DurationValue<UnitNanos>
max_blob_size: ByteSize
max_blob_size_bytes: long
max_total_data_size: ByteSize
max_total_data_size_bytes: long
rare_action_probability: double
read_node_count: integer
repository: string
seed: long
summary: SnapshotRepositoryAnalyzeSummaryInfo
}
export interface SnapshotRepositoryAnalyzeSummaryInfo {
read: SnapshotRepositoryAnalyzeReadSummaryInfo
write: SnapshotRepositoryAnalyzeWriteSummaryInfo
}
export interface SnapshotRepositoryAnalyzeWriteSummaryInfo {
count: integer
total_elapsed: Duration
total_elapsed_nanos: DurationValue<UnitNanos>
total_size: ByteSize
total_size_bytes: long
total_throttled: Duration
total_throttled_nanos: long
}
export interface SnapshotRepositoryVerifyIntegrityRequest extends RequestBase {
name: Names
meta_thread_pool_concurrency?: integer
@ -21459,7 +21661,7 @@ export interface XpackUsageIlm {
export interface XpackUsageIlmPolicyStatistics {
indices_managed: integer
phases: IlmPhases
phases: XpackUsagePhases
}
export interface XpackUsageInvocations {
@ -21571,6 +21773,19 @@ export interface XpackUsageMonitoring extends XpackUsageBase {
enabled_exporters: Record<string, long>
}
export interface XpackUsagePhase {
actions: string[]
min_age: DurationValue<UnitMillis>
}
export interface XpackUsagePhases {
cold?: XpackUsagePhase
delete?: XpackUsagePhase
frozen?: XpackUsagePhase
hot?: XpackUsagePhase
warm?: XpackUsagePhase
}
export interface XpackUsageQuery {
count?: integer
failed?: integer