delete-connector-api.asciidoc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. [[delete-connector-api]]
  2. === Delete connector API
  3. ++++
  4. <titleabbrev>Delete connector</titleabbrev>
  5. ++++
  6. beta::[]
  7. Removes a connector and associated sync jobs.
  8. This is a destructive action that is not recoverable.
  9. Note: this action doesn't delete any API key, ingest pipeline or data index associated with the connector. These need to be removed manually.
  10. [[delete-connector-api-request]]
  11. ==== {api-request-title}
  12. `DELETE _connector/<connector_id>`
  13. [[delete-connector-api-prereq]]
  14. ==== {api-prereq-title}
  15. * 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.
  16. * The `connector_id` parameter should reference an existing connector.
  17. [[delete-connector-api-path-params]]
  18. ==== {api-path-parms-title}
  19. `<connector_id>`::
  20. (Required, string)
  21. `delete_sync_jobs`::
  22. (Optional, boolean) A flag indicating if associated sync jobs should be also removed. Defaults to `false`.
  23. [[delete-connector-api-response-codes]]
  24. ==== {api-response-codes-title}
  25. `400`::
  26. The `connector_id` was not provided.
  27. `404` (Missing resources)::
  28. No connector matching `connector_id` could be found.
  29. [[delete-connector-api-example]]
  30. ==== {api-examples-title}
  31. The following example deletes the connector with ID `my-connector`:
  32. ////
  33. [source, console]
  34. --------------------------------------------------
  35. PUT _connector/my-connector
  36. {
  37. "name": "My Connector",
  38. "service_type": "google_drive"
  39. }
  40. PUT _connector/another-connector
  41. {
  42. "name": "My Connector",
  43. "service_type": "google_drive"
  44. }
  45. --------------------------------------------------
  46. // TESTSETUP
  47. ////
  48. [source,console]
  49. ----
  50. DELETE _connector/another-connector?delete_sync_jobs=true
  51. ----
  52. [source,console-result]
  53. ----
  54. {
  55. "acknowledged": true
  56. }
  57. ----
  58. The following example deletes the connector with ID `another-connector` and its associated sync jobs.