Update connector configuration API
editUpdate connector configuration APIedit
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 the tutorial.
Requestedit
PUT _connector/<connector_id>/_configuration
Prerequisitesedit
- 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 native connectors.
-
The
connector_id
parameter should reference an existing connector. -
To update configuration
values
, the connectorconfiguration
schema 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 connectors references for details.
Path parametersedit
-
<connector_id>
- (Required, string)
Request bodyedit
-
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
ConnectorConfiguration
object. For connector management usevalues
to pass config values. Theconfiguration
object is used by the Elastic connector service to register the connector configuration schema.
Response codesedit
-
200
- Connector configuration was successfully updated.
-
400
-
The
connector_id
was not provided or the request payload was malformed. -
404
(Missing resources) -
No connector matching
connector_id
could be found.
Examplesedit
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.
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.
PUT _connector/my-spo-connector/_configuration { "values": { "secret_value": "foo-bar" } }
{ "result": "updated" }