mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
86 lines
1.9 KiB
Text
86 lines
1.9 KiB
Text
[[update-connector-error-api]]
|
|
=== Update connector error API
|
|
|
|
preview::[]
|
|
|
|
++++
|
|
<titleabbrev>Update connector error</titleabbrev>
|
|
++++
|
|
|
|
Updates the `error` field of a connector.
|
|
|
|
[[update-connector-error-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`PUT _connector/<connector_id>/_error`
|
|
|
|
[[update-connector-error-api-prereq]]
|
|
==== {api-prereq-title}
|
|
|
|
* To sync data using connectors, it's essential to have the Elastic connectors service running.
|
|
* The `connector_id` parameter should reference an existing connector.
|
|
|
|
[[update-connector-error-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<connector_id>`::
|
|
(Required, string)
|
|
|
|
[role="child_attributes"]
|
|
[[update-connector-error-api-request-body]]
|
|
==== {api-request-body-title}
|
|
|
|
`error`::
|
|
(Required, string) A messaged related to the last error encountered by the connector.
|
|
|
|
|
|
[[update-connector-error-api-response-codes]]
|
|
==== {api-response-codes-title}
|
|
|
|
`200`::
|
|
Connector `error` field was successfully updated.
|
|
|
|
`400`::
|
|
The `connector_id` was not provided or the request payload was malformed.
|
|
|
|
`404` (Missing resources)::
|
|
No connector matching `connector_id` could be found.
|
|
|
|
[[update-connector-error-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following example updates the `error` field for the connector with ID `my-connector`:
|
|
|
|
////
|
|
[source, console]
|
|
--------------------------------------------------
|
|
PUT _connector/my-connector
|
|
{
|
|
"index_name": "search-google-drive",
|
|
"name": "My Connector",
|
|
"service_type": "google_drive"
|
|
}
|
|
--------------------------------------------------
|
|
// TESTSETUP
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE _connector/my-connector
|
|
--------------------------------------------------
|
|
// TEARDOWN
|
|
////
|
|
|
|
[source,console]
|
|
----
|
|
PUT _connector/my-connector/_error
|
|
{
|
|
"error": "Houston, we have a problem!"
|
|
}
|
|
----
|
|
|
|
[source,console-result]
|
|
----
|
|
{
|
|
"result": "updated"
|
|
}
|
|
----
|