check-in-connector-api.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. [[check-in-connector-api]]
  2. === Check in connector API
  3. ++++
  4. <titleabbrev>Check in a connector</titleabbrev>
  5. ++++
  6. preview::[]
  7. Updates the `last_seen` field of a connector with current timestamp.
  8. [[check-in-connector-api-request]]
  9. ==== {api-request-title}
  10. `PUT _connector/<connector_id>/_check_in`
  11. [[check-in-connector-api-prereq]]
  12. ==== {api-prereq-title}
  13. * 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.
  14. * The `connector_id` parameter should reference an existing connector.
  15. [[check-in-connector-api-path-params]]
  16. ==== {api-path-parms-title}
  17. `<connector_id>`::
  18. (Required, string)
  19. [[check-in-connector-api-response-codes]]
  20. ==== {api-response-codes-title}
  21. `200`::
  22. Connector `last_seen` field was successfully updated with a current timestamp.
  23. `400`::
  24. The `connector_id` was not provided.
  25. `404` (Missing resources)::
  26. No connector matching `connector_id` could be found.
  27. [[check-in-connector-api-example]]
  28. ==== {api-examples-title}
  29. The following example updates the `last_seen` property with current timestamp for the connector with ID `my-connector`:
  30. ////
  31. [source, console]
  32. --------------------------------------------------
  33. PUT _connector/my-connector
  34. {
  35. "index_name": "search-google-drive",
  36. "name": "My Connector",
  37. "service_type": "google_drive"
  38. }
  39. --------------------------------------------------
  40. // TESTSETUP
  41. [source,console]
  42. --------------------------------------------------
  43. DELETE _connector/my-connector
  44. --------------------------------------------------
  45. // TEARDOWN
  46. ////
  47. [source,console]
  48. ----
  49. PUT _connector/my-connector/_check_in
  50. ----
  51. [source,console-result]
  52. ----
  53. {
  54. "result": "updated"
  55. }
  56. ----