delete-destination

Description

Permanently deletes a destination from Detect. This operation cannot be undone. Ensure the destination is not referenced by any active triggers or campaigns before deletion.

Syntax

Windows:

CliTool.bat delete-destination -id <destination-id>

Linux:

./CliTool.sh delete-destination -id <destination-id>

Parameters

Parameter Required Type Description
-id Yes integer ID of the destination to delete. Must be a positive integer.

Example Execution

Windows:

CliTool.bat delete-destination -id 42

Linux:

./CliTool.sh delete-destination -id 42

Sample Output

Success:

Destination deleted successfully with ID: 42

Error:

Error deleting destination: Destination with ID 999 not found

Use Cases

  1. Clean Up Test Destinations
    # Delete test destination after testing
       ./CliTool.sh delete-destination -id 100
  1. Remove Deprecated Destinations
    # Script to delete multiple destinations
       for id in 50 51 52 53; do
           ./CliTool.sh delete-destination -id $id
       done

Important Warnings

Before Deleting:

  1. Verify destination is not used by active triggers/campaigns
  2. Check if destination is referenced in pipelines
  3. Consider disabling instead of deleting (future enhancement)
  4. Back up destination configuration if you might need to recreate it

Referential Integrity:

  • If triggers reference this destination, deletion may fail with constraint violation
  • Check destination usage before deleting
  • Deletion is permanent and cannot be undone

Exit Codes

  • 0 " Success (destination deleted)
  • 1 " Error (destination not found, referential constraint, connection error)