REST API calls for New Relic Alerts

New Relic's REST API (v2) allows you to configure settings for New Relic Alerts. The API Explorer also includes the cURL request format, available parameters, potential response status codes, and JSON response structure for each of the available API calls.

For New Relic Infrastructure alerting, see REST API for New Relic Infrastructure alerts.

Available data and functions

The amount of data available depends on your subscription level and data retention.

Available functions depend on your role in your New Relic account. Some limitations apply.

REST API functions Comments
View account data

In general, any role can use the account's REST API key with GET > List functions to view New Relic Alerts data. The account Owner and Admins may use their Admin user's API key.

Available functions include:

Maintain account data You must have an Owner or Admin role in your account and an Admin user's API key in order to use any maintenance function, including POST > Create, PUT > Add, PUT > Update, and DELETE.

Conditions excluded from the REST API

These types of conditions do not have available endpoints in the API:

  • APM: Web transaction percentiles, conditions targeting labels, and baselines
  • NRQL: Baselines

Alert policies

These API functions include links to the API Explorer, where you can easily create, delete, or list policies for New Relic Alerts.

Create new policies

Admins or Owner

To add new policies to New Relic Alerts, use your Admin user's API key, and include these two values in the API call:

Required values Definition
Incident incident_preference

Determines how New Relic Alerts will create incidents and group violations. This must be one of the following:

Policy name The policy name is required. Leaving it unchanged will create a policy called string.

API Explorer: Alerts Policies > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_policies.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "policy": {
    "incident_preference": "string",
    "name": "string"
  }
}' 
Update policies

Admins or Owner

Use this API to update an existing policy's name and incident_preference. You will need your Admin user's API key.

Required values Definition
id Required. To find a policy's ID, use either of these options:
  • From the UI: On an alert policy's UI page, the second number in the URL will represent the policy ID. For example, for the URL alerts.newrelic.com/accounts/654321/policies/123456, the policy ID would be 123456.

  • With the API: Use the List policies API.
Incident incident_preference

Determines how New Relic Alerts will create incidents and group violations. Must be one of the following:

Policy name The policy name is required. Leaving it unchanged will create a policy called string. Use the List policies API to find a policy's exact name.

API Explorer: Alerts Policies > PUT > Update

curl -X PUT 'https://api.newrelic.com/v2/alerts_policies/{id}.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "policy": {
    "incident_preference": "string",
    "name": "string"
  }
}' 
Delete existing policies

Admins or Owner

To delete an existing policy from New Relic Alerts, use your Admin user's API key, and include the policy_id (available from API Explorer: Alerts Policies > GET > List) in the API call:

API Explorer: Alerts Policies > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_policies/{policy_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
List existing policies

To view a list of existing New Relic Alerts policies for your account, use your API key, and include these optional values in the API call:

  • Optional policy name filter
  • Optional pagination value

API Explorer: Alerts Policies > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_policies.json' \
     -H 'X-Api-Key:{api_key}' -i 

Notification channels

These API functions include links to the API Explorer, where you can easily create, delete, or list notification channels for your alert policies in New Relic Alerts.

Create new notification channels

Admins or Owner

To add new notification channels to New Relic Alerts, use your Admin user's API key and include these items in the API call:

The API Explorer shows the format for required configuration values for each type of notification channel.

API Explorer: Alerts Channels > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_channels.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "channel": {
    "name": "string",
    "type": "string",
    "configuration": "hash"
  }
}'  

The "hash" place holder in this example must be replaced by one of the following JSON blocks with the appropriate values substituted:

Email channel
{
  "recipients" : "test@google.com",
  "include_json_attachment" : true
}
    
