update-connector-error-api.asciidoc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [[update-connector-error-api]]
  2. === Update connector error API
  3. ++++
  4. <titleabbrev>Update connector error</titleabbrev>
  5. ++++
  6. preview::[]
  7. Updates the `error` field of a connector.
  8. [[update-connector-error-api-request]]
  9. ==== {api-request-title}
  10. `PUT _connector/<connector_id>/_error`
  11. [[update-connector-error-api-prereq]]
  12. ==== {api-prereq-title}
  13. * To sync data using connectors, it's essential to have the Elastic connectors service running.
  14. * The `connector_id` parameter should reference an existing connector.
  15. [[update-connector-error-api-path-params]]
  16. ==== {api-path-parms-title}
  17. `<connector_id>`::
  18. (Required, string)
  19. [role="child_attributes"]
  20. [[update-connector-error-api-request-body]]
  21. ==== {api-request-body-title}
  22. `error`::
  23. (Required, string) A messaged related to the last error encountered by the connector.
  24. [[update-connector-error-api-response-codes]]
  25. ==== {api-response-codes-title}
  26. `200`::
  27. Connector `error` field was successfully updated.
  28. `400`::
  29. The `connector_id` was not provided or the request payload was malformed.
  30. `404` (Missing resources)::
  31. No connector matching `connector_id` could be found.
  32. [[update-connector-error-api-example]]
  33. ==== {api-examples-title}
  34. The following example updates the `error` field for the connector with ID `my-connector`:
  35. ////
  36. [source, console]
  37. --------------------------------------------------
  38. PUT _connector/my-connector
  39. {
  40. "index_name": "search-google-drive",
  41. "name": "My Connector",
  42. "service_type": "google_drive"
  43. }
  44. --------------------------------------------------
  45. // TESTSETUP
  46. [source,console]
  47. --------------------------------------------------
  48. DELETE _connector/my-connector
  49. --------------------------------------------------
  50. // TEARDOWN
  51. ////
  52. [source,console]
  53. ----
  54. PUT _connector/my-connector/_error
  55. {
  56. "error": "Houston, we have a problem!"
  57. }
  58. ----
  59. [source,console-result]
  60. ----
  61. {
  62. "result": "updated"
  63. }
  64. ----