IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Update connector scheduling API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Update connector scheduling API
editThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
Updates the scheduling configuration of a connector.
Request
editPUT _connector/<connector_id>/_scheduling
Prerequisites
edit- To sync data using connectors, it’s essential to have the Elastic connectors service running.
-
The
connector_idparameter should reference an existing connector.
Path parameters
edit-
<connector_id> - (Required, string)
Request body
edit-
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:
-
access_control(Required,ScheduleConfigobject) Defines the schedule for synchronizing access control settings of the connector. -
full(Required,ScheduleConfigobject) Defines the schedule for a full content syncs. -
incremental(Required,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
edit-
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
editThe following example updates the scheduling property for the connector with ID my-connector:
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
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"
}