Deleting triggers

Delete the trigger.

Before you begin

You need an admin access to delete a trigger. If you hold a custom role, verify that you have write access that is assigned to the project where you intend to delete the trigger.

Procedure

  1. In a REST client platform, add the authentication details of the tenant from where you want to delete the trigger.
    
    //In case of Instance API key 
    Headers:
    {
    "x-instance-api-key": "instance_api_key"
    }
     
    // In case of MCSP or ISV token
    Headers:
    {
    "Authorization": "mcsp_or_isv_token"
    }
    
  2. Make a DELETE request at the URL of the project.
    URL Syntax - <domain>/apis/v1/rest/projects/:project/triggers/:trigger_uid

    In this URL request, :project is the name of the project or the project UID from where you want to delete a trigger. The :trigger_uid is the UID of the trigger that you want to delete.

    If the request is successful, you receive the response code for success.
    {
    output: {               
                   "message": "Trigger deleted successfully"           
                }        
    }
    Note: If the trigger is used in any of the workflow versions, then you cannot delete it and the usage of that trigger is shown in the output message.
    {
        "output": {
            "message": "This trigger is used in below workflows. Please remove it from these workflows before deleting.",
            "workflows": [
                {
                    "uid": "<Workflow_UId>",
                    "name": "<Workflow_name>",
                    "activities": [
                        "start"
                    ],
                    "flow_version": [
                        <Workflow_Versions>
                    ]
                }
            ]
        }
    }