Skip to content

Commit 585f697

Browse files
authored
Update spec for ESQL async query stop (#3643)
* Update spec for ESQL async query stop
1 parent 30825df commit 585f697

File tree

7 files changed

+261
-0
lines changed

7 files changed

+261
-0
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 49 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: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 7 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
@@ -187,6 +187,7 @@ esql,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql.html
187187
esql-async-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-api.html
188188
esql-async-query-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-delete-api.html
189189
esql-async-query-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-get-api.html
190+
esql-async-query-stop,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-stop-api.html
190191
esql-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html
191192
esql-query-params,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html#esql-rest-params
192193
esql-returning-localized-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html#esql-locale-param
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"esql.async_query_stop": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-stop-api.html",
5+
"description": "Stops a previously submitted async query request given its ID and collects the results."
6+
},
7+
"stability": "stable",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": ["application/json"]
11+
},
12+
"url": {
13+
"paths": [
14+
{
15+
"path": "/_query/async/{id}/stop",
16+
"methods": ["POST"],
17+
"parts": {
18+
"id": {
19+
"type": "string",
20+
"description": "The async query ID"
21+
}
22+
}
23+
}
24+
]
25+
}
26+
}
27+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
23+
/**
24+
* Stop async ES|QL query.
25+
*
26+
* This API interrupts the query execution and returns the results so far.
27+
* If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.
28+
* @rest_spec_name esql.async_query_stop
29+
* @availability stack since=8.18.0 stability=stable visibility=public
30+
* @doc_id esql-async-query-stop
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+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 { EsqlResult } from '@_types/Binary'
21+
22+
export class Response {
23+
body: EsqlResult
24+
}

0 commit comments

Comments
 (0)