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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-connector[Connector APIs].
  11. --
  12. Checks in a connector sync job (updates `last_seen` to the current time).
  13. To get started with Connector APIs, check out <<es-connectors-tutorial-api, our tutorial>>.
  14. [[check-in-connector-sync-job-api-request]]
  15. ==== {api-request-title}
  16. `PUT _connector/_sync_job/<connector_sync_job_id>/_check_in/`
  17. [[check-in-connector-sync-job-api-prereqs]]
  18. ==== {api-prereq-title}
  19. * To sync data using self-managed connectors, you need to deploy the <<es-connectors-deploy-connector-service,Elastic connector service>>. on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
  20. * The `connector_sync_job_id` parameter should reference an existing connector sync job.
  21. [[check-in-connector-sync-job-api-desc]]
  22. ==== {api-description-title}
  23. Checks in a connector sync job and sets `last_seen` to the time right before updating it in the internal index.
  24. [[check-in-connector-sync-job-path-params]]
  25. ==== {api-path-parms-title}
  26. `<connector_sync_job_id>`::
  27. (Required, string)
  28. [[check-in-connector-sync-job-api-response-codes]]
  29. ==== {api-response-codes-title}
  30. `200`::
  31. Connector sync job was successfully checked in.
  32. `404`::
  33. No connector sync job matching `connector_sync_job_id` could be found.
  34. [[check-in-connector-sync-job-api-example]]
  35. ==== {api-examples-title}
  36. The following example checks in the connector sync job `my-connector-sync-job`:
  37. [source,console]
  38. ----
  39. PUT _connector/_sync_job/my-connector-sync-job/_check_in
  40. ----
  41. // 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.]