HipChat channel
{
  "auth_token": "abc123",
  "room_id": "google.com"
}
OpsGenie channel
{
  "api_key": "abc123",
  "teams": "team1",
  "tags": "tag1",
  "recipients": "me@me.com"
}
Slack channel
{
  "url": "http://test.com",
  "channel": "channel1"
}
Campfire channel
{
  "subdomain": "mysubdomain",
  "token": "123abc",
  "room": "room1"
}
VictorOps channel
{
  "key": "mykey",
  "route_key": "theroute"
}
PagerDuty channel
{
  "service_key": "myservicekey"
}
Webhook (json) channel
{
  "base_url": "http://test.com",
  "auth_username": "username",
  "auth_password": "password",
  "payload_type": "application/json",
  "payload": {"account_id": 1, "account_name": "account name" },
  "headers": {"header1": "test", "header2": "test"}
}
Webhook (x-www-form-urlencoded) channel
{
  "base_url": "http://test.com",
  "auth_username": "username",
  "auth_password": "password",
  "payload_type": "application/x-www-form-urlencoded",
  "payload": {"account_id": 1, "account_name": "account name" },
  "headers": {"header1": "test", "header2": "test"}
}
Delete existing notification channels

Admins or Owner

To delete an existing notification channel from New Relic Alerts, use your Admin user's API key, and include the channel_id (available from API Explorer: Alerts Channels > GET > List) in the API call:

API Explorer: Alerts Channels > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_channels/{channel_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
List existing notification channels

To view a list of existing New Relic Alerts notification channels for your account, use your REST API key or Admin user's API key and an optional pagination value in the API call.

API Explorer: Alerts Channels > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_channels.json' \
     -H 'X-Api-Key:{api_key}' -i 
Update notification channels associated with policies

Admins or Owner

In New Relic Alerts, you can associate a policy with one or more notification channels. You can also associate a notification channel with one or more alert policies. To update this relationship, use your Admin user's API key and these values in the API call:

  • A policy_id value (available from API Explorer: Alerts Policies > GET > List)
  • One or more channel_id values in an array, separated by commas or a new line (available from API Explorer: Alerts Channels > GET > List)

API Explorer: Alerts Policy Channels > PUT > Update

curl -X PUT 'https://api.newrelic.com/v2/alerts_policy_channels.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d 'policy_id=policy_id&channel_ids[]=channel_id' 
Delete notification channels associated with policies

Admins or Owner

In New Relic Alerts, you can associate a policy with one or more notification channels. You can also associate a notification channel with one or more alert policies. To remove a policy from a channel, or to remove a channel from a policy, use your Admin user's API key and these values in the API call:

  • The policy_id (available from API Explorer: Alerts Policies > GET > List)
  • The channel_id (available from API Explorer: Alerts Channels > GET > List)

API Explorer: Alerts Policy Channels > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_policy_channels.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -d 'channel_id={channel_id}&policy_id={policy_id}'  

Conditions for APM, Browser, Mobile

These API functions include links to the API Explorer, where you can easily create, update, delete, or list conditions for your alert policies in New Relic Alerts. These calls are for conditions with these types of targets:

  • APM: Apps and key transactions
  • Browser: Apps and key transactions
  • Mobile: Mobile apps

Exception: The following APM conditions are not available from this API endpoint:

  • Conditions targeting labels (dynamic targeting)
  • Web transaction percentile conditions
  • Baseline conditions

The API Explorer provides information about other types of conditions using separate endpoints, including external services (APM and Mobile), plugins, and Synthetics monitors. Consider all types of alert conditions when searching or updating.

Create conditions for policies

Admins or Owner

To add conditions to policies in New Relic Alerts, include these items in the API call:

API Explorer: Alerts Conditions > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_conditions/policies/{policy_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "condition": {
    "type": "string",
    "name": "string",
    "enabled": "boolean",
    "entities": [
      "integer"
    ],
    "metric": "string",
    "gc_metric": "string",
    "condition_scope": "string",
    "violation_close_timer": "integer",
    "runbook_url": "string",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ],
    "user_defined": {
      "metric": "string",
      "value_function": "string"
    }
  }
}' 

The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Conditions > GET > List.

Update conditions for policies

Admins or Owner

To update conditions for policies in New Relic Alerts, include these items in the API call:

API Explorer: Alerts Conditions > PUT > Update

