[[check-in-connector-api]]
=== Check in connector API
++++
<titleabbrev>Check in a connector</titleabbrev>
++++

preview::[]

..New API reference
[sidebar]
--
For the most up-to-date API details, refer to {api-es}/group/endpoint-connector[Connector APIs].
--

Updates the `last_seen` field of a connector with current timestamp.

To get started with Connector APIs, check out <<es-connectors-tutorial-api, our tutorial>>.


[[check-in-connector-api-request]]
==== {api-request-title}

`PUT _connector/<connector_id>/_check_in`

[[check-in-connector-api-prereq]]
==== {api-prereq-title}

* 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.
* The `connector_id` parameter should reference an existing connector.

[[check-in-connector-api-path-params]]
==== {api-path-parms-title}

`<connector_id>`::
(Required, string)


[[check-in-connector-api-response-codes]]
==== {api-response-codes-title}

`200`::
Connector `last_seen` field was successfully updated with a current timestamp.

`400`::
The `connector_id` was not provided.

`404` (Missing resources)::
No connector matching `connector_id` could be found.

[[check-in-connector-api-example]]
==== {api-examples-title}

The following example updates the `last_seen` property with current timestamp for the connector with ID `my-connector`:

////
[source, console]
--------------------------------------------------
PUT _connector/my-connector
{
  "index_name": "search-google-drive",
  "name": "My Connector",
  "service_type": "google_drive"
}
--------------------------------------------------
// TESTSETUP

[source,console]
--------------------------------------------------
DELETE _connector/my-connector
--------------------------------------------------
// TEARDOWN
////

[source,console]
----
PUT _connector/my-connector/_check_in
----

[source,console-result]
----
{
    "result": "updated"
}
----
