Set the connector sync job stats Technical preview

PUT /_connector/_sync_job/{connector_sync_job_id}/_stats

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.

Path parameters

application/json

Body Required

  • deleted_document_count number Required

    The number of documents the sync job deleted.

  • indexed_document_count number Required

    The number of documents the sync job indexed.

  • The total size of the data (in MiB) the sync job indexed.

  • A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

  • metadata object
    Hide metadata attribute Show metadata attribute object
    • * object Additional properties

      Additional properties are allowed.

  • The total number of documents in the target index after the sync job finished.

Responses

  • 200 application/json

    Additional properties are allowed.

PUT /_connector/_sync_job/{connector_sync_job_id}/_stats
curl \
 -X PUT http://api.example.com/_connector/_sync_job/{connector_sync_job_id}/_stats \
 -H "Content-Type: application/json" \
 -d '{"deleted_document_count":42.0,"indexed_document_count":42.0,"indexed_document_volume":42.0,"last_seen":"string","metadata":{"additionalProperty1":{},"additionalProperty2":{}},"total_document_count":42.0}'
Request examples
{
  "deleted_document_count": 42.0,
  "indexed_document_count": 42.0,
  "indexed_document_volume": 42.0,
  "last_seen": "string",
  "metadata": {
    "additionalProperty1": {},
    "additionalProperty2": {}
  },
  "total_document_count": 42.0
}
Response examples (200)
{}