curl -X PUT 'https://api.newrelic.com/v2/alerts_conditions/{id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "condition": {
    "type": "string",
    "name": "string",
    "enabled": "boolean",
    "entities": [
      "integer"
    ],
    "metric": "string",
    "metric": "string",
    "gc_metric": "string",
    "condition_scope": "string",
    "violation_close_timer": "integer",
    "runbook_url": "string",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ],
    "user_defined": {
      "metric": "string",
      "value_function": "string"
    }
  }
}'  
Delete conditions from policies

Admins or Owner

To delete conditions from policies in New Relic Alerts, include these items in the API call:

API Explorer: Alerts Conditions > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_conditions/{condition_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
List existing conditions for policies

To view a list of existing conditions for your alert policy in New Relic Alerts, use your REST API key or Admin user's API key and the associated policy_id in the API call.

API Explorer: Alerts Conditions > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_conditions.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -d 'policy_id={policy_id}' 

Conditions for NRQL (Insights)

These API functions include links to the API Explorer, where you can easily create, update, delete, or list conditions for your alert policies in New Relic Alerts. The API calls can be used with NRQL as the target.

Exception: NRQL baseline conditions are not available from this endpoint.

Create NRQL conditions for policies

Admins or Owner

Due to the way NRQL data is aggregated, New Relic recommends setting the nrql[since_value] to 3 or higher to prevent false positives.

API Explorer: Alerts Nrql Conditions > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_nrql_conditions/policies/{policy_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "nrql_condition": {
    "name": "string",
    "runbook_url": "string",
    "enabled": "boolean",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ],
    "value_function": "string",
    "nrql": {
        "query": "string",
        "since_value": "string"
    }
  }
}' 

If you set nrql[since_value] to 3 minutes and nrql[query] to SELECT count FROM myEvent, New Relic Alerts evaluates the following query against the terms[threshold] value once per minute:

SELECT count FROM myEvent SINCE 3 minutes ago UNTIL 2 minutes ago
Update NRQL conditions for policies

Admins or Owner

Due to the way NRQL data is aggregated, New Relic recommends setting the nrql[since_value] to 3 or higher to prevent false positives.

To update conditions for policies in New Relic Alerts, include these items in the API call:

API Explorer: Alerts Nrql Conditions > PUT > Update

curl -X POST 'https://api.newrelic.com/v2/alerts_nrql_conditions/{id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "nrql_condition": {
    "name": "string",
    "runbook_url": "string",
    "enabled": "boolean",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ],
    "value_function": "string",
    "nrql": {
        "query": "string",
        "since_value": "string"
    }
  }
}' 
Delete NRQL conditions for policies

Admins or Owner

To delete conditions from policies in New Relic Alerts, include these items in the API call:

API Explorer: Alerts Nrql Conditions > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_nrql_conditions/{condition_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
List existing NRQL conditions for policies

To view a list of existing conditions for your alert policy in New Relic Alerts, use your REST API key or Admin user's API key and the associated policy_id in the API call.

API Explorer: Alerts Nrql Conditions > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_nrql_conditions.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -d 'policy_id={policy_id}'

Conditions for external services

These API functions include links to the API Explorer, where you can easily create, update, delete, or list conditions for your alert policies in New Relic Alerts. These calls are for conditions for external services. The API calls can be used with APM and Mobile apps as the target.

External services: Create conditions for policies

Admins or Owner

To add conditions for external services to policies in New Relic Alerts that have APM or Mobile targets, include these items in the API call:

API Explorer: Alerts External Service Conditions > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_external_service_conditions/policies/{policy_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "external_service_condition": {
    "type": "string",
    "name": "string",
    "enabled": "boolean",
    "entities": [
      "integer"
    ],
    "external_service_url": "string",
    "metric": "string",
    "runbook_url": "string",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ]
  }
}' 

The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts External Service Conditions > GET > List.

External services: Update conditions for policies

Admins or Owner

To update conditions for external services to policies in New Relic Alerts that have APM or Mobile targets, include these items in the API call:

API Explorer: Alerts External Service Conditions > PUT > Update

curl -X PUT 'https://api.newrelic.com/v2/alerts_external_service_conditions/{id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "external_service_condition": {
    "type": "string",
    "name": "string",
    "enabled": "boolean",
    "entities": [
      "integer"
    ],
    "external_service_url": "string",
    "metric": "string",
    "runbook_url": "string",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ]
  }
}' 
External services: Delete conditions from policies

