Deleting a Destination

You can delete a Destination when you no longer load data into it, or when you are replacing it with a Destination that uses different configuration details.

🚧

Deleting a Destination also deletes every Pipeline that loads data into it, along with the Source of each Pipeline. None of them can be restored.

You may want to delete a Destination in the following scenarios:

  • The database or data warehouse it loads data into is no longer in use.
  • You created it for testing and no longer need it.
  • You are replacing it with a Destination that uses different configuration details.

If you may need the Destination again, consider whether the Pipelines that load data into it can be disabled instead. Disabling a Pipeline stops replication but keeps the Destination and its data in place. Read Disabling a Pipeline for the steps.

You must consider the following before you delete a Destination:

  • If one or more Pipelines load data into the Destination, the request returns a 409 error listing the Pipelines that Hevo deletes along with it. The error names up to ten Pipelines, followed by a count of the remaining ones. To see all of them, call the List All Pipelines endpoint with the destination_id query parameter. To continue, send the confirm_override query parameter set to true. If no Pipeline loads data into the Destination, Hevo deletes it without asking for confirmation. The confirm_override parameter defaults to false, and the 409 counts only the Pipelines in the region of the base URL you call.
  • The tables in your Destination are not deleted. Drop them yourself if you no longer need the data.
  • The response returns the Destination in the DELETING status. Once the request is accepted, the Destination is no longer visible through the API, and retrieving or deleting it again returns a 404 error.

Prerequisites

Deleting the Destination

To delete a Destination, you send its destination_id in the path. You get this value from the List All Destinations endpoint, and send the delete request from the Delete a Destination endpoint. Perform the following steps to delete a Destination:

  1. Select your Hevo account region from the Base URL drop-down.

    Base URL Dropdown
  2. If not already authenticated, enter the following details in the CREDENTIALS section:

    Credentials
    • username: The Access Key that you generated for your Hevo account region.
    • password: The Secret Key that you generated for your Hevo account region.

    Read Generating your API Credentials for the steps to generate them.

  3. Call the List All Destinations endpoint to get the destination_id of the Destination you want to delete.

  4. Navigate to the Delete a Destination endpoint.

  5. In the Path Params section, specify the destination_id. This is the unique identifier of the Destination you want to delete.

    Path Params Destination ID
  6. (Optional) In the Query Params section, you can set confirm_override to true. Do this only if Pipelines load data into the Destination and you want Hevo to delete them, along with their Sources.

    Query Params Confirm Override
  7. The API request is simultaneously generated in the cURL Request block to the right. Click Try It! to make the API request and delete your Destination.

    Try It!
  8. If you get a 409 error, review the Pipelines it lists. To delete the Destination and those Pipelines, set confirm_override to true and send the request again.

Once the deletion is accepted, you will get a response code 202 in the response block with the Destination in the DELETING status.

The following example deletes a Destination along with the Pipelines that load data into it:

curl --request DELETE \
  --url 'https://us.hevodata.com/api/v2/destinations/46?confirm_override=true' \
  --header 'accept: application/json' \
  --user '<ACCESS_KEY>:<SECRET_KEY>'