# Source Deleted Trigger

The source deleted trigger is fired when a source is deleted successfully.

Some uses cases for this trigger are:

  • Provide evidence to show auditors that connector logic and sources are not manipulated outside of proper change control processes.
  • Alert admins in the event that a source was wrongfully deleted.

# Getting Started

# Prerequisites

  • An oAuth Client configured with Authority as ORG_ADMIN.

# In This Topic


# Event Context

Source Deleted events occur when a source is successfully deleted via the API or the Admin UI.

Use the following command to view the Source Deleted Trigger details:

curl --request GET --url 'https://{tenant}.api.identitynow.com/beta/triggers' --header 'authorization: Bearer {access_token}'

# Trigger Type

This event trigger type is a FIRE_AND_FORGET type. When you subscribe to this event trigger with your HTTP endpoint, a response is not expected to be returned.

# Input Schema

The input schema defines what you will receive from the trigger service. Here is input example provided by the trigger:

{
    "deleted": "2021-03-29T22:01:50.474Z",
    "connector": "active-directory",
    "name": "Test source",
    "id": "2c933086c166b5ba016167c32ef31a66",
    "type": "DIRECT_CONNECT",
    "actor": {
        "id": "ee769173319b41d19ccec6cea52f237b",
        "name": "john.doe",
        "type": "IDENTITY"
    }
}
  • deleted - The date and time the source was deleted
  • connector - The connector type used to connect to the source
  • name - The user friendly name given to this specific source
  • id - Unique ID assigned to the source
  • type - The connection type
  • actor - The Identity that deleted the source

# Subscribe to the Source Deleted Trigger

To subscribe to the Source Deleted Trigger, make a POST call to /beta/trigger-subscriptions with the following headers and body:

Headers:

  • Authorization: Bearer <access_token>

Body:

{
   "triggerId":"idn:source-deleted",
   "type":"HTTP",
   "httpConfig":{
      "url":"https://urlOfTheExternalService.com",
   }
}

# Testing Tools

  • webhook.site (opens new window) - This tool creates a temporary HTTP endpoint for you to verify that you are able to successfully subscribe to the Event Trigger. You can receive the event after an access request has been submitted. Copy the "unique URL" from webhook.site and use it in the url field of the POST body to /beta/trigger-subscriptions.
  • localhost.run - This tool creates an endpoint for a HTTP server running on your local machine.