1
0

delete-connector-api.asciidoc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. [[delete-connector-api]]
  2. === Delete connector API
  3. ++++
  4. <titleabbrev>Delete connector</titleabbrev>
  5. ++++
  6. beta::[]
  7. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-connector[Connector APIs].
  11. --
  12. Removes a connector and associated sync jobs.
  13. This is a destructive action that is not recoverable.
  14. Note: this action doesn't delete any API key, ingest pipeline or data index associated with the connector. These need to be removed manually.
  15. To get started with Connector APIs, check out <<es-connectors-tutorial-api, our tutorial>>.
  16. [[delete-connector-api-request]]
  17. ==== {api-request-title}
  18. `DELETE _connector/<connector_id>`
  19. [[delete-connector-api-prereq]]
  20. ==== {api-prereq-title}
  21. * To sync data using self-managed connectors, you need to deploy the <<es-connectors-deploy-connector-service,Elastic connector service>>. on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
  22. * The `connector_id` parameter should reference an existing connector.
  23. [[delete-connector-api-path-params]]
  24. ==== {api-path-parms-title}
  25. `<connector_id>`::
  26. (Required, string)
  27. `delete_sync_jobs`::
  28. (Optional, boolean) A flag indicating if associated sync jobs should be also removed. Defaults to `false`.
  29. [[delete-connector-api-response-codes]]
  30. ==== {api-response-codes-title}
  31. `400`::
  32. The `connector_id` was not provided.
  33. `404` (Missing resources)::
  34. No connector matching `connector_id` could be found.
  35. [[delete-connector-api-example]]
  36. ==== {api-examples-title}
  37. The following example deletes the connector with ID `my-connector`:
  38. ////
  39. [source, console]
  40. --------------------------------------------------
  41. PUT _connector/my-connector
  42. {
  43. "name": "My Connector",
  44. "service_type": "google_drive"
  45. }
  46. PUT _connector/another-connector
  47. {
  48. "name": "My Connector",
  49. "service_type": "google_drive"
  50. }
  51. --------------------------------------------------
  52. // TESTSETUP
  53. ////
  54. [source,console]
  55. ----
  56. DELETE _connector/another-connector?delete_sync_jobs=true
  57. ----
  58. [source,console-result]
  59. ----
  60. {
  61. "acknowledged": true
  62. }
  63. ----
  64. The following example deletes the connector with ID `another-connector` and its associated sync jobs.