From 8374b20f67f58c03e8db7a5b05f2cee8f0bcd723 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 24 Nov 2025 16:12:13 -0700 Subject: [PATCH 1/3] Add project_routing param to _project/tags --- specification/_json_spec/project.tags.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/specification/_json_spec/project.tags.json b/specification/_json_spec/project.tags.json index 898154e50b..6d800f6a1b 100644 --- a/specification/_json_spec/project.tags.json +++ b/specification/_json_spec/project.tags.json @@ -7,15 +7,26 @@ "stability": "stable", "visibility": "public", "headers": { - "accept": ["application/json"] + "accept": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_project/tags", - "methods": ["GET"] + "methods": [ + "GET", + "POST" + ] } ] + }, + "params": { + "project_routing": { + "type": "string", + "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. Only supported in serverless." + } } } } From d50cd958c949a42213f16424535099de30a60de3 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 24 Nov 2025 16:20:52 -0700 Subject: [PATCH 2/3] update TS too --- .../elasticsearch-serverless-openapi.json | 74 +++++++++++++++---- output/schema/schema.json | 26 ++++++- output/typescript/types.ts | 1 + specification/_json_spec/project.tags.json | 11 +-- specification/project/tags/TagsRequest.ts | 9 ++- 5 files changed, 94 insertions(+), 27 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 3c8bbf9e34..ad05deb38e 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -22837,23 +22837,39 @@ "summary": "Get tags", "description": "Get the tags that are defined for the project.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", "operationId": "project-tags", + "parameters": [ + { + "$ref": "#/components/parameters/project.tags-project_routing" + } + ], "responses": { "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/project.tags.ProjectTags" - }, - "examples": { - "ProjectTagsResponseExample1": { - "summary": "Project tags", - "description": "A successful response from `GET /_project/tags`", - "value": "{\n \"origin\": {\n \"c56c4f8849c64cc6ae59c261f40bd195\": {\n \"_id\": \"c56c4f8849c64cc6ae59c261f40bd195\"\n \"_type\": \"elasticsearch\",\n \"_alias\": \"project-1\",\n \"_csp\": \"aws\",\n \"_region\": \"us-east-1\"\n \"mytag1\": \"foo\",\n \"mytag2\": \"bar\"\n }\n },\n \"linked_projects\": {\n \"a3b88ea3f195a336ae59c261f40bd195\": {\n \"_id\": \"a3b88ea3f195a336ae59c261f40bd195\"\n \"_type\": \"security\",\n \"_alias\": \"project-2\",\n \"_csp\": \"aws\",\n \"_region\": \"us-east-1\"\n \"mytag1\": \"foo\",\n \"mytag2\": \"bar\"\n },\n \"f40bd195389s3761023ca7aa8a3r0932\": {\n \"_id\": \"f40bd195389s3761023ca7aa8a3r0932\"\n \"_type\": \"observability\",\n \"_alias\": \"project-3\",\n \"_csp\": \"aws\",\n \"_region\": \"us-east-1\"\n \"mytag1\": \"foo\",\n \"mytag2\": \"bar\"\n }\n }\n}" - } - } - } - } + "$ref": "#/components/responses/project.tags-200" + } + }, + "x-state": "Technical preview", + "x-metaTags": [ + { + "content": "Elasticsearch", + "name": "product_name" + } + ] + }, + "post": { + "tags": [ + "project" + ], + "summary": "Get tags", + "description": "Get the tags that are defined for the project.\n\n## Required authorization\n\n* Cluster privileges: `monitor`\n", + "operationId": "project-tags-1", + "parameters": [ + { + "$ref": "#/components/parameters/project.tags-project_routing" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/project.tags-200" } }, "x-state": "Technical preview", @@ -83211,6 +83227,23 @@ } } }, + "project.tags-200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project.tags.ProjectTags" + }, + "examples": { + "ProjectTagsResponseExample1": { + "summary": "Project tags", + "description": "A successful response from `GET /_project/tags`", + "value": "{\n \"origin\": {\n \"c56c4f8849c64cc6ae59c261f40bd195\": {\n \"_id\": \"c56c4f8849c64cc6ae59c261f40bd195\"\n \"_type\": \"elasticsearch\",\n \"_alias\": \"project-1\",\n \"_csp\": \"aws\",\n \"_region\": \"us-east-1\"\n \"mytag1\": \"foo\",\n \"mytag2\": \"bar\"\n }\n },\n \"linked_projects\": {\n \"a3b88ea3f195a336ae59c261f40bd195\": {\n \"_id\": \"a3b88ea3f195a336ae59c261f40bd195\"\n \"_type\": \"security\",\n \"_alias\": \"project-2\",\n \"_csp\": \"aws\",\n \"_region\": \"us-east-1\"\n \"mytag1\": \"foo\",\n \"mytag2\": \"bar\"\n },\n \"f40bd195389s3761023ca7aa8a3r0932\": {\n \"_id\": \"f40bd195389s3761023ca7aa8a3r0932\"\n \"_type\": \"observability\",\n \"_alias\": \"project-3\",\n \"_csp\": \"aws\",\n \"_region\": \"us-east-1\"\n \"mytag1\": \"foo\",\n \"mytag2\": \"bar\"\n }\n }\n}" + } + } + } + } + }, "put_script-200": { "description": "", "content": { @@ -88146,6 +88179,17 @@ }, "style": "form" }, + "project.tags-project_routing": { + "in": "query", + "name": "project_routing", + "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*.", + "deprecated": false, + "schema": { + "type": "string" + }, + "x-state": "Technical preview", + "style": "form" + }, "put_script-id": { "in": "path", "name": "id", diff --git a/output/schema/schema.json b/output/schema/schema.json index 5d4331d5dd..1c380668c4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -16928,7 +16928,8 @@ "urls": [ { "methods": [ - "GET" + "GET", + "POST" ], "path": "/_project/tags" } @@ -233943,8 +233944,27 @@ "namespace": "project.tags" }, "path": [], - "query": [], - "specLocation": "project/tags/TagsRequest.ts#L22-L39" + "query": [ + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*.", + "name": "project_routing", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "project/tags/TagsRequest.ts#L22-L46" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b6fc1f0aca..741821f3f6 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -19828,6 +19828,7 @@ export interface ProjectTagsProjectTags { } export interface ProjectTagsRequest extends RequestBase { + project_routing?: string } export type ProjectTagsResponse = ProjectTagsProjectTags diff --git a/specification/_json_spec/project.tags.json b/specification/_json_spec/project.tags.json index 6d800f6a1b..346922a56b 100644 --- a/specification/_json_spec/project.tags.json +++ b/specification/_json_spec/project.tags.json @@ -7,25 +7,20 @@ "stability": "stable", "visibility": "public", "headers": { - "accept": [ - "application/json" - ] + "accept": ["application/json"] }, "url": { "paths": [ { "path": "/_project/tags", - "methods": [ - "GET", - "POST" - ] + "methods": ["GET", "POST"] } ] }, "params": { "project_routing": { "type": "string", - "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. Only supported in serverless." + "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*." } } } diff --git a/specification/project/tags/TagsRequest.ts b/specification/project/tags/TagsRequest.ts index 25f3b57778..8c9b3f2bd2 100644 --- a/specification/project/tags/TagsRequest.ts +++ b/specification/project/tags/TagsRequest.ts @@ -33,7 +33,14 @@ export interface Request extends RequestBase { urls: [ { path: '/_project/tags' - methods: ['GET'] + methods: ['GET', 'POST'] } ] + query_parameters: { + /** + * A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. + * @availability serverless stability=experimental visibility=public + */ + project_routing?: string + } } From b0d845ca626f3b8ed4e9372027f3f210024d61fa Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 25 Nov 2025 13:57:03 -0700 Subject: [PATCH 3/3] Update description --- output/openapi/elasticsearch-serverless-openapi.json | 2 +- output/schema/schema.json | 2 +- specification/_json_spec/project.tags.json | 2 +- specification/project/tags/TagsRequest.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index ad05deb38e..9e8b35759d 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -88182,7 +88182,7 @@ "project.tags-project_routing": { "in": "query", "name": "project_routing", - "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*.", + "description": "A Lucene query using project metadata tags used to filter which projects are returned in the response, such as _alias:_origin or _alias:*pr*.", "deprecated": false, "schema": { "type": "string" diff --git a/output/schema/schema.json b/output/schema/schema.json index 1c380668c4..1cefbbda25 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -233952,7 +233952,7 @@ "visibility": "public" } }, - "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*.", + "description": "A Lucene query using project metadata tags used to filter which projects are returned in the response, such as _alias:_origin or _alias:*pr*.", "name": "project_routing", "required": false, "type": { diff --git a/specification/_json_spec/project.tags.json b/specification/_json_spec/project.tags.json index 346922a56b..577324eabe 100644 --- a/specification/_json_spec/project.tags.json +++ b/specification/_json_spec/project.tags.json @@ -20,7 +20,7 @@ "params": { "project_routing": { "type": "string", - "description": "A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*." + "description": "A Lucene query using project metadata tags used to filter which projects are returned in the response, such as _alias:_origin or _alias:*pr*." } } } diff --git a/specification/project/tags/TagsRequest.ts b/specification/project/tags/TagsRequest.ts index 8c9b3f2bd2..0a9f833e3f 100644 --- a/specification/project/tags/TagsRequest.ts +++ b/specification/project/tags/TagsRequest.ts @@ -38,7 +38,7 @@ export interface Request extends RequestBase { ] query_parameters: { /** - * A Lucene query using project metadata tags to limit which projects to search, such as _alias:_origin or _alias:*pr*. + * A Lucene query using project metadata tags used to filter which projects are returned in the response, such as _alias:_origin or _alias:*pr*. * @availability serverless stability=experimental visibility=public */ project_routing?: string