diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index e28d04cea4..d2dac03b1c 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -5511,6 +5511,68 @@ "x-state": "Technical preview" } }, + "/_connector/{connector_id}/_features": { + "put": { + "tags": [ + "connector" + ], + "summary": "Update the connector features", + "description": "Update the connector features in the connector document.\nThis API can be used to control the following aspects of a connector:\n\n* document-level security\n* incremental syncs\n* advanced sync rules\n* basic sync rules\n\nNormally, the running connector service automatically manages these features.\nHowever, you can use this API to override the default behavior.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "operationId": "connector-update-features", + "parameters": [ + { + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "features": { + "$ref": "#/components/schemas/connector._types:ConnectorFeatures" + } + }, + "required": [ + "features" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + }, + "x-state": "Technical preview" + } + }, "/_connector/{connector_id}/_filtering": { "put": { "tags": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index f53b52230b..f897ed46c9 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3748,15 +3748,22 @@ "visibility": "public" } }, - "description": "Updates the connector features in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-features-api.html", + "description": "Update the connector features.\nUpdate the connector features in the connector document.\nThis API can be used to control the following aspects of a connector:\n\n* document-level security\n* incremental syncs\n* advanced sync rules\n* basic sync rules\n\nNormally, the running connector service automatically manages these features.\nHowever, you can use this API to override the default behavior.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "docId": "connector-features", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-features-api.html", "name": "connector.update_features", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.update_features" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "connector.update_features" + }, "responseMediaType": [ "application/json" ], @@ -112813,7 +112820,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L237-L268" + "specLocation": "connector/_types/Connector.ts#L252-L283" }, { "kind": "interface", @@ -113070,6 +113077,7 @@ }, "properties": [ { + "description": "Indicates whether document-level security is enabled.", "name": "document_level_security", "required": false, "type": { @@ -113081,6 +113089,7 @@ } }, { + "description": "Indicates whether incremental syncs are enabled.", "name": "incremental_sync", "required": false, "type": { @@ -113092,6 +113101,7 @@ } }, { + "description": "Indicates whether managed connector API keys are enabled.", "name": "native_connector_api_keys", "required": false, "type": { @@ -113114,7 +113124,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L224-L229" + "specLocation": "connector/_types/Connector.ts#L230-L244" }, { "kind": "enum", @@ -114238,7 +114248,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L231-L235" + "specLocation": "connector/_types/Connector.ts#L246-L250" }, { "kind": "interface", @@ -114409,6 +114419,7 @@ }, "properties": [ { + "description": "Indicates whether advanced sync rules are enabled.", "name": "advanced", "required": false, "type": { @@ -114420,6 +114431,7 @@ } }, { + "description": "Indicates whether basic sync rules are enabled.", "name": "basic", "required": false, "type": { @@ -114431,7 +114443,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L219-L222" + "specLocation": "connector/_types/Connector.ts#L219-L228" }, { "kind": "enum", @@ -116123,6 +116135,79 @@ }, "specLocation": "connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "features", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorFeatures", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Update the connector features.\nUpdate the connector features in the connector document.\nThis API can be used to control the following aspects of a connector:\n\n* document-level security\n* incremental syncs\n* advanced sync rules\n* basic sync rules\n\nNormally, the running connector service automatically manages these features.\nHowever, you can use this API to override the default behavior.\n\nTo sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.\nThis service runs automatically on Elastic Cloud for Elastic managed connectors.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "connector.update_features" + }, + "path": [ + { + "description": "The unique identifier of the connector to be updated.", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/update_features/ConnectorUpdateFeaturesRequest.ts#L23-L55" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "connector.update_features" + }, + "specLocation": "connector/update_features/ConnectorUpdateFeaturesResponse.ts#L22-L26" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index c5f94a1880..b7a001a9c1 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -482,12 +482,6 @@ ], "response": [] }, - "connector.update_features": { - "request": [ - "Missing request & response" - ], - "response": [] - }, "enrich.delete_policy": { "request": [ "Request: missing json spec query parameter 'master_timeout'" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index ed326f6c75..cb7d35a471 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10097,6 +10097,17 @@ export interface ConnectorUpdateErrorResponse { result: Result } +export interface ConnectorUpdateFeaturesRequest extends RequestBase { + connector_id: Id + body?: { + features: ConnectorConnectorFeatures + } +} + +export interface ConnectorUpdateFeaturesResponse { + result: Result +} + export interface ConnectorUpdateFilteringRequest extends RequestBase { connector_id: Id body?: { diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 8629643c84..f6a72b8fd7 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -96,6 +96,7 @@ connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/ connector-sync-job-list,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/list-connector-sync-jobs-api.html connector-checkin,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-api.html connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-api.html +connector-features,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-features-api.html connector-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-api.html connector-last-sync,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-last-sync-api.html connector-list,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/list-connector-api.html diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 59c721dc08..88df329997 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -217,13 +217,28 @@ interface FeatureEnabled { } interface SyncRulesFeature { + /** + * Indicates whether advanced sync rules are enabled. + */ advanced?: FeatureEnabled + /** + * Indicates whether basic sync rules are enabled. + */ basic?: FeatureEnabled } export interface ConnectorFeatures { + /** + * Indicates whether document-level security is enabled. + */ document_level_security?: FeatureEnabled + /** + * Indicates whether incremental syncs are enabled. + */ incremental_sync?: FeatureEnabled + /** + * Indicates whether managed connector API keys are enabled. + */ native_connector_api_keys?: FeatureEnabled sync_rules?: SyncRulesFeature } diff --git a/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts b/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts new file mode 100644 index 0000000000..b9243bd5c8 --- /dev/null +++ b/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts @@ -0,0 +1,55 @@ +/* + * 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 } from '@_types/common' +import { ConnectorFeatures } from '../_types/Connector' + +/** + * Update the connector features. + * Update the connector features in the connector document. + * This API can be used to control the following aspects of a connector: + * + * * document-level security + * * incremental syncs + * * advanced sync rules + * * basic sync rules + * + * Normally, the running connector service automatically manages these features. + * However, you can use this API to override the default behavior. + * + * To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. + * This service runs automatically on Elastic Cloud for Elastic managed connectors. + * @rest_spec_name connector.update_features + * @availability stack stability=experimental visibility=public + * @doc_id connector-features + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated. + */ + connector_id: Id + } + /** + * The connector configuration + */ + body: { + features: ConnectorFeatures + } +} diff --git a/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts b/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts @@ -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 { Result } from '@_types/Result' + +export class Response { + body: { + result: Result + } +}