Skip to content
Open
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
363 changes: 363 additions & 0 deletions output/schema/schema.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions output/schema/validation-errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
"Request: query parameter 'timeout' does not exist in the json spec"
],
"response": []
},
"esql.get_view": {
"request": [
"Request: different number of urls in the json spec",
"Request: path parameter 'name' is optional in the json spec"
],
"response": []
}
},
"generalErrors": [
Expand Down
28 changes: 28 additions & 0 deletions output/typescript/types.ts

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

3 changes: 3 additions & 0 deletions specification/_doc_ids/table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ esql-query-params,https://www.elastic.co/docs/explore-analyze/query-filter/langu
esql-returning-localized-results,https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest#esql-locale-param,,
esql-get-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query,,
esql-list-queries,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries,,
esql-get-view,,,
esql-put-view,,,
esql-delete-view,,,
evaluate-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/evaluate-dfanalytics.html,
execute-enrich-policy-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/execute-enrich-policy-api.html,
execute-watch,https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher/execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/watcher-api-execute-watch.html,
Expand Down
29 changes: 29 additions & 0 deletions specification/_json_spec/esql.delete_view.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"esql.delete_view": {
"documentation": {
"url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-view-delete",
"description": "Delete a non-materialized VIEW for ESQL."
},
"stability": "experimental",
"visibility": "feature_flag",
"feature_flag": "esql_views",
"headers": {
"accept": ["application/json"],
"content_type": ["application/json"]
},
"url": {
"paths": [
{
"path": "/_query/view/{name}",
"methods": ["DELETE"],
"parts": {
"name": {
"type": "string",
"description": "The name of the view to delete"
}
}
}
]
}
}
}
33 changes: 33 additions & 0 deletions specification/_json_spec/esql.get_view.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"esql.get_view": {
"documentation": {
"url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-view-get",
"description": "Get a non-materialized VIEW for ESQL."
},
"stability": "experimental",
"visibility": "feature_flag",
"feature_flag": "esql_views",
"headers": {
"accept": ["application/json"],
"content_type": ["application/json"]
},
"url": {
"paths": [
{
"path": "/_query/view/{name}",
"methods": ["GET"],
"parts": {
"name": {
"type": "list",
"description": "A comma-separated list of view names"
}
}
},
{
"path": "/_query/view",
"methods": ["GET"]
}
]
}
}
}
33 changes: 33 additions & 0 deletions specification/_json_spec/esql.put_view.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"esql.put_view": {
"documentation": {
"url": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-view-put",
"description": "Creates a non-materialized VIEW for ESQL."
},
"stability": "experimental",
"visibility": "feature_flag",
"feature_flag": "esql_views",
"headers": {
"accept": ["application/json"],
"content_type": ["application/json"]
},
"url": {
"paths": [
{
"path": "/_query/view/{name}",
"methods": ["PUT"],
"parts": {
"name": {
"type": "string",
"description": "The name of the view to create or update"
}
}
}
]
},
"body": {
"description": "Use the `query` element to define the ES|QL query to use as a non-materialized VIEW.",
"required": true
}
}
}
12 changes: 12 additions & 0 deletions specification/esql/_types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,15 @@
import { FieldValue } from '@_types/common'

export type ESQLParam = FieldValue | FieldValue[]

/**
*
* A non-materialized ES|QL view.
*
*/
export class ESQLView {
/** The name of the ES|QL view */
name: string
/** The ES|QL query */
query: string
}
47 changes: 47 additions & 0 deletions specification/esql/delete_view/DeleteViewRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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, MediaType } from '@_types/common'

/**
* Delete an ES|QL view.
*
* Deletes a stored ES|QL view.
*
* @rest_spec_name esql.delete_view
* @cluster_privileges monitor_esql
* @availability stack since=9.3.0 stability=experimental visibility=feature_flag feature_flag=esql_views
* @availability serverless stability=experimental visibility=feature_flag feature_flag=esql_views
* @doc_id esql-delete-view
*/
export interface Request extends RequestBase {
urls: [
{
path: '/_query/view/{name}'
methods: ['DELETE']
}
]
path_parts: {
/** The view name to remove. */
name: Id
}
request_media_type: MediaType.Json
response_media_type: MediaType.Json
}
25 changes: 25 additions & 0 deletions specification/esql/delete_view/DeleteViewResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* 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 { AcknowledgedResponseBase } from '@_types/Base'

export class Response {
/** @codegen_name result */
body: AcknowledgedResponseBase
}
47 changes: 47 additions & 0 deletions specification/esql/get_view/GetViewRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* 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, MediaType } from '@_types/common'

/**
* Get an ES|QL view.
*
* Returns a stored ES|QL view.
*
* @rest_spec_name esql.get_view
* @cluster_privileges monitor_esql
* @availability stack since=9.3.0 stability=experimental visibility=feature_flag feature_flag=esql_views
* @availability serverless stability=experimental visibility=feature_flag feature_flag=esql_views
* @doc_id esql-get-view
*/
export interface Request extends RequestBase {
urls: [
{
path: '/_query/view/{name}'
methods: ['GET']
}
]
path_parts: {
/** The comma-separated view names to retrieve. */
name: Id
}
request_media_type: MediaType.Json
response_media_type: MediaType.Json
}
26 changes: 26 additions & 0 deletions specification/esql/get_view/GetViewResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* 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 { ESQLView } from '@esql/_types/types'

export class Response {
body: {
views: ESQLView[]
}
}
49 changes: 49 additions & 0 deletions specification/esql/put_view/PutViewRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* 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, MediaType } from '@_types/common'

/**
* Create or update an ES|QL view.
*
* @rest_spec_name esql.put_view
* @cluster_privileges monitor_esql
* @availability stack since=9.3.0 stability=experimental visibility=feature_flag feature_flag=esql_views
* @availability serverless stability=experimental visibility=feature_flag feature_flag=esql_views
* @doc_id esql-put-view
*/
export interface Request extends RequestBase {
urls: [
{
path: '/_query/view/{name}'
methods: ['PUT']
}
]
path_parts: {
/** The view name to create or update. */
name: Id
}
body: {
/** The ES|QL query string from which to create a view. */
query: string
}
request_media_type: MediaType.Json
response_media_type: MediaType.Json
}
Loading