diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f6fe38224c..5dd25f3f78 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -9468,36 +9468,6 @@ "$ref": "#/components/schemas/esql.query.EsqlFormat" }, "style": "form" - }, - { - "in": "query", - "name": "keep_alive", - "description": "The period for which the query and its results are stored in the cluster.\nThe default period is five days.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.\nIf the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" - }, - { - "in": "query", - "name": "keep_on_completion", - "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "wait_for_completion_timeout", - "description": "The period to wait for the request to finish.\nBy default, the request waits for 1 second for the query results.\nIf the query completes during this period, results are returned\nOtherwise, a query ID is returned that can later be used to retrieve the results.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.Duration" - }, - "style": "form" } ], "requestBody": { @@ -9547,6 +9517,13 @@ }, "wait_for_completion_timeout": { "$ref": "#/components/schemas/_types.Duration" + }, + "keep_alive": { + "$ref": "#/components/schemas/_types.Duration" + }, + "keep_on_completion": { + "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", + "type": "boolean" } }, "required": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 4709e55370..0eff7095b2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -127702,6 +127702,32 @@ "namespace": "_types" } } + }, + { + "description": "The period for which the query and its results are stored in the cluster.\nThe default period is five days.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.\nIf the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value.", + "name": "keep_alive", + "required": false, + "serverDefault": "5d", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", + "name": "keep_on_completion", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -127759,48 +127785,9 @@ "namespace": "esql.query" } } - }, - { - "description": "The period for which the query and its results are stored in the cluster.\nThe default period is five days.\nWhen this period expires, the query and its results are deleted, even if the query is still ongoing.\nIf the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value.", - "name": "keep_alive", - "required": false, - "serverDefault": "5d", - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } - }, - { - "description": "Indicates whether the query and its results are stored in the cluster.\nIf false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter.", - "name": "keep_on_completion", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "The period to wait for the request to finish.\nBy default, the request waits for 1 second for the query results.\nIf the query completes during this period, results are returned\nOtherwise, a query ID is returned that can later be used to retrieve the results.", - "name": "wait_for_completion_timeout", - "required": false, - "serverDefault": "1s", - "type": { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - } } ], - "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L133" + "specLocation": "esql/async_query/AsyncQueryRequest.ts#L28-L125" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 641b16c1af..6bde56347c 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -194,14 +194,6 @@ ], "response": [] }, - "esql.async_query": { - "request": [ - "Request: query parameter 'keep_alive' does not exist in the json spec", - "Request: query parameter 'keep_on_completion' does not exist in the json spec", - "Request: query parameter 'wait_for_completion_timeout' does not exist in the json spec" - ], - "response": [] - }, "get_source": { "request": [ "Request: query parameter 'stored_fields' does not exist in the json spec" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 409cd779be..8e3ada2874 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10781,9 +10781,6 @@ export interface EsqlAsyncQueryRequest extends RequestBase { delimiter?: string drop_null_columns?: boolean format?: EsqlQueryEsqlFormat - keep_alive?: Duration - keep_on_completion?: boolean - wait_for_completion_timeout?: Duration body?: { columnar?: boolean filter?: QueryDslQueryContainer @@ -10794,6 +10791,8 @@ export interface EsqlAsyncQueryRequest extends RequestBase { tables?: Record> include_ccs_metadata?: boolean wait_for_completion_timeout?: Duration + keep_alive?: Duration + keep_on_completion?: boolean } } diff --git a/specification/esql/async_query/AsyncQueryRequest.ts b/specification/esql/async_query/AsyncQueryRequest.ts index f03b414260..5043807a0a 100644 --- a/specification/esql/async_query/AsyncQueryRequest.ts +++ b/specification/esql/async_query/AsyncQueryRequest.ts @@ -53,28 +53,6 @@ export interface Request extends RequestBase { * A short version of the Accept header, for example `json` or `yaml`. */ format?: EsqlFormat - /** - * The period for which the query and its results are stored in the cluster. - * The default period is five days. - * When this period expires, the query and its results are deleted, even if the query is still ongoing. - * If the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value. - * @server_default 5d - */ - keep_alive?: Duration - /** - * Indicates whether the query and its results are stored in the cluster. - * If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter. - * @server_default false - */ - keep_on_completion?: boolean - /** - * The period to wait for the request to finish. - * By default, the request waits for 1 second for the query results. - * If the query completes during this period, results are returned - * Otherwise, a query ID is returned that can later be used to retrieve the results. - * @server_default 1s - */ - wait_for_completion_timeout?: Duration } /** * Use the `query` element to start a query. Use `time_zone` to specify an execution time zone and `columnar` to format the answer. @@ -129,5 +107,19 @@ export interface Request extends RequestBase { * @server_default 1s */ wait_for_completion_timeout?: Duration + /** + * The period for which the query and its results are stored in the cluster. + * The default period is five days. + * When this period expires, the query and its results are deleted, even if the query is still ongoing. + * If the `keep_on_completion` parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the `wait_for_completion_timeout` parameter, regardless of this value. + * @server_default 5d + */ + keep_alive?: Duration + /** + * Indicates whether the query and its results are stored in the cluster. + * If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter. + * @server_default false + */ + keep_on_completion?: boolean } }