check-in-connector-api.asciidoc 1.9 KB

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