Skip to content

Commit ae6af7a

Browse files
REST API Keys - WIP
WIP. Please do not merge.
1 parent 92a7359 commit ae6af7a

File tree

8 files changed

+14
-62
lines changed

8 files changed

+14
-62
lines changed

src/content/docs/alerts/scale-automate/rest-api/rest-api-calls-alerts.mdx

+7-7
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ For infrastructure alerting, see [REST API for infrastructure monitoring alerts]
9494
</td>
9595

9696
<td>
97-
In general, any [role](/docs/accounts-partnerships/accounts/account-setup/users-roles) can use a <InlinePopover type="userKey"/> or [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key) with <DNT>**GET > List**</DNT> functions to <DNT>**view**</DNT> alerts data. The account Owner and Admins may use their API key.
97+
In general, any [role](/docs/accounts-partnerships/accounts/account-setup/users-roles) can use a <InlinePopover type="userKey"/> with <DNT>**GET > List**</DNT> functions to <DNT>**view**</DNT> alerts data. The account Owner and Admins may use their API key.
9898

9999
List output will be [paginated](/docs/apis/rest-api-v2/requirements/pagination-api-output). Available functions include:
100100

@@ -470,7 +470,7 @@ These API functions include links to the API Explorer, where you can create, upd
470470
id="conditions-list"
471471
title="List existing conditions for policies"
472472
>
473-
To view a list of existing conditions for your policy, use your [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key) or [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key), and the associated [`policy_id`](#policies-list) in the API call.
473+
To view a list of existing conditions for your policy, use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key), and the associated [`policy_id`](#policies-list) in the API call.
474474

475475
<DNT>
476476
**[API Explorer](https://api.newrelic.com/docs/#/Alerts%20Conditions/get_alerts_conditions_json) > Alerts Conditions > GET > List**
@@ -616,7 +616,7 @@ These API functions include links to the API Explorer, where you can create, upd
616616
id="list-nrql-conditions"
617617
title="List existing NRQL conditions for policies"
618618
>
619-
To view a list of existing conditions for your alert policy, use your user key or [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key), and the associated [`policy_id`](#policies-list) in the API call.
619+
To view a list of existing conditions for your alert policy, use your user key and the associated [`policy_id`](#policies-list) in the API call.
620620

621621
<DNT>
622622
**[API Explorer]https://api.newrelic.com/docs/#/Alerts%20NRQL%20Conditions/get_alerts_nrql_conditions_json) > Alerts NRQL Conditions > GET > List**
@@ -753,7 +753,7 @@ These API functions include links to the API Explorer, where you can create, upd
753753
id="ext-conditions-list"
754754
title="External services: List existing conditions for policies"
755755
>
756-
To view a list of existing conditions for policies with external service apps (APM or mobile monitoring), use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) or [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key) and the associated [`policy_id`](#policies-list) in the API call.
756+
To view a list of existing conditions for policies with external service apps (APM or mobile monitoring), use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) and the associated [`policy_id`](#policies-list) in the API call.
757757

758758
<DNT>
759759
**[API Explorer](https://api.newrelic.com/docs/#/Alerts%20External%20Service%20Conditions/get_alerts_external_service_conditions_json) > Alerts External Service Conditions > GET > List**
@@ -880,7 +880,7 @@ These API functions include links to the API Explorer, where you can create, upd
880880
id="synthetics-conditions-list"
881881
title="Synthetic monitoring: List existing conditions for policies"
882882
>
883-
To view a list of existing policy conditions for synthetic monitoring, use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) or [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key), and the associated [`policy_id`](#policies-list) in the API call.
883+
To view a list of existing policy conditions for synthetic monitoring, use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) and the associated [`policy_id`](#policies-list) in the API call.
884884

885885
<DNT>
886886
**[API Explorer](https://api.newrelic.com/docs/#/Alerts%20Synthetics%20Conditions/get_alerts_synthetics_conditions_json) > Alerts Synthetics Conditions > GET > List**
@@ -1004,7 +1004,7 @@ These API functions include links to the API Explorer, where you can create, upd
10041004
id="multilocation-synthetics-conditions-list"
10051005
title="Multi-location synthetics: List existing conditions for policies"
10061006
>
1007-
To view a list of existing policy conditions for multi-location synthetic monitoring, use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) or [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key), and the associated [`policy_id`](#policies-list) in the API call.
1007+
To view a list of existing policy conditions for multi-location synthetic monitoring, use your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) and the associated [`policy_id`](#policies-list) in the API call.
10081008

10091009
<DNT>
10101010
**[API Explorer](https://api.newrelic.com/docs/#/Deprecation%20Notice%20-%20Alerts%20Location%20Failure%20Conditions/get_alerts_location_failure_conditions_policies__policy_id__json) > Alerts Location Failure Conditions > GET > List**
@@ -1032,7 +1032,7 @@ These API functions include links to the API Explorer, where you can list, add a
10321032
>
10331033
To view the [conditions](/docs/alerts/new-relic-alerts-beta/getting-started/alerts-glossary#alert-condition) an [entity](/docs/alerts/new-relic-alerts-beta/getting-started/alerts-glossary#alert-entity) that apply to an entity in APM, browser, mobile, or key transactions, include these values in the API call:
10341034

1035-
* Your [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key) or [REST API key](/docs/apis/rest-api-v2/requirements/rest-api-key)
1035+
* Your [user key.](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key)
10361036
* The `entity_id` This is the specific [entity (alert target)](/docs/alerts/new-relic-alerts-beta/getting-started/alerts-glossary#alert-entity) to be monitored.
10371037
* The `entity_type`, which must be one of the following:
10381038

src/content/docs/apis/intro-apis/new-relic-api-keys.mdx

-39
Original file line numberDiff line numberDiff line change
@@ -411,29 +411,6 @@ We also have several older or less common API key type. To rotate these keys:
411411
/>
412412
</Collapser>
413413

414-
<Collapser
415-
id="rotate-rest-api-key"
416-
title="Rotate REST API key"
417-
>
418-
This is an older key that's deprecated but still supported by New Relic. We now recommend using the user key instead of the REST API key.
419-
420-
You can't rotate this key, but you can delete it.
421-
422-
1. Log in to New Relic on an account with admin permissions.
423-
424-
2. Go to [<DNT>**one.newrelic.com/api-keys**</DNT>](https://one.newrelic.com/api-keys) (or [<DNT>**one.eu.newrelic.com/api-keys**</DNT>](https://one.eu.newrelic.com/api-keys) for our EU data center).
425-
426-
3. On the right side of the page, find the <DNT>**Looking for other keys?**</DNT> section and click <DNT>**REST API key**</DNT>.
427-
428-
<img
429-
title="Screenshot of links to legacy REST API keys"
430-
alt="Screenshot of links to legacy REST API keys"
431-
src="/images/apis-and-data_screenshot-crop_locate-rest-key.webp"
432-
/>
433-
434-
4. Click <DNT>**Delete REST API Key**</DNT>.
435-
</Collapser>
436-
437414
<Collapser
438415
id="rotate-pixie-api-key"
439416
title="Rotate Pixie API keys"
@@ -547,22 +524,6 @@ Besides the main API keys explained above, we have several other, older API keys
547524

548525
All migrated admin keys will have a note that says <DNT>**Migrated from an admin user key**</DNT> in the key table.
549526
</Collapser>
550-
551-
<Collapser
552-
id="rest-api-key"
553-
title="REST API key (not recommended)"
554-
>
555-
The REST API key is an older key for using our [REST API](/docs/apis/rest-api-v2/get-started/introduction-new-relic-rest-api-v2). We now recommend using the user key instead of the REST API key. The user is user-specific as opposed to account-specific, which gives your organization more control over your team members' access. Also, we recommend using our newer API, [NerdGraph](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph), instead of the REST API.
556-
557-
Things to consider:
558-
559-
* Each New Relic account can have only <DNT>**one**</DNT> REST API key.
560-
* We recommend using a user key instead of the REST API key.
561-
* We recommend using [NerdGraph](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph) over the REST API, if possible.
562-
* Requires admin-level user permissions. If you don't have access to the REST API key or the REST API explorer, it might be due to lack of permissions. Talk to your New Relic account manager, or use a user key instead.
563-
564-
To find and manage REST API keys: From the [user menu](/docs/accounts/accounts-billing/general-account-settings/intro-account-settings), click <DNT>**API keys**</DNT> (get [a direct link to the API keys page](https://one.newrelic.com/launcher/api-keys-ui.api-keys-launcher)). Then click <DNT>**REST API key**</DNT>. Before you configure or delete an API key, ensure you are doing so for the correct account.
565-
</Collapser>
566527
</CollapserGroup>
567528
</Collapser>
568529
</CollapserGroup>

src/content/docs/apis/rest-api-v2/api-explorer-v2/use-api-explorer.mdx

+2-7
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,11 @@ New Relic's REST API Explorer (v2) makes it easy to test and send requests for a
2121

2222
## API key requirements [#api-key]
2323

24-
Before you can use the [API Explorer](https://rpm.newrelic.com/api/explore), API access must be activated and an [API key](/docs/apis/rest-api-v2/requirements/rest-api-key) must be generated for your account.
25-
26-
<Callout variant="important">
27-
We recommend using the <InlinePopover type="userKey"/>, not the [REST API key](/docs/apis/intro-apis/new-relic-api-keys/#rest-api-key), because the user key has fewer restrictions.
28-
</Callout>
24+
Before you can use the [API Explorer](https://rpm.newrelic.com/api/explore), API access must be activated and an [User API key](/docs/apis/rest-api-v2/requirements/rest-api-key) must be generated for your account.
2925

3026
Tips:
3127

32-
* If you're signed in to New Relic, when you use the API Explorer you can choose your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key) at the top of the UI and that key will appear automatically in the <DNT>**Request**</DNT> and <DNT>**Parameters**</DNT> sections of the Explorer.
33-
* If you're not signed in to New Relic, you can paste your [API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key) into the API Explorer's <DNT>**Parameters**</DNT>.
28+
* When you use the API Explorer you can insert your [User API key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key) at the top of the UI and that key will appear automatically in the <DNT>**Request**</DNT> and <DNT>**Parameters**</DNT> sections of the Explorer.
3429

3530
## Use the API Explorer [#use-api-explorer]
3631

src/content/docs/apis/rest-api-v2/get-started/introduction-new-relic-rest-api-v2.mdx

+1-5
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ api.eu.newrelic.com/v2/applications/$APP_ID/metrics/data.json
6464

6565
## API key `$API_KEY` [#api_key]
6666

67-
New Relic API calls require an API key. This may be one of several API keys:
68-
69-
* A [user key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key): This is recommended. It's our latest key implementation and has fewer limitations than a REST API key. The user key is also used for our [NerdGraph API](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph).
70-
* A [REST API key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#rest-api-key): This is our older key implementation. For more information about it, see [REST API key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#rest-api-key). If you use this key, the required header is `X-Api-Key` and not `Api-Key`.
71-
* If you have a New Relic partnership account, you'll use a different key: see [Partnership authentication](/docs/apis/rest-api-v2/get-started/admin-users-api-key-partnerships).
67+
New Relic API requires a [user API key](/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key): The user key is also used for our [NerdGraph API](/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph).
7268

7369
In our REST API examples, we borrow the API key placeholder `$API_KEY` from Unix shell programming. Be sure to replace that and other user-specific variables when forming calls.
7470

src/content/docs/apis/synthetics-rest-api/monitor-examples/manage-synthetics-monitors-rest-api.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ These are the [monitor types](/docs/synthetics/new-relic-synthetics/using-monito
9494

9595
## Use the API [#use-api]
9696

97-
To use the [synthetic monitoring REST API](/docs/apis/synthetics-rest-api), you must have the ability to manage synthetics monitors and use a [user key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key) (the REST API key won't work).
97+
To use the [synthetic monitoring REST API](/docs/apis/synthetics-rest-api), you must have the ability to manage synthetics monitors and use a [user key](/docs/apis/rest-api-v2/getting-started/introduction-new-relic-rest-api-v2#api_key).
9898

9999
This API can be used for all synthetic monitors. (Additional API methods for [scripted browser and API test monitors](#scripted-api-monitors-api) are also available to update the script associated with those monitors.) All synthetic monitoring data is available via the API. API examples show curl commands.
100100

src/content/docs/apm/agents/ruby-agent/features/record-deployments-ruby-agent.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ You can customize some deployment information by using Capistrano variables. If
175175
</td>
176176

177177
<td>
178-
The New Relic <InlinePopover type="licenseKey"/> to use. By default this comes from the definition in the `newrelic.yml` file for the given `rails_env`. This is **not** the same as your [REST API key](/docs/apis/getting-started/intro-apis/access-rest-api-keys).
178+
The New Relic <InlinePopover type="licenseKey"/> to use. By default this comes from the definition in the `newrelic.yml` file for the given `rails_env`. This is **not** the same as your [API key](/docs/apis/getting-started/intro-apis/access-rest-api-keys).
179179
</td>
180180
</tr>
181181

src/content/docs/serverless-function-monitoring/aws-lambda-monitoring/troubleshooting/troubleshoot-enabling-serverless-monitoring-aws-lambda.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ There are two common problems related to not completing all of the [enablement p
2424

2525
Besides these basic enablement problems, there are some additional problems that may cause an issue:
2626

27-
* CloudWatch error "HTTP error 401: unauthorized." This is due to an incorrect API Key. The `--nr-api-key`argument in the [Configure AWS enable step](/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/enable-new-relic-monitoring-aws-lambda#connect-aws) takes your <InlinePopover type="userKey"/>, which is different from the REST API key.
27+
* CloudWatch error "HTTP error 401: unauthorized." This is due to an incorrect API Key. The `--nr-api-key`argument in the [Configure AWS enable step](/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/enable-new-relic-monitoring-aws-lambda#connect-aws) takes your <InlinePopover type="userKey"/>.
2828
* Custom metrics are missing. Lambda monitoring is not compatible with our [custom metrics](/docs/agents/manage-apm-agents/agent-data/collect-custom-metrics). Use [custom attributes](/docs/agents/manage-apm-agents/agent-data/collect-custom-attributes) to add metadata.
2929
* Invocations missing. To see invocation breakdown details, distributed tracing must be enabled as part of the [Lambda instrumentation step](/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/enable-new-relic-monitoring-aws-lambda#instrument-lambda). Distributed tracing is required so that span details can be displayed in the invocation details pane.
3030
* You've completed the installation, integration, and instrumentation steps correctly, and your function is sending logs to CloudWatch but you're not seeing traces for specific dependencies (or any traces) in the UI. This may result from the order of layer merging (if you're using our Lambda layers) or from the order of import (if you're instrumenting manually):

src/content/docs/synthetics/new-relic-synthetics/synthetics-api/synthetics-rest-api-version-1.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To use the REST API for New Relic's synthetic monitoring, you must [activate API
1818

1919
## Managing simple and scripted monitors [#simple-monitor-calls]
2020

21-
You must use your Admin User's API key to make synthetics REST API calls. The account's REST API key will not work.
21+
You must use your Admin User's API key to make synthetics REST API calls.
2222

2323
<Callout variant="caution">
2424
The synthetics REST API limits an account's rate of requests to three requests per second. Requests made in excess of this threshold will return a 429 response code.

0 commit comments

Comments
 (0)