New Relic offers a variety of APIs and SDKs you can use to:
- Retrieve data from New Relic products
- Insert data into those products
- Adjust settings
For developer-focused content on how to use and customize New Relic, see developer.newrelic.com.
APIs by product
New Relic products are often used together, and sometimes they overlap in functionality. This is why multiple APIs may be relevant to each product. Some API functionality will depend on your product subscription level.
To learn more about different API key types, see Understand New Relic API keys.
Use the REST API for New Relic Alerts and the API Explorer to:
- Create and manage policies, conditions, and notification channels.
- Create alert conditions based on Insights NRQL queries.
- Create alert conditions based on data from other New Relic products.
API resources for New Relic APM include:
Resource Details REST API
REST API features include:
Every New Relic APM language agent has an API that lets you customize the agent's default behavior, including reporting custom data. Agent APIs include:
Insights Query API To query APM data, use the Insights Query API. Account management APIs For APIs related to accounts and subscription usage, see the account-related APIs.
New Relic Browser API resources include:
Resource Details Browser agent API
Use the New Relic Browser agent API for tasks such as:
With the REST API you can:
Insights query API To retrieve Browser data from Insights, use the Insights query API. Account management APIs For APIs related to accounts and subscription usage, see the account-related APIs.
New Relic Infrastructure API resources include:
Resource Details Insights query API To retrieve Infrastructure data from Insights, use the Insights 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, use the Integrations SDK. GraphQL API You can use the New Relic GraphQL API to query your cloud integration data and make changes to cloud integration settings.
Use New Relic Insights to create custom queries and charts for your data, including data from your other New Relic products. API resources include:
Resource Details Insert events API To report custom data to Insights, use the Insights event insertion API. Query API To query your Insights data using NRQL-formatted queries, use the Insights query API. This API can also be used to retrieve subscription usage data. Dashboard API To create, read, update, and delete Insights dashboards, use the Insights dashboard API. Other New Relic product APIs You can also report custom data from other New Relic products to Insights. For more information, see the API sections for other products. GraphQL API You can use the New Relic GraphQL Explorer to query data using NRQL.
New Relic Mobile API resources include:
Resource Details Mobile agent APIs
New Relic Mobile APIs let you custom instrument your own code and send events to New Relic Insights. See the platform-specific documentation:
Use the REST API for such tasks as:
Insights query API To retrieve Mobile data from Insights, use the Insights query API. Account management APIs For account-related APIs, see Account APIs.
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 New Relic Plugins. This allows you to send your own metric data to New Relic Plugins and view data received from the API in the New Relic Plugins user interface.
New Relic Synthetics API resources include:
Resource Details Synthetics REST API
The Synthetics REST API functionality includes:
Insights query API To retrieve Synthetics event data from Insights, use the Insights query API. Alerts API To create and manage alert conditions that target Synthetics monitors, use the New Relic Alerts API.
Use the New Relic GraphQL API to query different types of data in the same place. While typical REST APIs require loading from multiple URLs, GraphQL calls get all the data you need in a single request. GraphQL also makes it easier to evolve APIs over time and enables powerful developer tools. New Relic provides you with a powerful GraphiQL tool to explore the API with embedded schema definitions at api.newrelic.com/graphiql
You can view our GraphQL tutorials for sample queries and mutations.
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 product API. For more information about New Relic's security measures, see our security and privacy documentation, or visit the New Relic security website.
REST API features include:
You can use the Insights 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.
To retrieve information about your New Relic partner account, sub-accounts, and users, use the New Relic Partner API.
See APIs in action
For more on how you as a developer can optimize your ability to solve problems using New Relic, see developer.newrelic.com.