Create connector sync job API

Create connector sync job API

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

New API reference

For the most up-to-date API details, refer to Connector APIs.

Creates a connector sync job.

To get started with Connector APIs, check out our tutorial.

  1. resp = client.perform_request(
  2. "POST",
  3. "/_connector/_sync_job",
  4. headers={"Content-Type": "application/json"},
  5. body={
  6. "id": "connector-id",
  7. "job_type": "full",
  8. "trigger_method": "on_demand"
  9. },
  10. )
  11. print(resp)
  1. response = client.connector.sync_job_post(
  2. body: {
  3. id: 'connector-id',
  4. job_type: 'full',
  5. trigger_method: 'on_demand'
  6. }
  7. )
  8. puts response
  1. const response = await client.transport.request({
  2. method: "POST",
  3. path: "/_connector/_sync_job",
  4. body: {
  5. id: "connector-id",
  6. job_type: "full",
  7. trigger_method: "on_demand",
  8. },
  9. });
  10. console.log(response);
  1. POST _connector/_sync_job
  2. {
  3. "id": "connector-id",
  4. "job_type": "full",
  5. "trigger_method": "on_demand"
  6. }

Request

POST _connector/_sync_job

Prerequisites

  • 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.
  • The id parameter should reference an existing connector.

Description

Creates a connector sync job document in the internal index and initializes its counters and timestamps with default values. Certain values can be updated via the API.

Request body

id

(Required, string) The id of the connector to create the sync job for.

job_type

(Optional, string) The job type of the created sync job. Defaults to full.

trigger_method

(Optional, string) The trigger method of the created sync job. Defaults to on_demand.

Response body

id

(string) The ID associated with the connector sync job document.

Response codes

201

Indicates that the connector sync job was created successfully.

400

Indicates that the request was malformed.

404

Indicates that either the index or the referenced connector is missing.