• Log in

NerdGraph tutorial: applied intelligence destinations

In addition to managing your applied intelligence destinations in the UI, you can use our NerdGraph API.

Tip

For help getting started with NerdGraph, see Introduction to NerdGraph.

List and filter destinations

The destinations query allows you to paginate through all of your destinations per account. It also allows some filtering functionality.

Create a destination

In order to create a destination, different inputs must be supplied for each destination type. An optional two_way_integration property is available for integrations that allow two-way integration.

Update a destination

When you update a destination, note that you don't need to supply all of the attributes on the destination. For example, you only need to supply the name if you only intend to update the name:

mutation {
  aiNotificationsUpdateDestination(accountId: YOUR_ACCOUNT_ID, destinationId: YOUR_destination_ID, destination: {
    name: "Updated destination Name"
  }) {
    destination {
      id
      name
    }
  }
}

Testing a destination

You can test destinations via the NerdGraph API. This can be done before or after creating the destination.

mutation {
  aiNotificationsTestDestination(accountId: YOUR_ACCOUNT_ID, destination: {
    type: EMAIL,
    name: "Destination Name",
    properties: [
      {
        key: "email",
        value: YOUR_EMAIL
      }
    ]
  }) {
    error {
      details
    }
    details
    result
  }
}
mutation {
  aiNotificationsTestDestinationById(accountId: YOUR_ACCOUNT_ID, destinationId: YOUR_DESTINATION_ID) {
    error {
      details
    }
    details
    result
  }
}

Delete a destination

You can delete destinations via the NerdGraph API.

mutation {
  aiNotificationsDeleteDestination(accountId: YOUR_ACCOUNT_ID, destinationId: YOUR_DESTINATION_ID) {
    ids
    error {
      details
    }
  }
}
Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.