Auto-generated code for 8.15 (#2342)
This commit is contained in:
@ -5,6 +5,21 @@
|
||||
----
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my-app",
|
||||
body: {
|
||||
params: {
|
||||
query_string: "my first query",
|
||||
text_fields: [
|
||||
{
|
||||
name: "title",
|
||||
boost: 5,
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
boost: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
20
docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc
Normal file
20
docs/doc_examples/0fbca60a487f5f22a4d51d73b2434cc4.asciidoc
Normal 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.indices.create({
|
||||
index: "elser-embeddings",
|
||||
mappings: {
|
||||
properties: {
|
||||
content_embedding: {
|
||||
type: "sparse_vector",
|
||||
},
|
||||
content: {
|
||||
type: "text",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -5,6 +5,11 @@
|
||||
----
|
||||
const response = await client.security.queryUser({
|
||||
with_profile_uid: "true",
|
||||
query: {
|
||||
prefix: {
|
||||
roles: "other",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,6 +3,25 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({});
|
||||
const response = await client.simulate.ingest({
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
11
docs/doc_examples/19d60e4890cc57151d596326484d9076.asciidoc
Normal file
11
docs/doc_examples/19d60e4890cc57151d596326484d9076.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.ingest.deleteGeoipDatabase({
|
||||
id: "my-database-id",
|
||||
body: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
21
docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.asciidoc
Normal file
21
docs/doc_examples/1b60ad542abb511cbd926ac8c55b609c.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.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_inference/sparse_embedding/my-elser-model",
|
||||
body: {
|
||||
service: "elser",
|
||||
service_settings: {
|
||||
adaptive_allocations: {
|
||||
enabled: true,
|
||||
min_number_of_allocations: 3,
|
||||
max_number_of_allocations: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcLogout({});
|
||||
const response = await client.security.oidcLogout({
|
||||
body: {
|
||||
token:
|
||||
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
|
||||
refresh_token: "vLBPvmAB6KvwvJZr27cS",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
10
docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.asciidoc
Normal file
10
docs/doc_examples/2acf75803494fef29f9ca70671aa6be1.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.security.bulkDeleteRole({
|
||||
names: ["my_admin_role", "superuser"],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -6,6 +6,7 @@
|
||||
const response = await client.esql.asyncQueryGet({
|
||||
id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
|
||||
wait_for_completion_timeout: "30s",
|
||||
body: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
25
docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.asciidoc
Normal file
25
docs/doc_examples/30fa37c9575fe81a0ea7c12cfc08e277.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.create({
|
||||
index: "bad_example_index",
|
||||
mappings: {
|
||||
properties: {
|
||||
field_1: {
|
||||
type: "text",
|
||||
copy_to: "field_2",
|
||||
},
|
||||
field_2: {
|
||||
type: "text",
|
||||
copy_to: "field_3",
|
||||
},
|
||||
field_3: {
|
||||
type: "text",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
21
docs/doc_examples/398389933901b572a06a752bc780af7c.asciidoc
Normal file
21
docs/doc_examples/398389933901b572a06a752bc780af7c.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.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_inference/completion/anthropic_completion",
|
||||
body: {
|
||||
service: "anthropic",
|
||||
service_settings: {
|
||||
api_key: "<api_key>",
|
||||
model_id: "<model_id>",
|
||||
},
|
||||
task_settings: {
|
||||
max_tokens: 1024,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
11
docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.asciidoc
Normal file
11
docs/doc_examples/3b6718257421b5419bf4cd6a7303c57e.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.ingest.getGeoipDatabase({
|
||||
id: "my-database-id",
|
||||
body: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQuery({});
|
||||
const response = await client.esql.asyncQuery({
|
||||
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",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
----
|
||||
const response = await client.esql.asyncQueryGet({
|
||||
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
body: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
10
docs/doc_examples/44385b61342e20ea05f254015b2b04d7.asciidoc
Normal file
10
docs/doc_examples/44385b61342e20ea05f254015b2b04d7.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.security.bulkDeleteRole({
|
||||
names: ["my_admin_role", "my_user_role"],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
11
docs/doc_examples/4982c547be1ad9455ae836990aea92c5.asciidoc
Normal file
11
docs/doc_examples/4982c547be1ad9455ae836990aea92c5.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.ml.startTrainedModelDeployment({
|
||||
model_id: "my_model",
|
||||
deployment_id: "my_model_for_search",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
21
docs/doc_examples/517d291044c3e4448b8804322616ab4a.asciidoc
Normal file
21
docs/doc_examples/517d291044c3e4448b8804322616ab4a.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.ingest.putPipeline({
|
||||
id: "elser_embeddings",
|
||||
processors: [
|
||||
{
|
||||
inference: {
|
||||
model_id: "elser_embeddings",
|
||||
input_output: {
|
||||
input_field: "content",
|
||||
output_field: "content_embedding",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
11
docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.asciidoc
Normal file
11
docs/doc_examples/533087d787b48878a0bf3fa8d0851b64.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.ingest.deleteGeoipDatabase({
|
||||
id: "example-database-id",
|
||||
body: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcPrepareAuthentication({});
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
body: {
|
||||
realm: "oidc1",
|
||||
state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
|
||||
nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
28
docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc
Normal file
28
docs/doc_examples/5d3ee81bcf6ad57f39052c9065963cc3.asciidoc
Normal file
@ -0,0 +1,28 @@
|
||||
// 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: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
description: {
|
||||
properties: {
|
||||
notes: {
|
||||
type: "text",
|
||||
copy_to: ["description.notes_raw"],
|
||||
analyzer: "standard",
|
||||
search_analyzer: "standard",
|
||||
},
|
||||
notes_raw: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
10
docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.asciidoc
Normal file
10
docs/doc_examples/5deeed427f35cbaee4b8ddc45002a9d7.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.security.bulkDeleteRole({
|
||||
names: ["my_admin_role", "not_an_existing_role"],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,47 +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.search({
|
||||
query: {
|
||||
intervals: {
|
||||
my_text: {
|
||||
all_of: {
|
||||
intervals: [
|
||||
{
|
||||
match: {
|
||||
query: "the",
|
||||
},
|
||||
},
|
||||
{
|
||||
any_of: {
|
||||
intervals: [
|
||||
{
|
||||
match: {
|
||||
query: "big",
|
||||
},
|
||||
},
|
||||
{
|
||||
match: {
|
||||
query: "big bad",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
match: {
|
||||
query: "wolf",
|
||||
},
|
||||
},
|
||||
],
|
||||
max_gaps: 0,
|
||||
ordered: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -29,7 +29,7 @@ const response = await client.transport.request({
|
||||
},
|
||||
{
|
||||
rule_id: "rule2",
|
||||
type: "pinned",
|
||||
type: "exclude",
|
||||
criteria: [
|
||||
{
|
||||
type: "contains",
|
||||
59
docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc
Normal file
59
docs/doc_examples/63bf3480627a89b4b4ede4150e1d6bc0.asciidoc
Normal file
@ -0,0 +1,59 @@
|
||||
// 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.bulkPutRole({
|
||||
roles: {
|
||||
my_admin_role: {
|
||||
cluster: ["all"],
|
||||
indices: [
|
||||
{
|
||||
names: ["index1", "index2"],
|
||||
privileges: ["all"],
|
||||
field_security: {
|
||||
grant: ["title", "body"],
|
||||
},
|
||||
query: '{"match": {"title": "foo"}}',
|
||||
},
|
||||
],
|
||||
applications: [
|
||||
{
|
||||
application: "myapp",
|
||||
privileges: ["admin", "read"],
|
||||
resources: ["*"],
|
||||
},
|
||||
],
|
||||
run_as: ["other_user"],
|
||||
metadata: {
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
my_user_role: {
|
||||
cluster: ["all"],
|
||||
indices: [
|
||||
{
|
||||
names: ["index1"],
|
||||
privileges: ["read"],
|
||||
field_security: {
|
||||
grant: ["title", "body"],
|
||||
},
|
||||
query: '{"match": {"title": "foo"}}',
|
||||
},
|
||||
],
|
||||
applications: [
|
||||
{
|
||||
application: "myapp",
|
||||
privileges: ["admin", "read"],
|
||||
resources: ["*"],
|
||||
},
|
||||
],
|
||||
run_as: ["other_user"],
|
||||
metadata: {
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -29,7 +29,7 @@ const response = await client.transport.request({
|
||||
},
|
||||
{
|
||||
rule_id: "my-rule2",
|
||||
type: "pinned",
|
||||
type: "exclude",
|
||||
criteria: [
|
||||
{
|
||||
type: "fuzzy",
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.bulkUpdateApiKeys({});
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,6 +3,33 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.textStructure.findMessageStructure({});
|
||||
const response = await client.textStructure.findMessageStructure({
|
||||
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 ...",
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,6 +3,37 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({});
|
||||
const response = await client.simulate.ingest({
|
||||
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",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -19,6 +19,12 @@ const response = await client.security.putRole({
|
||||
clusters: ["my_remote_cluster"],
|
||||
},
|
||||
],
|
||||
remote_cluster: [
|
||||
{
|
||||
privileges: ["monitor_enrich"],
|
||||
clusters: ["my_remote_cluster"],
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,28 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.bulkUpdateApiKeys({});
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {
|
||||
"role-a": {
|
||||
indices: [
|
||||
{
|
||||
names: ["*"],
|
||||
privileges: ["write"],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
metadata: {
|
||||
environment: {
|
||||
level: 2,
|
||||
trusted: true,
|
||||
tags: ["production"],
|
||||
},
|
||||
},
|
||||
expiration: "30d",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
16
docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc
Normal file
16
docs/doc_examples/81aad155ff23b1b396833b1182c9d46b.asciidoc
Normal file
@ -0,0 +1,16 @@
|
||||
// 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.cat.shards({
|
||||
v: "true",
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.cat.recovery({
|
||||
v: "true",
|
||||
active_only: "true",
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
22
docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.asciidoc
Normal file
22
docs/doc_examples/840f8c863c30b04abcf2dd66b846f157.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.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_inference/text_embedding/my-e5-model",
|
||||
body: {
|
||||
service: "elasticsearch",
|
||||
service_settings: {
|
||||
adaptive_allocations: {
|
||||
enabled: true,
|
||||
min_number_of_allocations: 3,
|
||||
max_number_of_allocations: 10,
|
||||
},
|
||||
model_id: ".multilingual-e5-small",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,8 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.delete({
|
||||
index: "my-index",
|
||||
const response = await client.security.queryRole({
|
||||
sort: ["name"],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
17
docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc
Normal file
17
docs/doc_examples/95c1b376652533c352bbf793c74d1b08.asciidoc
Normal file
@ -0,0 +1,17 @@
|
||||
// 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.queryRole({
|
||||
query: {
|
||||
match: {
|
||||
description: {
|
||||
query: "user access",
|
||||
},
|
||||
},
|
||||
},
|
||||
size: 1,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
16
docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc
Normal file
16
docs/doc_examples/981b331db1404b39c1a612a135e4e76d.asciidoc
Normal file
@ -0,0 +1,16 @@
|
||||
// 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.ingest.putGeoipDatabase({
|
||||
id: "my-database-id",
|
||||
body: {
|
||||
name: "GeoIP2-Domain",
|
||||
maxmind: {
|
||||
account_id: "1025402",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -6,6 +6,36 @@
|
||||
const response = await client.searchApplication.postBehavioralAnalyticsEvent({
|
||||
collection_name: "my_analytics_collection",
|
||||
event_type: "search_click",
|
||||
body: {
|
||||
session: {
|
||||
id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9",
|
||||
},
|
||||
user: {
|
||||
id: "5f26f01a-bbee-4202-9298-81261067abbd",
|
||||
},
|
||||
search: {
|
||||
query: "search term",
|
||||
results: {
|
||||
items: [
|
||||
{
|
||||
document: {
|
||||
id: "123",
|
||||
index: "products",
|
||||
},
|
||||
},
|
||||
],
|
||||
total_results: 10,
|
||||
},
|
||||
sort: {
|
||||
name: "relevance",
|
||||
},
|
||||
search_application: "website",
|
||||
},
|
||||
document: {
|
||||
id: "123",
|
||||
index: "products",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,6 +3,14 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcAuthenticate({});
|
||||
const response = await client.security.oidcAuthenticate({
|
||||
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",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -5,6 +5,11 @@
|
||||
----
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my_search_application",
|
||||
body: {
|
||||
params: {
|
||||
query_string: "rock climbing",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
18
docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc
Normal file
18
docs/doc_examples/a225fc8c134cb21a85bc6025dac9368b.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// 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: "PUT",
|
||||
path: "/_inference/sparse_embedding/elser_embeddings",
|
||||
body: {
|
||||
service: "elser",
|
||||
service_settings: {
|
||||
num_allocations: 1,
|
||||
num_threads: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
18
docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc
Normal file
18
docs/doc_examples/aebf9cc593fcf0d4ca08f8b61b67bf17.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// 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.snapshot.createRepository({
|
||||
name: "my_backup",
|
||||
repository: {
|
||||
type: "azure",
|
||||
settings: {
|
||||
client: "secondary",
|
||||
container: "my_container",
|
||||
base_path: "snapshots_prefix",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -5,6 +5,7 @@
|
||||
----
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my_search_application",
|
||||
body: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -211,6 +211,7 @@ console.log(response);
|
||||
const response1 = await client.textStructure.findFieldStructure({
|
||||
index: "test-logs",
|
||||
field: "message",
|
||||
body: null,
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
|
||||
@ -3,6 +3,36 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({});
|
||||
const response = await client.simulate.ingest({
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
uppercase: {
|
||||
field: "foo",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
18
docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc
Normal file
18
docs/doc_examples/bfb0db2a72f22c9c2046119777efbb43.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// 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: "elser-embeddings",
|
||||
query: {
|
||||
sparse_vector: {
|
||||
field: "content_embedding",
|
||||
inference_id: "elser_embeddings",
|
||||
query: "How to avoid muscle soreness after running?",
|
||||
},
|
||||
},
|
||||
_source: ["id", "content"],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,11 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.bulkUpdateApiKeys({});
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,50 +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.snapshot.createRepository({
|
||||
name: "my_backup1",
|
||||
repository: {
|
||||
type: "azure",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.snapshot.createRepository({
|
||||
name: "my_backup2",
|
||||
repository: {
|
||||
type: "azure",
|
||||
settings: {
|
||||
container: "backup-container",
|
||||
base_path: "backups",
|
||||
chunk_size: "32MB",
|
||||
compress: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response1);
|
||||
|
||||
const response2 = await client.snapshot.createRepository({
|
||||
name: "my_backup3",
|
||||
repository: {
|
||||
type: "azure",
|
||||
settings: {
|
||||
client: "secondary",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response2);
|
||||
|
||||
const response3 = await client.snapshot.createRepository({
|
||||
name: "my_backup4",
|
||||
repository: {
|
||||
type: "azure",
|
||||
settings: {
|
||||
client: "secondary",
|
||||
location_mode: "primary_only",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response3);
|
||||
----
|
||||
18
docs/doc_examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc
Normal file
18
docs/doc_examples/c9373ff5ed6b026173428fbb92ca2d9f.asciidoc
Normal file
@ -0,0 +1,18 @@
|
||||
// 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.reindex({
|
||||
wait_for_completion: "false",
|
||||
source: {
|
||||
index: "test-data",
|
||||
size: 50,
|
||||
},
|
||||
dest: {
|
||||
index: "elser-embeddings",
|
||||
pipeline: "elser_embeddings",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
13
docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc
Normal file
13
docs/doc_examples/d27591881da6f5767523b1beb233adc7.asciidoc
Normal file
@ -0,0 +1,13 @@
|
||||
// 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.snapshot.createRepository({
|
||||
name: "my_backup",
|
||||
repository: {
|
||||
type: "azure",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,11 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcPrepareAuthentication({});
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
body: {
|
||||
iss: "http://127.0.0.1:8080",
|
||||
login_hint: "this_is_an_opaque_string",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
15
docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.asciidoc
Normal file
15
docs/doc_examples/dfce1be1d035aff0b8fdf4a8839f7795.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.ml.updateTrainedModelDeployment({
|
||||
model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
|
||||
adaptive_allocations: {
|
||||
enabled: true,
|
||||
min_number_of_allocations: 3,
|
||||
max_number_of_allocations: 10,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcPrepareAuthentication({});
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
body: {
|
||||
realm: "oidc1",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,6 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.queryUser({});
|
||||
const response = await client.security.queryUser({
|
||||
query: {
|
||||
prefix: {
|
||||
roles: "other",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,33 +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.search({
|
||||
query: {
|
||||
intervals: {
|
||||
my_text: {
|
||||
any_of: {
|
||||
intervals: [
|
||||
{
|
||||
match: {
|
||||
query: "the big bad wolf",
|
||||
ordered: true,
|
||||
max_gaps: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
match: {
|
||||
query: "the big wolf",
|
||||
ordered: true,
|
||||
max_gaps: 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
24
docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc
Normal file
24
docs/doc_examples/eb141f8df8ead40ff7440b623ea92267.asciidoc
Normal file
@ -0,0 +1,24 @@
|
||||
// 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: "good_example_index",
|
||||
mappings: {
|
||||
properties: {
|
||||
field_1: {
|
||||
type: "text",
|
||||
copy_to: ["field_2", "field_3"],
|
||||
},
|
||||
field_2: {
|
||||
type: "text",
|
||||
},
|
||||
field_3: {
|
||||
type: "text",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
59
docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc
Normal file
59
docs/doc_examples/eb9a41f7fc8bdf5559bb9db822ae3a65.asciidoc
Normal file
@ -0,0 +1,59 @@
|
||||
// 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.bulkPutRole({
|
||||
roles: {
|
||||
my_admin_role: {
|
||||
cluster: ["bad_cluster_privilege"],
|
||||
indices: [
|
||||
{
|
||||
names: ["index1", "index2"],
|
||||
privileges: ["all"],
|
||||
field_security: {
|
||||
grant: ["title", "body"],
|
||||
},
|
||||
query: '{"match": {"title": "foo"}}',
|
||||
},
|
||||
],
|
||||
applications: [
|
||||
{
|
||||
application: "myapp",
|
||||
privileges: ["admin", "read"],
|
||||
resources: ["*"],
|
||||
},
|
||||
],
|
||||
run_as: ["other_user"],
|
||||
metadata: {
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
my_user_role: {
|
||||
cluster: ["all"],
|
||||
indices: [
|
||||
{
|
||||
names: ["index1"],
|
||||
privileges: ["read"],
|
||||
field_security: {
|
||||
grant: ["title", "body"],
|
||||
},
|
||||
query: '{"match": {"title": "foo"}}',
|
||||
},
|
||||
],
|
||||
applications: [
|
||||
{
|
||||
application: "myapp",
|
||||
privileges: ["admin", "read"],
|
||||
resources: ["*"],
|
||||
},
|
||||
],
|
||||
run_as: ["other_user"],
|
||||
metadata: {
|
||||
version: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user