set-connector-sync-job-error-api.asciidoc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. [[set-connector-sync-job-error-api]]
  2. === Set connector sync job error API
  3. ++++
  4. <titleabbrev>Set connector sync job error</titleabbrev>
  5. ++++
  6. Sets a connector sync job error.
  7. [[set-connector-sync-job-error-api-request]]
  8. ==== {api-request-title}
  9. `PUT _connector/_sync_job/<connector_sync_job_id>/_error`
  10. [[set-connector-sync-job-error-api-prereqs]]
  11. ==== {api-prereq-title}
  12. * To sync data using connectors, it's essential to have the Elastic connectors service running.
  13. * The `connector_sync_job_id` parameter should reference an existing connector sync job.
  14. [[set-connector-sync-job-error-api-desc]]
  15. ==== {api-description-title}
  16. Sets the `error` field for the specified connector sync job and sets its `status` to `error`.
  17. [[set-connector-sync-job-error-api-path-params]]
  18. ==== {api-path-parms-title}
  19. `<connector_sync_job_id>`::
  20. (Required, string)
  21. [role="child_attributes"]
  22. [[set-connector-sync-job-error-api-request-body]]
  23. ==== {api-request-body-title}
  24. `error`::
  25. (Required, string) The error to set the connector sync job `error` field to.
  26. [[set-connector-sync-job-api-response-codes]]
  27. ==== {api-response-codes-title}
  28. `200`::
  29. Indicates that the connector sync job error was set successfully.
  30. `404`::
  31. No connector sync job matching `connector_sync_job_id` could be found.
  32. [[set-connector-sync-job-error-api-example]]
  33. ==== {api-examples-title}
  34. The following example sets the error `some-error` in the connector sync job `my-connector-sync-job`:
  35. [source,console]
  36. ----
  37. PUT _connector/_sync_job/my-connector-sync-job/_error
  38. {
  39. "error": "some-error"
  40. }
  41. ----
  42. // 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.]