New Relic API: NerdGraph, metrics and alerts with AI agents
New Relic is an observability platform, and NerdGraph is its main GraphQL API for querying data with NRQL and managing alerts, dashboards and entities. There are also ingest APIs for metrics, events and logs. Access is through a user API key or an ingest key.
What the New Relic API offers
NerdGraph (GraphQL)
Query and configure almost everything in the account through a single API.
NRQL queries
Run queries over metrics, events, logs and traces.
Alerts
Manage policies, conditions and incidents.
Entities
Query services, hosts and their health.
Dashboards
Create and read dashboards.
Ingest
Send metrics, events and logs through the data APIs.
How to access the New Relic API
- With your company’s credentialsA user API key (User key) for NerdGraph and an ingest key (License key) for sending data.
- Heavy queries consume limits, so the agent uses short time windows.
- Changes to alerts need approval.
- Logs can contain personal data.
Official documentation: docs.newrelic.com/docs/apis
What an iTeam agent does with the New Relic API
Incident with context
When an alert opens, the agent runs NRQL on metrics and logs and posts the diagnosis in Slack.
Engineering question
The team asks for a service's latency and the agent answers with the query it used.
Reliability report
Every week the agent summarizes incidents, SLOs and the least stable services.
Noisy alert
The agent flags conditions that fire too often and proposes a change.
From the credential to the agent at work, with approval
Generate the user key
In New Relic, create a User key for an integration user with a read-only role.
Register the credential in the iTeam vault
The New Relic credential stays in the iTeam vault, out of prompts and spreadsheets. Each agent gets only the actions it needs (run NRQL, read incidents), and anything that writes data goes through approval.
Test with human approval
Before release, run a simple NRQL query. In the first weeks, write actions stay under approval and everything is in the audit trail.
Ready-made AI teams for this work
Questions about the New Relic API
Is the New Relic API free?
The APIs are available on all plans. New Relic's cost is based on ingested data and users.
Do I need to write code to use the New Relic API with iTeam?
Not necessarily. iTeam's HTTP tool learns the endpoints of the New Relic API from its documentation, and the deployment team sets up credentials, permissions and the process. Your team validates the result.
Does New Relic have an MCP server?
Yes, New Relic offers an MCP server. iTeam can use MCP or NerdGraph, depending on the level of control you want.