Update connector scheduling 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 the scheduling configuration of a connector.
To get started with Connector APIs, check out our tutorial.
Request
PUT _connector/<connector_id>/_scheduling
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.
Path parameters
-
<connector_id> - (Required, string)
Request body
-
scheduling - (Required, object) The scheduling configuration for the connector. This configuration determines frequency of synchronization operations for the connector.
The scheduling configuration includes the following attributes, each represented as a ScheduleConfig object. If the scheduling object does not include all schedule types, only those provided will be updated; the others will remain unchanged.
-
access_control(Optional,ScheduleConfigobject) Defines the schedule for synchronizing access control settings of the connector. -
full(Optional,ScheduleConfigobject) Defines the schedule for a full content syncs. -
incremental(Optional,ScheduleConfigobject) Defines the schedule for incremental content syncs.
Each ScheduleConfig object includes the following sub-attributes:
-
enabled(Required, boolean) A flag that enables or disables the scheduling. -
interval(Required, string) A CRON expression representing the sync schedule. This expression defines the grequency at which the sync operations should occur. It must be provided in a valid CRON format.
Response codes
-
200 - Connector
schedulingfield 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 updates the scheduling property for the connector with ID my-connector:
resp = client.connector.update_scheduling(
connector_id="my-connector",
scheduling={
"access_control": {
"enabled": True,
"interval": "0 10 0 * * ?"
},
"full": {
"enabled": True,
"interval": "0 20 0 * * ?"
},
"incremental": {
"enabled": False,
"interval": "0 30 0 * * ?"
}
},
)
print(resp) response = client.connector.update_scheduling(
connector_id: 'my-connector',
body: {
scheduling: {
access_control: {
enabled: true,
interval: '0 10 0 * * ?'
},
full: {
enabled: true,
interval: '0 20 0 * * ?'
},
incremental: {
enabled: false,
interval: '0 30 0 * * ?'
}
}
}
)
puts response const response = await client.connector.updateScheduling({
connector_id: "my-connector",
scheduling: {
access_control: {
enabled: true,
interval: "0 10 0 * * ?",
},
full: {
enabled: true,
interval: "0 20 0 * * ?",
},
incremental: {
enabled: false,
interval: "0 30 0 * * ?",
},
},
});
console.log(response); PUT _connector/my-connector/_scheduling
{
"scheduling": {
"access_control": {
"enabled": true,
"interval": "0 10 0 * * ?"
},
"full": {
"enabled": true,
"interval": "0 20 0 * * ?"
},
"incremental": {
"enabled": false,
"interval": "0 30 0 * * ?"
}
}
} {
"result": "updated"
} The following example updates full sync schedule only, other schedule types remain unchanged:
resp = client.connector.update_scheduling(
connector_id="my-connector",
scheduling={
"full": {
"enabled": True,
"interval": "0 10 0 * * ?"
}
},
)
print(resp) const response = await client.connector.updateScheduling({
connector_id: "my-connector",
scheduling: {
full: {
enabled: true,
interval: "0 10 0 * * ?",
},
},
});
console.log(response); PUT _connector/my-connector/_scheduling
{
"scheduling": {
"full": {
"enabled": true,
"interval": "0 10 0 * * ?"
}
}
} {
"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-scheduling-api.html