Admins or Owner

To delete conditions for external services from policies with APM or Mobile targets in New Relic Alerts, include these items in the API call:

API Explorer: Alerts External Service Conditions > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_external_service_conditions/{condition_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
External services: List existing conditions for policies

To view a list of existing conditions for policies with external service targets (APM or Mobile) in New Relic Alerts, use your REST API key or Admin user's API key and the associated policy_id in the API call.

API Explorer: Alerts External Service Conditions > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_external_service_conditions.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -d 'policy_id={policy_id}' 

Conditions for Synthetics

These API functions include links to the API Explorer, where you can easily create, update, delete, or list conditions for your alert policies in New Relic Alerts. The API calls can be used with Synthetics monitors as the target.

Synthetics: Create conditions for policies

Admins or Owner

To add conditions to policies in New Relic Alerts that have Synthetics monitors as targets, include these items in the API call:

API Explorer: Alerts Synthetics Conditions > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_synthetics_conditions/policies/{policy_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "synthetics_condition": {
    "name": "string",
    "monitor_id": "string",
    "runbook_url": "string",
    "enabled": "boolean"
  }
}' 
 

The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Synthetics Conditions > GET > List.

Synthetics: Update conditions for policies

Admins or Owner

To update conditions for policies in New Relic Alerts that have Synthetics monitors as the targets, include these items in the API call:

API Explorer: Alerts Synthetics Conditions > PUT > Update

curl -X PUT 'https://api.newrelic.com/v2/alerts_synthetics_conditions/{id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "synthetics_condition": {
    "name": "string",
    "monitor_id": "string",
    "runbook_url": "string",
    "enabled": "boolean"
  }
}' 
Synthetics: Delete conditions from policies

Admins or Owner

To delete conditions from policies with Synthetics targets in New Relic Alerts, include these items in the API call:

API Explorer: Alerts Synthetics Conditions > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_synthetics_conditions/{condition_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
Synthetics: List existing conditions for policies

To view a list of existing conditions for policies with Synthetics targets in New Relic Alerts, use your REST API key or Admin user's API key and the associated policy_id in the API call.

API Explorer: Alerts Synthetics Conditions > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_synthetics_conditions.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -d 'policy_id=policy_id' 

Conditions for plugins

These API functions include links to the API Explorer, where you can easily create, update, delete, or list conditions for your alert policies in New Relic Alerts. The API calls can be used with plugins from New Relic's Plugin Central as the target.

Plugins: Create conditions for policies

Admins or Owner

To add conditions to policies in New Relic Alerts that have plugin components or instances as targets, include these items in the API call:

API Explorer: Alerts Plugins Conditions > POST > Create

curl -X POST 'https://api.newrelic.com/v2/alerts_plugins_conditions/policies/{policy_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "plugins_condition": {
    "name": "string",
    "enabled": "boolean",
    "entities": [
      "integer"
    ],
    "metric_description": "string",
    "metric": "string",
    "value_function": "string",
    "runbook_url": "string",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ],
    "plugin": {
      "id": "string",
      "guid": "string"
    }
  }
}' 

The JSON response returns a condition id, which you will need to update or delete the condition. You can also view the condition id from API Explorer: Alerts Plugins Conditions > GET > List.

Plugins: Update conditions for policies

Admins or Owner

To update conditions for policies in New Relic Alerts with plugin components or instances as the targets, include these items in the API call:

API Explorer: Alerts Plugins Conditions > PUT > Update

curl -X PUT 'https://api.newrelic.com/v2/alerts_plugins_conditions/{id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "plugins_condition": {
    "name": "string",
    "enabled": "boolean",
    "entities": [
      "integer"
    ],
    "metric_description": "string",
    "metric": "string",
    "value_function": "string",
    "runbook_url": "string",
    "terms": [
      {
        "duration": "string",
        "operator": "string",
        "priority": "string",
        "threshold": "string",
        "time_function": "string"
      }
    ],
    "plugin": {
      "id": "string",
      "guid": "string"
    }
  }
}'  
Plugins: Delete conditions from policies

