mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
74 lines
2.1 KiB
Text
74 lines
2.1 KiB
Text
[[create-connector-sync-job-api]]
|
|
=== Create connector sync job API
|
|
++++
|
|
<titleabbrev>Create connector sync job</titleabbrev>
|
|
++++
|
|
|
|
beta::[]
|
|
|
|
|
|
Creates a connector sync job.
|
|
|
|
To get started with Connector APIs, check out the {enterprise-search-ref}/connectors-tutorial-api.html[tutorial^].
|
|
|
|
[source, console]
|
|
--------------------------------------------------
|
|
POST _connector/_sync_job
|
|
{
|
|
"id": "connector-id",
|
|
"job_type": "full",
|
|
"trigger_method": "on_demand"
|
|
}
|
|
--------------------------------------------------
|
|
// TEST[skip:there's no way to clean up after this code snippet, as we don't know the id ahead of time]
|
|
|
|
|
|
[[create-connector-sync-job-api-request]]
|
|
==== {api-request-title}
|
|
`POST _connector/_sync_job`
|
|
|
|
|
|
[[create-connector-sync-job-api-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
* To sync data using self-managed connectors, you need to deploy the {enterprise-search-ref}/build-connector.html[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.
|
|
|
|
[[create-connector-sync-job-api-desc]]
|
|
==== {api-description-title}
|
|
|
|
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.
|
|
|
|
[role="child_attributes"]
|
|
[[create-connector-sync-job-api-request-body]]
|
|
==== {api-request-body-title}
|
|
|
|
`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`.
|
|
|
|
|
|
[role="child_attributes"]
|
|
[[create-connector-sync-job-api-response-body]]
|
|
==== {api-response-body-title}
|
|
|
|
`id`::
|
|
(string) The ID associated with the connector sync job document.
|
|
|
|
[[create-connector-sync-job-api-response-codes]]
|
|
==== {api-response-codes-title}
|
|
|
|
`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.
|