Claim a connector sync job
Technical preview
This action updates the job status to in_progress and sets the last_seen and started_at timestamps to the current time.
Additionally, it can set the sync_cursor property for the sync job.
This API is not intended for direct connector management by users. It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch.
To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
PUT
/_connector/_sync_job/{connector_sync_job_id}/_claim
Console
PUT _connector/_sync_job/my-connector-sync-job-id/_claim
{
"worker_hostname": "some-machine"
}
resp = client.connector.sync_job_claim(
connector_sync_job_id="my-connector-sync-job-id",
worker_hostname="some-machine",
)
const response = await client.connector.syncJobClaim({
connector_sync_job_id: "my-connector-sync-job-id",
worker_hostname: "some-machine",
});
response = client.connector.sync_job_claim(
connector_sync_job_id: "my-connector-sync-job-id",
body: {
"worker_hostname": "some-machine"
}
)
$resp = $client->connector()->syncJobClaim([
"connector_sync_job_id" => "my-connector-sync-job-id",
"body" => [
"worker_hostname" => "some-machine",
],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"worker_hostname":"some-machine"}' "$ELASTICSEARCH_URL/_connector/_sync_job/my-connector-sync-job-id/_claim"
Request example
An example body for a `PUT _connector/_sync_job/my-connector-sync-job-id/_claim` request.
{
"worker_hostname": "some-machine"
}