Skip to content

Commit eb5e4b3

Browse files
Add esql version (#2512) (#2525)
Adds a `version` parameter to the ESQL `_query` request endpoint. We'll do some work to give this a default value in the generated clients soon, but for 8.14+ this'll be a required parameter. --------- Co-authored-by: Alexander Spies <alexander.spies@elastic.co> (cherry picked from commit 947a1ea) Co-authored-by: Nik Everett <nik9000@gmail.com>
1 parent 9121888 commit eb5e4b3

File tree

4 files changed

+66
-1
lines changed

4 files changed

+66
-1
lines changed

output/schema/schema.json

Lines changed: 27 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

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

specification/esql/_types/Version.ts

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 { integer } from '@_types/Numeric'
21+
import { Duration } from '@_types/Time'
22+
23+
/**
24+
* The version of the ES|QL language in which the "query" field was written.
25+
*/
26+
export enum Version {
27+
/**
28+
* Run against the first version of ES|QL.
29+
*/
30+
'2024.04.01'
31+
}

specification/esql/query/QueryRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import { RequestBase } from '@_types/Base'
2121
import { QueryContainer } from '@_types/query_dsl/abstractions'
2222
import { ScalarValue } from '@_types/common'
23+
import { Version } from '@esql/_types/Version'
2324

2425
/**
2526
* Executes an ES|QL request
@@ -60,5 +61,9 @@ export interface Request extends RequestBase {
6061
* The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.
6162
*/
6263
query: string
64+
/**
65+
* The version of the ES|QL language in which the "query" field was written.
66+
*/
67+
version: Version
6368
}
6469
}

0 commit comments

Comments
 (0)