Update connector configuration API
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
Updates a connector’s configuration, allowing for config value updates within a registered configuration schema.
To get started with Connector APIs, check out our tutorial.
Request
PUT _connector/<connector_id>/_configuration
Prerequisites
- 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.
- The
connector_idparameter should reference an existing connector. - To update configuration
values, the connectorconfigurationschema must be first registered by a running instance of Elastic connector service. - Make sure configuration fields are compatible with the configuration schema for the third-party data source. Refer to the individual connector references for details.
Path parameters
-
<connector_id> - (Required, string)
Request body
-
values - (Optional, object) Configuration values for the connector, represented as a mapping of configuration fields to their respective values within a registered schema.
-
configuration - (Optional, object) The configuration schema definition for the connector. The configuration field is a map where each key represents a specific configuration field name, and the value is a
ConnectorConfigurationobject. For connector management usevaluesto pass config values. Theconfigurationobject is used by the Elastic connector service to register the connector configuration schema.
Response codes
-
200 - Connector configuration was successfully updated.
-
400 - The
connector_idwas not provided or the request payload was malformed. -
404(Missing resources) - No connector matching
connector_idcould be found.
Examples
The following example configures a sharepoint_online connector. Find the supported configuration options in the Sharepoint Online connector documentation, or by inspecting the schema in the connector’s configuration field using the Get connector.
resp = client.connector.update_configuration(
connector_id="my-spo-connector",
values={
"tenant_id": "my-tenant-id",
"tenant_name": "my-sharepoint-site",
"client_id": "foo",
"secret_value": "bar",
"site_collections": "*"
},
)
print(resp) const response = await client.connector.updateConfiguration({
connector_id: "my-spo-connector",
values: {
tenant_id: "my-tenant-id",
tenant_name: "my-sharepoint-site",
client_id: "foo",
secret_value: "bar",
site_collections: "*",
},
});
console.log(response); PUT _connector/my-spo-connector/_configuration
{
"values": {
"tenant_id": "my-tenant-id",
"tenant_name": "my-sharepoint-site",
"client_id": "foo",
"secret_value": "bar",
"site_collections": "*"
}
} {
"result": "updated"
} When you’re first setting up your connector you’ll need to provide all required configuration details to start running syncs. But you can also use this API to only update a subset of fields. Here’s an example that only updates the secret_value field for a sharepoint_online connector. The other configuration values won’t change.
resp = client.connector.update_configuration(
connector_id="my-spo-connector",
values={
"secret_value": "foo-bar"
},
)
print(resp) const response = await client.connector.updateConfiguration({
connector_id: "my-spo-connector",
values: {
secret_value: "foo-bar",
},
});
console.log(response); PUT _connector/my-spo-connector/_configuration
{
"values": {
"secret_value": "foo-bar"
}
} {
"result": "updated"
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-configuration-api.html