Access to REST API keys

Owner or Admins

New Relic provides different APIs that require their own type of API keys, based on the product or feature. This document describes functions available for the New Relic REST API and API Explorer, and how to manage access to these API keys.

Decide user's access to API functions

Use the New Relic REST API key or individual Admin user's API keys to manage access to the REST API and API Explorer. Users can use the account REST API key to view data with the API Explorer while Owners and Admins can use an Admin user's API key to view, add, change, or delete data.

API key Permissions
REST API key

Only the account Owner or Admin can generate a REST API key for the account and each sub-account. Then, users in the account or sub-account can use the REST API key to view (but not add, change, or delete) data from the New Relic REST API and API Explorer for:

Admin user's API key

Available only for individuals in the account or selected sub-account whose roles are Owner or Admin. The Admin user's API key grants full permissions to use the New Relic REST API and API Explorer, including GET > List, POST > Create, PUT > Add or Update, and DELETE functions.

In addition, the New Relic account Owner or Admins must use their Admin user's API key to manage Insights dashboards using the API Explorer functions, including CREATE > Post, UPDATE > Put, SHOW > Get, SHOW > List, or DELETE. Other account users cannot view dashboard data from the API Explorer or use the Dashboard API functions.

Get REST API or Admin user's API keys

Owner or Admins

Before you can use New Relic's REST API or the API Explorer, you must have a REST API key for your New Relic account. For master accounts with sub-accounts, each sub-account must use its own REST API key.

Each New Relic account can have one REST API key. In addition, each account Owner or Admin can have one personal Admin user's API key.

Activate REST API key

To activate API access:

  1. From the account dropdown in the New Relic UI, select Account settings > Integrations > API keys.
  2. Select [regenerate icon] Regenerate REST API key.
  3. Select (Show key) to view your account's new REST API key.
  4. Copy your account's REST API key to use with New Relic's REST API.
Activate Admin user's API key

To activate Admin API access:

  1. From the account dropdown in the New Relic UI, select Account settings > Integrations > API keys.
  2. Next to your name, select the regenerate [regenerate icon] icon to generate your Admin user's API key.
  3. Select (Show key) to view your new Admin user's API key.
  4. Copy your Admin user's API key to use with New Relic's REST API.

View REST API or Admin user's API keys

Owner or Admins

To view REST API keys:

  1. From the account dropdown in the New Relic UI, select Account settings > Integrations > API keys.
  2. Select (Show key).

An index of Admin user's API keys appears below the account's REST API key. The list includes the Admin's full name and the date their key was last used.

  • You can view your own Admin user's API key: From the Admin index, select (Show key) for your name.
  • You can only view other Admin's names. The keys for all other Admins are partially obscured.

Change (regenerate) an API key

Owner or Admins

To change an existing REST API key or Admin user's API key, you must delete the existing key and then regenerate a new key.

Regenerate REST API key

To change your account's REST API key:

  1. Select [regenerate icon] Regenerate REST API key.
  2. Confirm the deletion of the previous REST API key by typing DELETION IS FOREVER in the text field.
  3. Select Regenerate.
  4. Copy the new REST API key to use with New Relic's REST API.
Regenerate Admin user's API key

To change an Admin user's API key:

  1. Select the Admin user's [regenerate icon] Regenerate REST API key icon.
  2. Confirm the deletion of the previous Admin user's API key by typing DELETION IS FOREVER in the text field.
  3. Select Regenerate.
  4. Copy the new Admin user's API key to use with New Relic's REST API.

Delete an API key

If you delete an Admin from the New Relic account or change their role from Admin to User or Restricted user, this will also automatically remove their Admin user's API key.

Owner or Admins

To delete a REST API key or an Admin user's API key:

  1. Before you delete an API key, make sure you have the correct account or sub-account.
  2. From the account dropdown in the New Relic UI, select Account settings > Integrations > API keys.
  3. Select the delete [trash can icon] icon for the REST API key or the Admin user's API key.
  4. Confirm the deletion by typing DELETION IS FOREVER in the text field.
  5. Select Delete.

For more help