delete-connector-api.asciidoc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [[delete-connector-api]]
  2. === Delete connector API
  3. ++++
  4. <titleabbrev>Delete connector</titleabbrev>
  5. ++++
  6. preview::[]
  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-connector-api-response-codes]]
  22. ==== {api-response-codes-title}
  23. `400`::
  24. The `connector_id` was not provided.
  25. `404` (Missing resources)::
  26. No connector matching `connector_id` could be found.
  27. [[delete-connector-api-example]]
  28. ==== {api-examples-title}
  29. The following example deletes the connector with ID `my-connector`:
  30. ////
  31. [source, console]
  32. --------------------------------------------------
  33. PUT _connector/my-connector
  34. {
  35. "index_name": "search-google-drive",
  36. "name": "My Connector",
  37. "service_type": "google_drive"
  38. }
  39. --------------------------------------------------
  40. // TESTSETUP
  41. ////
  42. [source,console]
  43. ----
  44. DELETE _connector/my-connector
  45. ----
  46. [source,console-result]
  47. ----
  48. {
  49. "acknowledged": true
  50. }
  51. ----