Update the connector last sync stats
Technical preview
Update the fields related to the last sync of a connector. This action is used for analytics and monitoring.
Path parameters
-
connector_id
string Required The unique identifier of the connector to be updated
Body
Required
last_access_control_sync_scheduled_at
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
Values are
canceling
,canceled
,completed
,error
,in_progress
,pending
, orsuspended
. -
last_deleted_document_count
number last_incremental_sync_scheduled_at
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
last_indexed_document_count
number last_seen
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
last_sync_error
string last_sync_scheduled_at
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
last_sync_status
string Values are
canceling
,canceled
,completed
,error
,in_progress
,pending
, orsuspended
. last_synced
string | number A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
-
sync_cursor
object
curl \
--request PUT 'http://api.example.com/_connector/{connector_id}/_last_sync' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"last_access_control_sync_error\": \"Houston, we have a problem!\",\n \"last_access_control_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n \"last_access_control_sync_status\": \"pending\",\n \"last_deleted_document_count\": 42,\n \"last_incremental_sync_scheduled_at\": \"2023-11-09T15:13:08.231Z\",\n \"last_indexed_document_count\": 42,\n \"last_sync_error\": \"Houston, we have a problem!\",\n \"last_sync_scheduled_at\": \"2024-11-09T15:13:08.231Z\",\n \"last_sync_status\": \"completed\",\n \"last_synced\": \"2024-11-09T15:13:08.231Z\"\n}"'
{
"last_access_control_sync_error": "Houston, we have a problem!",
"last_access_control_sync_scheduled_at": "2023-11-09T15:13:08.231Z",
"last_access_control_sync_status": "pending",
"last_deleted_document_count": 42,
"last_incremental_sync_scheduled_at": "2023-11-09T15:13:08.231Z",
"last_indexed_document_count": 42,
"last_sync_error": "Houston, we have a problem!",
"last_sync_scheduled_at": "2024-11-09T15:13:08.231Z",
"last_sync_status": "completed",
"last_synced": "2024-11-09T15:13:08.231Z"
}
{
"result": "created"
}