Admins or Owner

To delete conditions from policies in New Relic Alerts with plugin components or instances as the targets, include these items in the API call:

API Explorer: Alerts Plugins Conditions > DELETE > Delete

curl -X DELETE 'https://api.newrelic.com/v2/alerts_plugins_conditions/{condition_id}.json' \
     -H 'X-Api-Key:{admin_api_key}' -i 
Plugins: List existing conditions for policies

To view a list of existing conditions for policies with plugin components or instances as targets in New Relic Alerts, use your REST API key or Admin user's API key and the associated policy_id in the API call.

API Explorer: Alerts Plugins Conditions > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_plugins_conditions.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -d 'policy_id={policy_id}' 

Alert activity: Events, violations, incidents

These API functions include links to the API Explorer, where you can easily view information about events, violations, and incidents for your alert policies in New Relic Alerts.

Events

To view events for entities monitored by New Relic APM, Browser, Mobile, Plugins, Synthetics, and Alerts, include these items in the API call:

  • Your REST API key or Admin user's API key
  • Other optional values to use as filters (described in the API Explorer page) that depend on the type of product (New Relic Browser, New Relic Mobile, etc.), entity (as apps or key transactions for New Relic APM, monitors for New Relic Synthetics, etc.), and type of event (notification, deployment, instrumentation, etc.)
  • An optional pagination value

API Explorer: Alerts Events > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_events.json' \
     -H 'X-Api-Key:{api_key}' -i 
Violations

To view violations for any entity monitored by New Relic Alerts for your account, include these items in the API call:

API Explorer: Alerts Violations > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_violations.json' \
     -H 'X-Api-Key:{api_key}' -i 
Incidents

To view incidents for any entity monitored by New Relic Alerts for your account, include these items in the API call:

API Explorer: Alerts Incidents > GET > List

curl -X GET 'https://api.newrelic.com/v2/alerts_incidents.json' \
     -H 'X-Api-Key:{api_key}' -i 

Alert entity conditions

These API functions include links to the API Explorer, where you can easily list, add and remove entities in the conditions for your alert policies in New Relic Alerts.

List condition by entity

To view the Alerts conditions an entity is part of, for New Relic APM, Browser, Mobile, key transactions, and Plugins, include these items in the API call:

API Explorer: Alerts Entity Conditions > GET > list

curl -X GET 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -G -d 'entity_type={entity_type}' 
     
Add an entity to a condition

To add an entity to a condition, include these items in the API call:

  • Your Admin user's API key
  • The entity_id This is the entity (alert target) to be monitored. It is the numeric ID for the New Relic APM application, browser app, plugin, key transaction, or mobile app.
  • The condition_id (available from API Explorer: Alerts Conditions > GET > List)
  • The entity_type, which must be one of the following (not available for Synthetics):
    • Application
    • BrowserApplication
    • MobileApplication
    • KeyTransaction
    • Plugin

API Explorer: Alerts Entity Conditions > PUT > Add

curl -X PUT 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -H 'Content-Type: application/json' \
     -G -d 'entity_type={entity_type}&condition_id={condition_id}' 
Remove an entity from a condition

To remove an entity being monitored from a condition, include these items in the API call:

  • Your Admin user's API key
  • The entity_id This is the specific monitored entity (alert target) to be removed. It is the numeric ID for the APM application, browser app, plugin, key transaction, or mobile app.
  • The condition_id (available from API Explorer: Alerts Conditions > GET > List)
  • The entity_type which must be one of the following (not available for Synthetics):
    • Application
    • BrowserApplication
    • MobileApplication
    • KeyTransaction
    • Plugin

API Explorer: Alerts Entity Conditions > DELETE > Remove

curl -X DELETE 'https://api.newrelic.com/v2/alerts_entity_conditions/{entity_id}.json' \
     -H 'X-Api-Key:{api_key}' -i \
     -G -d 'entity_type={entity_type}&condition_id={condition_id}' 

For more help

Recommendations for learning more: