From 2c4c2a34d83d3eb8a95fe0aed9640731e9a7e523 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 1 Dec 2025 12:15:11 +0400 Subject: [PATCH 1/4] Add transform.get_node_stats API --- specification/_doc_ids/table.csv | 1 + .../GetTransformStatsRequest.ts | 40 +++++++++++++++++++ .../GetTransformStatsResponse.ts | 25 ++++++++++++ .../transform/get_node_stats/types.ts | 40 +++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 specification/transform/get_node_stats/GetTransformStatsRequest.ts create mode 100644 specification/transform/get_node_stats/GetTransformStatsResponse.ts create mode 100644 specification/transform/get_node_stats/types.ts diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index d87a5afe09..8e381e5f71 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -264,6 +264,7 @@ get-features-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/ope get-global-checkpoints,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-apis.html, get-license,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-license.html, get-ml-info,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-ml-info.html, +get-node-stats,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats,, get-pipeline-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-pipeline-api.html, get-repositories-metering-api,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-repositories-metering-api.html, get-synonym-rule,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-synonym-rule.html, diff --git a/specification/transform/get_node_stats/GetTransformStatsRequest.ts b/specification/transform/get_node_stats/GetTransformStatsRequest.ts new file mode 100644 index 0000000000..17b48eb36f --- /dev/null +++ b/specification/transform/get_node_stats/GetTransformStatsRequest.ts @@ -0,0 +1,40 @@ +/* + * 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' + +/** + * Get transform stats. + * + * Get usage information for transforms. + * @rest_spec_name transform.get_node_stats + * @availability stack since=8.15.0 stability=stable + * @availability serverless stability=stable visibility=public + * @cluster_privileges monitor_transform + * @index_privileges read, view_index_metadata + * @doc_id get-node-stats + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_transform/_node_stats' + methods: ['GET'] + } + ] +} diff --git a/specification/transform/get_node_stats/GetTransformStatsResponse.ts b/specification/transform/get_node_stats/GetTransformStatsResponse.ts new file mode 100644 index 0000000000..8749b2139e --- /dev/null +++ b/specification/transform/get_node_stats/GetTransformStatsResponse.ts @@ -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 { TransformNodeStats } from './types' + +export class Response { + /** @codegen_name stats */ + body: TransformNodeStats +} diff --git a/specification/transform/get_node_stats/types.ts b/specification/transform/get_node_stats/types.ts new file mode 100644 index 0000000000..17d5e9deba --- /dev/null +++ b/specification/transform/get_node_stats/types.ts @@ -0,0 +1,40 @@ +/* + * 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 { NodeId } from '@_types/common' +import { integer } from '@_types/Numeric' +import { AdditionalProperties } from '@spec_utils/behaviors' + +/** + * @behavior_meta AdditionalProperties fieldname=nodes description="Per node statistics" + */ +export class TransformNodeStats + implements AdditionalProperties +{ + total: Scheduler +} + +export interface Scheduler { + scheduler: TransformNodeStatsDetails +} + +export interface TransformNodeStatsDetails { + registered_transform_count: integer + peek_transform?: string +} From 3c2cdf58de38bd3903d3580a50e541fe37cd92ff Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 1 Dec 2025 12:17:33 +0400 Subject: [PATCH 2/4] Fix description --- .../transform/get_node_stats/GetTransformStatsRequest.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/transform/get_node_stats/GetTransformStatsRequest.ts b/specification/transform/get_node_stats/GetTransformStatsRequest.ts index 17b48eb36f..a39b62c3b8 100644 --- a/specification/transform/get_node_stats/GetTransformStatsRequest.ts +++ b/specification/transform/get_node_stats/GetTransformStatsRequest.ts @@ -20,9 +20,9 @@ import { RequestBase } from '@_types/Base' /** - * Get transform stats. + * Get node stats. * - * Get usage information for transforms. + * Get per-node information about transform usage. * @rest_spec_name transform.get_node_stats * @availability stack since=8.15.0 stability=stable * @availability serverless stability=stable visibility=public From 656e1dc4de7bd16860bd23c0682dc4a2660290a5 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 1 Dec 2025 14:38:14 +0400 Subject: [PATCH 3/4] Fix file names --- .../{GetTransformStatsRequest.ts => GetNodeStatsRequest.ts} | 0 .../{GetTransformStatsResponse.ts => GetNodeStatsResponse.ts} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename specification/transform/get_node_stats/{GetTransformStatsRequest.ts => GetNodeStatsRequest.ts} (100%) rename specification/transform/get_node_stats/{GetTransformStatsResponse.ts => GetNodeStatsResponse.ts} (100%) diff --git a/specification/transform/get_node_stats/GetTransformStatsRequest.ts b/specification/transform/get_node_stats/GetNodeStatsRequest.ts similarity index 100% rename from specification/transform/get_node_stats/GetTransformStatsRequest.ts rename to specification/transform/get_node_stats/GetNodeStatsRequest.ts diff --git a/specification/transform/get_node_stats/GetTransformStatsResponse.ts b/specification/transform/get_node_stats/GetNodeStatsResponse.ts similarity index 100% rename from specification/transform/get_node_stats/GetTransformStatsResponse.ts rename to specification/transform/get_node_stats/GetNodeStatsResponse.ts From f2030438043c1fbd5e789c608358bde7d1dac3ea Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Mon, 1 Dec 2025 15:11:34 +0400 Subject: [PATCH 4/4] Remove privileges for now --- specification/transform/get_node_stats/GetNodeStatsRequest.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/transform/get_node_stats/GetNodeStatsRequest.ts b/specification/transform/get_node_stats/GetNodeStatsRequest.ts index a39b62c3b8..a9d95ad8e3 100644 --- a/specification/transform/get_node_stats/GetNodeStatsRequest.ts +++ b/specification/transform/get_node_stats/GetNodeStatsRequest.ts @@ -26,8 +26,6 @@ import { RequestBase } from '@_types/Base' * @rest_spec_name transform.get_node_stats * @availability stack since=8.15.0 stability=stable * @availability serverless stability=stable visibility=public - * @cluster_privileges monitor_transform - * @index_privileges read, view_index_metadata * @doc_id get-node-stats */ export interface Request extends RequestBase {