Skip to content

Update spec for ESQL async query stop (#3643) #3650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 103 additions & 0 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions specification/_doc_ids/table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ esql,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql.html
esql-async-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-api.html
esql-async-query-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-delete-api.html
esql-async-query-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-get-api.html
esql-async-query-stop,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-async-query-stop-api.html
esql-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html
esql-query-params,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html#esql-rest-params
esql-returning-localized-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/esql-rest.html#esql-locale-param
Expand Down
27 changes: 27 additions & 0 deletions specification/_json_spec/esql.async_query_stop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"esql.async_query_stop": {
"documentation": {
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-async-query-stop-api.html",
"description": "Stops a previously submitted async query request given its ID and collects the results."
},
"stability": "stable",
"visibility": "public",
"headers": {
"accept": ["application/json"]
},
"url": {
"paths": [
{
"path": "/_query/async/{id}/stop",
"methods": ["POST"],
"parts": {
"id": {
"type": "string",
"description": "The async query ID"
}
}
}
]
}
}
}
50 changes: 50 additions & 0 deletions specification/esql/async_query_stop/AsyncQueryStopRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'

/**
* Stop async ES|QL query.
*
* This API interrupts the query execution and returns the results so far.
* If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.
* @rest_spec_name esql.async_query_stop
* @availability stack since=8.18.0 stability=stable visibility=public
* @doc_id esql-async-query-stop
* @ext_doc_id esql
*/
export interface Request extends RequestBase {
path_parts: {
/**
* The unique identifier of the query.
* A query ID is provided in the ES|QL async query API response for a query that does not complete in the designated time.
* A query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`.
*/
id: Id
}
query_parameters: {
/**
* Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
* If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
* @server_default false
*/
drop_null_columns?: boolean
}
}
24 changes: 24 additions & 0 deletions specification/esql/async_query_stop/AsyncQueryStopResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { EsqlResult } from '@_types/Binary'

export class Response {
body: EsqlResult
}
Loading