mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
60 lines
1.8 KiB
Text
60 lines
1.8 KiB
Text
[[set-connector-sync-job-error-api]]
|
|
=== Set connector sync job error API
|
|
++++
|
|
<titleabbrev>Set connector sync job error</titleabbrev>
|
|
++++
|
|
|
|
preview::[]
|
|
|
|
Sets a connector sync job error.
|
|
|
|
[[set-connector-sync-job-error-api-request]]
|
|
==== {api-request-title}
|
|
`PUT _connector/_sync_job/<connector_sync_job_id>/_error`
|
|
|
|
[[set-connector-sync-job-error-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 `connector_sync_job_id` parameter should reference an existing connector sync job.
|
|
|
|
[[set-connector-sync-job-error-api-desc]]
|
|
==== {api-description-title}
|
|
|
|
Sets the `error` field for the specified connector sync job and sets its `status` to `error`.
|
|
|
|
[[set-connector-sync-job-error-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<connector_sync_job_id>`::
|
|
(Required, string)
|
|
|
|
[role="child_attributes"]
|
|
[[set-connector-sync-job-error-api-request-body]]
|
|
==== {api-request-body-title}
|
|
|
|
`error`::
|
|
(Required, string) The error to set the connector sync job `error` field to.
|
|
|
|
[[set-connector-sync-job-api-response-codes]]
|
|
==== {api-response-codes-title}
|
|
|
|
`200`::
|
|
Indicates that the connector sync job error was set successfully.
|
|
|
|
`404`::
|
|
No connector sync job matching `connector_sync_job_id` could be found.
|
|
|
|
[[set-connector-sync-job-error-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following example sets the error `some-error` in the connector sync job `my-connector-sync-job`:
|
|
|
|
[source,console]
|
|
----
|
|
PUT _connector/_sync_job/my-connector-sync-job/_error
|
|
{
|
|
"error": "some-error"
|
|
}
|
|
----
|
|
// TEST[skip:there's no way to clean up after creating a connector sync job, as we don't know the id ahead of time. Therefore, skip this test.]
|