Skip to content

Commit 5f02051

Browse files
committed
Add esql.async_query_get
1 parent 07d82c2 commit 5f02051

File tree

7 files changed

+311
-10
lines changed

7 files changed

+311
-10
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 124 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,6 @@
297297
],
298298
"response": []
299299
},
300-
"esql.async_query_get": {
301-
"request": [
302-
"Missing request & response"
303-
],
304-
"response": []
305-
},
306300
"features.get_features": {
307301
"request": [
308302
"Request: missing json spec query parameter 'master_timeout'"

output/typescript/types.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ eql-syntax,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/eql-
161161
eql,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/eql.html
162162
esql,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql.html
163163
esql-async-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-api.html
164+
esql-async-query-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-get-api.html
164165
esql-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html
165166
esql-query-params,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html#esql-rest-params
166167
esql-returning-localized-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html#esql-locale-param
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Id } from '@_types/common'
22+
import { Duration } from '@_types/Time'
23+
24+
/**
25+
* Get async ES|QL query results.
26+
* Get the current status and available results or stored results for an ES|QL asynchronous query.
27+
* If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.
28+
* @rest_spec_name esql.async_query_get
29+
* @availability stack since=8.13.0 stability=stable visibility=public
30+
* @doc_id esql-async-query-get
31+
* @ext_doc_id esql
32+
*/
33+
export interface Request extends RequestBase {
34+
path_parts: {
35+
/**
36+
* The unique identifier of the query.
37+
* A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.
38+
* A query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.
39+
*/
40+
id: Id
41+
}
42+
query_parameters: {
43+
/**
44+
* Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
45+
* If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
46+
* @server_default false
47+
*/
48+
drop_null_columns?: boolean
49+
/**
50+
* The period for which the query and its results are stored in the cluster.
51+
* When this period expires, the query and its results are deleted, even if the query is still ongoing.
52+
*/
53+
keep_alive?: Duration
54+
/**
55+
* The period to wait for the request to finish.
56+
* By default, the request waits for complete query results.
57+
* If the request completes during the period specified in this parameter, complete query results are returned.
58+
* Otherwise, the response returns an `is_running` value of `true` and no results.
59+
*/
60+
wait_for_completion_timeout?: Duration
61+
}
62+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { EsqlColumns } from '@_types/Binary'
21+
22+
export class Response {
23+
body: {
24+
columns?: EsqlColumns
25+
/**
26+
* Indicates whether the query is still running.
27+
* If the value is false, the async query has finished and the results are returned.
28+
*/
29+
is_running: boolean
30+
}
31+
}

0 commit comments

Comments
 (0)