Introduction to New Relic APIs

New Relic offers a variety of APIs and SDKs you can use to:

  • Retrieve data from New Relic.
  • Send data to New Relic.
  • Adjust settings.

This section of the docs provides examples and reference documentation for our API endpoints. For developer-focused content on how to use and customize New Relic, see developer.newrelic.com.

NerdGraph (GraphQL)

NerdGraph is New Relic's GraphQL API, an efficient and flexible query language that lets you request exactly the data you need, without over-fetching or under-fetching. While typical REST APIs require loading from multiple URLs, NerdGraph calls get all the data you need in a single request. NerdGraph also makes it easier to evolve APIs over time and enables powerful developer tools.

New Relic provides a powerful GraphQL tool to explore the API with embedded schema definitions. To get started, go to api.newrelic.com/graphiql.

For sample queries and mutations, use our NerdGraph tutorials.

REST APIs by capability

New Relic capabilities, like APM, infrastructure monitoring, or alerts, are often used together, and sometimes they overlap in functionality. This is why multiple APIs may be relevant to each area. Some API functionality will depend on your access to features and data.

To learn more about different API key types, see Understand New Relic API keys.

Alerts

Use the REST API for alerts and the API Explorer to:

  • Create and manage policies, conditions, and notification channels.
  • Create alert conditions based on NRQL queries.
  • Create alert conditions based on data from other New Relic capabilities.
APM

API resources for application monitoring include:

Resource Details
REST API

REST API features include:

Agent APIs

Every APM language agent has an API that lets you customize the agent's default behavior, including reporting custom data. APM agent APIs include:

Query API To query APM data, use the Query API.
Account management APIs For APIs related to accounts and subscription usage, see the account-related APIs.
Browser monitoring

The Browser API resources include:

Resource Details
Browser agent API

Use the Browser agent API for tasks such as:

REST API

With the REST API you can:

Query API To retrieve browser monitoring data, use the Query API.
Account management APIs For APIs related to accounts and subscription usage, see the account-related APIs.
Infrastructure monitoring

The Infrastructure API resources include:

Resource Details
Query API To retrieve infrastructure data, use the Query API. This API can also be used to retrieve subscription usage data.
Infrastructure alert API To manage your infrastructure alerts, use the Infrastructure alert API.
Integrations SDK To make your own custom integrations for reporting data to infrastructure monitoring, use the Integrations SDK.
NerdGraph You can use NerdGraph (our GraphQL API) to query your cloud integration data and make changes to cloud integration settings.
Mobile monitoring

Mobile API resources include:

Resource Details
Mobile agent APIs

Mobile APIs let you custom instrument your own code and send events to New Relic. See the platform-specific documentation:

REST API

Use the REST API for such tasks as:

Query API To retrieve Mobile data from New Relic, use the Query API.
Account management APIs For account-related APIs, see Account APIs.
Synthetic monitoring

Synthetics API resources include:

Resource Details
Synthetics REST API

The Synthetics REST API functionality includes:

Query API To retrieve synthetics event data, use the Query API.
Alerts API To create and manage alert conditions that target synthetics monitors, use the Alerts API.

Telemetry APIs for core data types

We offer several APIs that allow you to get our core data types (metrics, logs, traces, and events) into New Relic without the use of an installed agent.

Data type Description
Trace API Send distributed tracing data to New Relic.
Event API Send event data to New Relic.
Metric API Send metrics to New Relic from any source (including other telemetry monitoring services).
Log API Send your log data to New Relic.

Account management, admin, and usage APIs

Like any other New Relic product or service, you want to be confident that your APIs protect you and your customers' data privacy. The following are API resources related to New Relic account administration and usage.

For more information about API capabilities, see the specific New Relic API. For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website.

Resource Details
REST API

REST API features include:

Subscription usage

You can use the Query API to retrieve subscription usage data. This can be helpful to see how usage compares to your current subscription level, or for doing departmental chargebacks.

If you implemented the REST API for querying subscription usage data prior to July 10, 2018, those usage-related REST APIs are now deprecated. You should use the Query API, which requires creating an API key. For more on switching to the new API format, see the transition guide.

Partner API

To retrieve information about your New Relic partner account, sub-accounts, and users, use the Partner API.

Other APIs

Insights

API resources for Insights include:

Resource Details
Insert events API To report custom data use the Event insertion API.
Query API To query your Insights data using NRQL-formatted queries, use the Query API. This API can also be used to retrieve subscription usage data.
Dashboard API To create, read, update, and delete dashboards, use the Dashboard API.
Other New Relic product APIs You can also report custom data from other New Relic features. For more information, see the API sections for other products.
NerdGraph You can use NerdGraph (our GraphQL API) to query data with NRQL.
Plugins

Use the REST API for New Relic plugins and the API Explorer to:

  • Get a list of plugins, including their names, IDs, and GUIDs.
  • List one or more plugin components, their output, and their metric timeslice data.

Developers and New Relic partners can also use New Relic's Plugin API to write an agent in any language that can work directly with the API for plugins. This allows you to send your own metric data to our plugins and view data received from the API in New Relic.

See APIs in action

For more on how you as a developer can optimize your ability to solve problems using New Relic, go to developer.newrelic.com.

For more help

If you need more help, check out these support and learning resources: