Parts of the API Explorer

To help you get the most out of using New Relic's API Explorer, here is a summary of the user interface. The letters with the descriptions correspond to the image.

Parts of the New Relic API Explorer
rpm.newrelic.com/api/explore: New Relic's API Explorer includes a user interface where you can explore values, select the type of API (applications, hosts, etc.), use standard commands (GET, PUT, POST, DELETE), view the parameter requirements and responses, and test your own use of the API endpoint.

The API menu bar provides additional information about the Synthetics, Plugin, Partner, and Insights APIs.

Account name and API key

If you have multiple accounts associated with your login account, and you are an Admin on the account, the accounts will appear in this dropdown list in the API Explorer's menu bar. Select your choice from the list.

To use the REST API Explorer, there must be an active API key for that account or sub-account. API keys are unique to an account. There is no inheritance feature for sub-accounts.

Functions

From the list of resources, select a resource name to expand or collapse the menu of available functions. Select any of the endpoints (GET List, GET Show, etc.) for the corresponding type of API call (New Relic applications, hosts, key transactions, plugins, etc.). The selected function appears shaded on the left menu, and the UI shows the selected path as well as detailed information to make the API call. For example:

API Explorer functions Notes
GET List To view a list of all names and their IDs for the selected type of API call (applications, hosts, etc.), leave the id empty.
GET Show To show the data for a specific app, host, etc., include its id.
GET Metric Names (list) To view a list of available metric names, include its id and leave the name empty.
GET Metric Names (description) To view a description of a specific metric name, include its id and name.
GET Metric Data (data) To view specific metric details for the selected type of API call (such as Applications), include its id, name, and value.
PUT Update

To change existing values for the selected type of API call (such as Applications), include its id and the values to be changed. To start over, select Reset.

DELETE To delete an app or host, make sure it is not reporting any data ("health_status": "gray",).

Description

The API Explorer shows the path for the function you selected (for example, Applications > List) and a description of the API call.

Request

As you type the Parameters values, they automatically appear in the Request window.

Parameters

The API Explorer automatically lists the parameters for the selected API call and additional information, such as the type of filter and location. The UI also shows which parameters are required.

The values you type here automatically appear in the interactive Request window. You can also copy parameter values from a different page in the API Explorer and paste them into the current page. For example, use GET List to find an app ID, copy the value, and paste it into the app's GET Metric Names id.

If a parameter consists of multiple fields and includes a diamond icon-api-diamond icon, use any of these options:

  • To go backward or forward across the fields, select the left or right points.
  • To change the field's value up (increment) or down (decrement), select the top or bottom points.
  • To select today for time parameters, select the square inside the diamond icon.

API key

In order to use any functions, an API key is required. If you are signed in to New Relic, and select an account and key from the Account name and API key dropdown, the API key value for your account fills automatically.

Page

Select the data page you want to view.

Format

Select an available option for your request; for example, JSON or XML.

Potential response statuses

If you make any errors with your request, the API Explorer shows the possible status codes and their explanation to help you troubleshoot your API call.

Response structure

This color-coded area shows the structure of your API call, including the parameter values and their format.

Send request

To send your API call, select Send Request. If you see error responses, make any necessary changes and select again.

For more help

Recommendations for learning more: