Stats include: deleted_document_count, indexed_document_count, indexed_document_volume, and total_document_count.
You can also update last_seen.
This API is mainly used by the connector service for updating sync job information.
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.
Body
Required
-
The number of documents the sync job deleted.
-
The number of documents the sync job indexed.
-
The total size of the data (in MiB) the sync job indexed.
-
The timestamp to use in the
last_seenproperty for the connector sync job.External documentation -
The connector-specific metadata.
-
The total number of documents in the target index after the sync job finished.
curl \
--request PUT 'http://api.example.com/_connector/_sync_job/{connector_sync_job_id}/_stats' \
--header "Content-Type: application/json" \
--data '"{\n \"deleted_document_count\": 10,\n \"indexed_document_count\": 20,\n \"indexed_document_volume\": 1000,\n \"total_document_count\": 2000,\n \"last_seen\": \"2023-01-02T10:00:00Z\"\n}"'
{
"deleted_document_count": 10,
"indexed_document_count": 20,
"indexed_document_volume": 1000,
"total_document_count": 2000,
"last_seen": "2023-01-02T10:00:00Z"
}