<@U04SE163WC8> How to delete a builder connector a...
# ask-ai
d
@kapa.ai How to delete a builder connector after it has been published? Is there any API available to delete the builder connector?
k
To delete a builder connector after it has been published, you can directly interact with the Airbyte database. Here are the steps and a sample SQL query to delete a custom connector: 1. Ensure all related sources/destinations are deleted: Before removing the connector from the database, make sure to delete all sources and destinations related to that connector. 2. Execute the SQL query: You can use the following SQL query to delete the custom connector from the database. This query works with the Airbyte schema as of version 0.50.54.
Copy code
sql WITH c_b_p AS (   DELETE FROM connector_builder_project   WHERE name = '<your connector name here>'   RETURNING id, actor_definition_id ), a_d_m AS (   DELETE FROM active_declarative_manifest t   USING c_b_p   WHERE t.actor_definition_id = c_b_p.actor_definition_id ), a_d AS (   DELETE FROM actor_definition t   USING c_b_p   WHERE t.id = c_b_p.actor_definition_id ) SELECT * FROM c_b_p;
3. API for deleting custom connectors: There is also an API endpoint available to delete custom connectors. You can use the following API endpoint:
Copy code
POST /v1/source_definitions/delete_custom
For more details, you can refer to the [Airbyte API documentation](https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#post-/v1/source_definitions/delete_custom). ### References: - [SQL Query for Deleting Custom Connectors](https://github.com/airbytehq/airbyte/issues/22606) - [API Endpoint for Deleting Custom Connectors](https://discuss.airbyte.io/t/1825) If you need further assistance, feel free to ask!