1
0

check-in-connector-api.asciidoc 2.0 KB

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