check-in-connector-sync-job-api.asciidoc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. [[check-in-connector-sync-job-api]]
  2. === Check in connector sync job API
  3. ++++
  4. <titleabbrev>Check in connector sync job</titleabbrev>
  5. ++++
  6. preview::[]
  7. Checks in a connector sync job (updates `last_seen` to the current time).
  8. To get started with Connector APIs, check out the {enterprise-search-ref}/connectors-tutorial-api.html[tutorial^].
  9. [[check-in-connector-sync-job-api-request]]
  10. ==== {api-request-title}
  11. `PUT _connector/_sync_job/<connector_sync_job_id>/_check_in/`
  12. [[check-in-connector-sync-job-api-prereqs]]
  13. ==== {api-prereq-title}
  14. * To sync data using self-managed connectors, you need to deploy the {enterprise-search-ref}/build-connector.html[Elastic connector service] on your own infrastructure. This service runs automatically on Elastic Cloud for native connectors.
  15. * The `connector_sync_job_id` parameter should reference an existing connector sync job.
  16. [[check-in-connector-sync-job-api-desc]]
  17. ==== {api-description-title}
  18. Checks in a connector sync job and sets `last_seen` to the time right before updating it in the internal index.
  19. [[check-in-connector-sync-job-path-params]]
  20. ==== {api-path-parms-title}
  21. `<connector_sync_job_id>`::
  22. (Required, string)
  23. [[check-in-connector-sync-job-api-response-codes]]
  24. ==== {api-response-codes-title}
  25. `200`::
  26. Connector sync job was successfully checked in.
  27. `404`::
  28. No connector sync job matching `connector_sync_job_id` could be found.
  29. [[check-in-connector-sync-job-api-example]]
  30. ==== {api-examples-title}
  31. The following example checks in the connector sync job `my-connector-sync-job`:
  32. [source,console]
  33. ----
  34. PUT _connector/_sync_job/my-connector-sync-job/_check_in
  35. ----
  36. // TEST[skip:there's no way to clean up after creating a connector sync job, as we don't know the id ahead of time. Therefore, skip this test.]