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.
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
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.