Skip to content

Commit 60510ff

Browse files
Auto-generated API code
1 parent 8d868df commit 60510ff

File tree

135 files changed

+1233
-1000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+1233
-1000
lines changed

docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33

44
[source, js]
55
----
6-
const response = await client.esql.asyncQuery({
7-
format: "json",
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_query/async",
9+
querystring: {
10+
format: "json",
11+
},
812
body: {
913
query:
1014
"\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 ",

docs/doc_examples/160986f49758f4e8345d183a842f6351.asciidoc renamed to docs/doc_examples/0c52af573c9401a2a687e86a4beb182b.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const response = await client.ingest.putPipeline({
1010
{
1111
attachment: {
1212
field: "data",
13-
remove_binary: false,
13+
remove_binary: true,
1414
},
1515
},
1616
],

docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
[source, js]
55
----
6-
const response = await client.searchApplication.renderQuery({
7-
name: "my-app",
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_application/search_application/my-app/_render_query",
89
body: {
910
params: {
1011
query_string: "my first query",

docs/doc_examples/16634cfa7916cf4e8048a1d70e6240f2.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const response = await client.searchApplication.put({
1111
script: {
1212
lang: "mustache",
1313
source:
14-
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n \n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
14+
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
1515
params: {
1616
query: "",
1717
_es_filters: {},

docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
[source, js]
55
----
6-
const response = await client.simulate.ingest({
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_ingest/_simulate",
79
body: {
810
docs: [
911
{

docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
[source, js]
55
----
6-
const response = await client.security.oidcLogout({
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_security/oidc/logout",
79
body: {
810
token:
911
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// This file is autogenerated, DO NOT EDIT
2+
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
3+
4+
[source, js]
5+
----
6+
const response = await client.ingest.putPipeline({
7+
id: "attachment",
8+
description: "Extract attachment information including original binary",
9+
processors: [
10+
{
11+
attachment: {
12+
field: "data",
13+
remove_binary: false,
14+
},
15+
},
16+
],
17+
});
18+
console.log(response);
19+
20+
const response1 = await client.index({
21+
index: "my-index-000001",
22+
id: "my_id",
23+
pipeline: "attachment",
24+
document: {
25+
data: "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=",
26+
},
27+
});
28+
console.log(response1);
29+
30+
const response2 = await client.get({
31+
index: "my-index-000001",
32+
id: "my_id",
33+
});
34+
console.log(response2);
35+
----

docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33

44
[source, js]
55
----
6-
const response = await client.esql.asyncQueryGet({
7-
id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
8-
wait_for_completion_timeout: "30s",
9-
body: null,
6+
const response = await client.transport.request({
7+
method: "GET",
8+
path: "/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
9+
querystring: {
10+
wait_for_completion_timeout: "30s",
11+
},
1012
});
1113
console.log(response);
1214
----

docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
[source, js]
55
----
6-
const response = await client.esql.asyncQuery({
6+
const response = await client.transport.request({
7+
method: "POST",
8+
path: "/_query/async",
79
body: {
810
query:
911
"\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 ",

docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
[source, js]
55
----
6-
const response = await client.esql.asyncQueryGet({
7-
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
8-
body: null,
6+
const response = await client.transport.request({
7+
method: "GET",
8+
path: "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
99
});
1010
console.log(response);
1111
----

0 commit comments

Comments
 (0)