Create connector sync job API
editCreate connector sync job API
editThis 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.
Creates a connector sync job.
To get started with Connector APIs, check out the tutorial.
resp = client.perform_request( "POST", "/_connector/_sync_job", headers={"Content-Type": "application/json"}, body={ "id": "connector-id", "job_type": "full", "trigger_method": "on_demand" }, ) print(resp)
response = client.connector.sync_job_post( body: { id: 'connector-id', job_type: 'full', trigger_method: 'on_demand' } ) puts response
const response = await client.transport.request({ method: "POST", path: "/_connector/_sync_job", body: { id: "connector-id", job_type: "full", trigger_method: "on_demand", }, }); console.log(response);
POST _connector/_sync_job { "id": "connector-id", "job_type": "full", "trigger_method": "on_demand" }
Request
editPOST _connector/_sync_job
Prerequisites
edit- 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 native connectors.
-
The
id
parameter should reference an existing connector.
Description
editCreates 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
edit-
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
edit-
id
- (string) The ID associated with the connector sync job document.
Response codes
edit-
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.