NerdGraph API: Examples

You can manage your Alerts programmatically by using our GraphQL NerdGraph API. This is a powerful alternative to managing Alerts in the UI or through the Alerts REST API.

Alerts features you can manage with NerdGraph

Here's what you can do with Alerts in NerdGraph:

The easiest way to discover Alerts queries and mutations is through the NerdGraph API explorer.

NerdGraph API explorer

Our NerdGraph API explorer is a GraphiQL editor where you can prototype Alerts queries and mutations. Here are some examples showing how to find fields for queries and mutations.

For general information about NerdGraph, see Introduction to New Relic NerdGraph.

Queries

To explore the various Alerts queries, look for the available queries under the actor.account.alerts namespace in NerdGraph API explorer:

alerts_query.png

Mutations

To explore various mutations, look in the alerts dropdown in the NerdGraph API explorer:

alerts_mutations.png

For more help

Recommendations for learning more: