Auto-generated API code (#2644)
This commit is contained in:
@ -3,17 +3,11 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_query/async",
|
||||
querystring: {
|
||||
format: "json",
|
||||
},
|
||||
body: {
|
||||
query:
|
||||
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
},
|
||||
const response = await client.esql.asyncQuery({
|
||||
format: "json",
|
||||
query:
|
||||
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,23 +3,20 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/search_application/my-app/_render_query",
|
||||
body: {
|
||||
params: {
|
||||
query_string: "my first query",
|
||||
text_fields: [
|
||||
{
|
||||
name: "title",
|
||||
boost: 5,
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
boost: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my-app",
|
||||
params: {
|
||||
query_string: "my first query",
|
||||
text_fields: [
|
||||
{
|
||||
name: "title",
|
||||
boost: 5,
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
boost: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
@ -3,18 +3,16 @@
|
||||
|
||||
[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?",
|
||||
},
|
||||
],
|
||||
},
|
||||
const response = await client.inference.streamInference({
|
||||
task_type: "chat_completion",
|
||||
inference_id: "openai-completion",
|
||||
model: "gpt-4o",
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "What is Elastic?",
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
25
docs/doc_examples/13d91782399ba1f291e103c18b5338cc.asciidoc
Normal file
25
docs/doc_examples/13d91782399ba1f291e103c18b5338cc.asciidoc
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: {
|
||||
settings_override: {
|
||||
index: {
|
||||
number_of_shards: 5,
|
||||
},
|
||||
},
|
||||
mappings_override: {
|
||||
properties: {
|
||||
field2: {
|
||||
type: "boolean",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,9 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.put({
|
||||
task_type: "my-inference-endpoint",
|
||||
inference_id: "_update",
|
||||
const response = await client.inference.update({
|
||||
inference_id: "my-inference-endpoint",
|
||||
inference_config: {
|
||||
service_settings: {
|
||||
api_key: "<API_KEY>",
|
||||
|
||||
10
docs/doc_examples/15ac33d641b376d9494075eb1f0d4066.asciidoc
Normal file
10
docs/doc_examples/15ac33d641b376d9494075eb1f0d4066.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.cancelMigrateReindex({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
12
docs/doc_examples/174b93c323aa8e9cc8ee2a3df5736810.asciidoc
Normal file
12
docs/doc_examples/174b93c323aa8e9cc8ee2a3df5736810.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// 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.security.delegatePki({
|
||||
x509_certificate_chain: [
|
||||
"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==",
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,27 +3,23 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
15
docs/doc_examples/29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc
Normal file
15
docs/doc_examples/29aeabacb1fdf5b083d5f091b6d1bd44.asciidoc
Normal file
@ -0,0 +1,15 @@
|
||||
// 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.migrateReindex({
|
||||
reindex: {
|
||||
source: {
|
||||
index: "my-data-stream",
|
||||
},
|
||||
mode: "upgrade",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,14 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/logout",
|
||||
body: {
|
||||
token:
|
||||
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
|
||||
refresh_token: "vLBPvmAB6KvwvJZr27cS",
|
||||
},
|
||||
const response = await client.security.oidcLogout({
|
||||
token:
|
||||
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
|
||||
refresh_token: "vLBPvmAB6KvwvJZr27cS",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,12 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
|
||||
querystring: {
|
||||
wait_for_completion_timeout: "30s",
|
||||
},
|
||||
const response = await client.esql.asyncQueryGet({
|
||||
id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
|
||||
wait_for_completion_timeout: "30s",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
22
docs/doc_examples/2f9ee29fe49f7d206a41212aa5945296.asciidoc
Normal file
22
docs/doc_examples/2f9ee29fe49f7d206a41212aa5945296.asciidoc
Normal file
@ -0,0 +1,22 @@
|
||||
// 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.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: {
|
||||
settings_override: {
|
||||
index: {
|
||||
"blocks.write": null,
|
||||
"blocks.read": null,
|
||||
"blocks.read_only": null,
|
||||
"blocks.read_only_allow_delete": null,
|
||||
"blocks.metadata": null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
21
docs/doc_examples/3649194a97d265a3bc758f8b38f7561e.asciidoc
Normal file
21
docs/doc_examples/3649194a97d265a3bc758f8b38f7561e.asciidoc
Normal file
@ -0,0 +1,21 @@
|
||||
// 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: "semantic-embeddings",
|
||||
mappings: {
|
||||
properties: {
|
||||
semantic_text: {
|
||||
type: "semantic_text",
|
||||
},
|
||||
content: {
|
||||
type: "text",
|
||||
copy_to: "semantic_text",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,14 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_query/async",
|
||||
body: {
|
||||
query:
|
||||
"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
|
||||
wait_for_completion_timeout: "2s",
|
||||
},
|
||||
const response = await client.esql.asyncQuery({
|
||||
query:
|
||||
"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
|
||||
wait_for_completion_timeout: "2s",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
const response = await client.esql.asyncQueryGet({
|
||||
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,43 +3,41 @@
|
||||
|
||||
[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",
|
||||
},
|
||||
const response = await client.inference.streamInference({
|
||||
task_type: "chat_completion",
|
||||
inference_id: "openai-completion",
|
||||
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",
|
||||
},
|
||||
},
|
||||
],
|
||||
tool_choice: {
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_current_price",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
10
docs/doc_examples/46b771a9932c3fa6057a7b2679c72ef0.asciidoc
Normal file
10
docs/doc_examples/46b771a9932c3fa6057a7b2679c72ef0.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.getMigrateReindexStatus({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -6,6 +6,11 @@
|
||||
const response = await client.ml.startTrainedModelDeployment({
|
||||
model_id: "my_model",
|
||||
deployment_id: "my_model_for_search",
|
||||
adaptive_allocations: {
|
||||
enabled: true,
|
||||
min_number_of_allocations: 3,
|
||||
max_number_of_allocations: 10,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,12 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_inference/completion/openai-completion/_stream",
|
||||
body: {
|
||||
input: "What is Elastic?",
|
||||
},
|
||||
const response = await client.inference.streamInference({
|
||||
task_type: "completion",
|
||||
inference_id: "openai-completion",
|
||||
input: "What is Elastic?",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,14 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/prepare",
|
||||
body: {
|
||||
realm: "oidc1",
|
||||
state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
|
||||
nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5",
|
||||
},
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
realm: "oidc1",
|
||||
state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
|
||||
nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,17 +3,11 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_query/async",
|
||||
querystring: {
|
||||
format: "json",
|
||||
},
|
||||
body: {
|
||||
query:
|
||||
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
},
|
||||
const response = await client.esql.asyncQuery({
|
||||
format: "json",
|
||||
query:
|
||||
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
11
docs/doc_examples/615dc36f0978c676624fb7d1144b4899.asciidoc
Normal file
11
docs/doc_examples/615dc36f0978c676624fb7d1144b4899.asciidoc
Normal file
@ -0,0 +1,11 @@
|
||||
// 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.getDataLifecycleStats({
|
||||
human: "true",
|
||||
pretty: "true",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
12
docs/doc_examples/66915e95b723ee2f6e5164a94b8f98c1.asciidoc
Normal file
12
docs/doc_examples/66915e95b723ee2f6e5164a94b8f98c1.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// 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.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/67b71a95b6fe6c83faae51ea038a1bf1.asciidoc
Normal file
10
docs/doc_examples/67b71a95b6fe6c83faae51ea038a1bf1.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.esql.asyncQueryDelete({
|
||||
id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,12 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/api_key/_bulk_update",
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
},
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,35 +3,31 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_text_structure/find_message_structure",
|
||||
body: {
|
||||
messages: [
|
||||
"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
|
||||
"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]",
|
||||
"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]",
|
||||
"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]",
|
||||
"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled",
|
||||
"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled",
|
||||
"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled",
|
||||
"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]",
|
||||
"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]",
|
||||
"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized",
|
||||
"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...",
|
||||
],
|
||||
},
|
||||
const response = await client.textStructure.findMessageStructure({
|
||||
messages: [
|
||||
"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
|
||||
"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]",
|
||||
"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]",
|
||||
"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]",
|
||||
"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled",
|
||||
"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled",
|
||||
"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled",
|
||||
"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]",
|
||||
"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]",
|
||||
"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized",
|
||||
"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...",
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "DELETE",
|
||||
path: "/_ingest/ip_location/database/my-database-id",
|
||||
const response = await client.ingest.deleteIpLocationDatabase({
|
||||
id: "my-database-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,30 +3,26 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/api_key/_bulk_update",
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {
|
||||
"role-a": {
|
||||
indices: [
|
||||
{
|
||||
names: ["*"],
|
||||
privileges: ["write"],
|
||||
},
|
||||
],
|
||||
},
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {
|
||||
"role-a": {
|
||||
indices: [
|
||||
{
|
||||
names: ["*"],
|
||||
privileges: ["write"],
|
||||
},
|
||||
],
|
||||
},
|
||||
metadata: {
|
||||
environment: {
|
||||
level: 2,
|
||||
trusted: true,
|
||||
tags: ["production"],
|
||||
},
|
||||
},
|
||||
expiration: "30d",
|
||||
},
|
||||
metadata: {
|
||||
environment: {
|
||||
level: 2,
|
||||
trusted: true,
|
||||
tags: ["production"],
|
||||
},
|
||||
},
|
||||
expiration: "30d",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,32 +3,30 @@
|
||||
|
||||
[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"}',
|
||||
},
|
||||
const response = await client.inference.streamInference({
|
||||
task_type: "chat_completion",
|
||||
inference_id: "openai-completion",
|
||||
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",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
role: "tool",
|
||||
content: "The weather is cold",
|
||||
tool_call_id: "call_KcAjWtAww20AihPHphUh46Gd",
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,10 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_ingest/ip_location/database/my-database-1",
|
||||
body: {
|
||||
const response = await client.ingest.putIpLocationDatabase({
|
||||
id: "my-database-1",
|
||||
configuration: {
|
||||
name: "GeoIP2-Domain",
|
||||
maxmind: {
|
||||
account_id: "1234567",
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
// 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.resolveCluster();
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,9 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "DELETE",
|
||||
path: "/_ingest/ip_location/database/example-database-id",
|
||||
const response = await client.ingest.deleteIpLocationDatabase({
|
||||
id: "example-database-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/analytics/my_analytics_collection/event/search_click",
|
||||
body: {
|
||||
const response = await client.searchApplication.postBehavioralAnalyticsEvent({
|
||||
collection_name: "my_analytics_collection",
|
||||
event_type: "search_click",
|
||||
payload: {
|
||||
session: {
|
||||
id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9",
|
||||
},
|
||||
|
||||
@ -3,16 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/authenticate",
|
||||
body: {
|
||||
redirect_uri:
|
||||
"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
|
||||
realm: "oidc1",
|
||||
},
|
||||
const response = await client.security.oidcAuthenticate({
|
||||
redirect_uri:
|
||||
"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
|
||||
realm: "oidc1",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,13 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/search_application/my_search_application/_render_query",
|
||||
body: {
|
||||
params: {
|
||||
query_string: "rock climbing",
|
||||
},
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my_search_application",
|
||||
params: {
|
||||
query_string: "rock climbing",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
10
docs/doc_examples/a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc
Normal file
10
docs/doc_examples/a60aaed30d7d26eaacbb2c0ed4ddc66d.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.cancelMigrateReindex({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc
Normal file
10
docs/doc_examples/adced6e22ef03c2ae3b14aa5bdd24fd9.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.getMigrateReindexStatus({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,9 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/search_application/my_search_application/_render_query",
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my_search_application",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
10
docs/doc_examples/b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc
Normal file
10
docs/doc_examples/b1e81b70b874a1f0cf75a0ec6e430ddc.asciidoc
Normal file
@ -0,0 +1,10 @@
|
||||
// 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.esql.asyncQueryStop({
|
||||
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -208,13 +208,9 @@ const response = await client.bulk({
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_text_structure/find_field_structure",
|
||||
querystring: {
|
||||
index: "test-logs",
|
||||
field: "message",
|
||||
},
|
||||
const response1 = await client.textStructure.findFieldStructure({
|
||||
index: "test-logs",
|
||||
field: "message",
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
|
||||
@ -3,36 +3,32 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
uppercase: {
|
||||
field: "foo",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
uppercase: {
|
||||
field: "foo",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -3,13 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/api_key/_bulk_update",
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {},
|
||||
},
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,69 +3,65 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
set: {
|
||||
field: "field3",
|
||||
value: "value3",
|
||||
},
|
||||
},
|
||||
],
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
component_template_substitutions: {
|
||||
"my-component-template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "true",
|
||||
properties: {
|
||||
field3: {
|
||||
type: "keyword",
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
set: {
|
||||
field: "field3",
|
||||
value: "value3",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
component_template_substitutions: {
|
||||
"my-component-template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "true",
|
||||
properties: {
|
||||
field3: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
index: {
|
||||
default_pipeline: "my-pipeline",
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
index: {
|
||||
default_pipeline: "my-pipeline",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
index_template_substitutions: {
|
||||
"my-index-template": {
|
||||
index_patterns: ["my-index-*"],
|
||||
composed_of: ["component_template_1", "component_template_2"],
|
||||
},
|
||||
},
|
||||
index_template_substitutions: {
|
||||
"my-index-template": {
|
||||
index_patterns: ["my-index-*"],
|
||||
composed_of: ["component_template_1", "component_template_2"],
|
||||
},
|
||||
mapping_addition: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
mapping_addition: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -3,13 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/prepare",
|
||||
body: {
|
||||
iss: "http://127.0.0.1:8080",
|
||||
login_hint: "this_is_an_opaque_string",
|
||||
},
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
iss: "http://127.0.0.1:8080",
|
||||
login_hint: "this_is_an_opaque_string",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,10 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_ingest/ip_location/database/my-database-2",
|
||||
body: {
|
||||
const response = await client.ingest.putIpLocationDatabase({
|
||||
id: "my-database-2",
|
||||
configuration: {
|
||||
name: "standard_location",
|
||||
ipinfo: {},
|
||||
},
|
||||
|
||||
@ -3,9 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_ingest/ip_location/database/my-database-id",
|
||||
const response = await client.ingest.getIpLocationDatabase({
|
||||
id: "my-database-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,6 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_security/settings",
|
||||
});
|
||||
const response = await client.security.getSettings();
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
14
docs/doc_examples/dde92fdf3469349ffe2c81764333543a.asciidoc
Normal file
14
docs/doc_examples/dde92fdf3469349ffe2c81764333543a.asciidoc
Normal file
@ -0,0 +1,14 @@
|
||||
// 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.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: {
|
||||
remove_index_blocks: false,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,12 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/prepare",
|
||||
body: {
|
||||
realm: "oidc1",
|
||||
},
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
realm: "oidc1",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,38 +3,34 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "foo",
|
||||
},
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "foo",
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
bar: "rab",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
bar: "rab",
|
||||
},
|
||||
],
|
||||
component_template_substitutions: {
|
||||
"my-mappings_template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
bar: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
],
|
||||
component_template_substitutions: {
|
||||
"my-mappings_template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
bar: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
12
docs/doc_examples/ec135f0cc0d3f526df68000b2a95c65b.asciidoc
Normal file
12
docs/doc_examples/ec135f0cc0d3f526df68000b2a95c65b.asciidoc
Normal file
@ -0,0 +1,12 @@
|
||||
// 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.createFrom({
|
||||
source: ".ml-anomalies-custom-example",
|
||||
dest: ".reindexed-v9-ml-anomalies-custom-example",
|
||||
create_from: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -2108,7 +2108,6 @@ export interface BulkIndexByScrollFailure {
|
||||
id: Id
|
||||
index: IndexName
|
||||
status: integer
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface BulkStats {
|
||||
|
||||
@ -2184,7 +2184,6 @@ export interface BulkIndexByScrollFailure {
|
||||
id: Id
|
||||
index: IndexName
|
||||
status: integer
|
||||
type: string
|
||||
}
|
||||
|
||||
export interface BulkStats {
|
||||
|
||||
Reference in New Issue
Block a user