Back to top icon

New Relic Developers

REST APIs

Extract data and manage your monitoring with the RESTful interface for New Relic data.

You can extract data and manage New Relic via our REST APIs. The following are a few notable APIs to get you started. For more detail on each API, refer to the documentation for your product.

Dashboard Management API: Get a list of all available Insights dashboards in your account.

curl -X GET 'https://api.newrelic.com/v2/dashboards.json' \
     -H 'X-Api-Key:YOUR_ADMIN_USER_KEY' -i 

Alert Management API: Update an existing Alert policy by adding a new condition targeting a Synthetic monitor.

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

Synthetic Management API: Delete a particular Synthetic monitor by its ID.

curl -v \
     -H 'X-Api-Key:YOUR_USER_KEY' \
     -X DELETE https://synthetics.newrelic.com/synthetics/api/v3/monitors/YOUR_MONITOR_ID

Deployments API: Create a new deployment marker in APM.

curl -X POST 'https://api.newrelic.com/v2/applications/YOUR_APP_ID/deployments.json' \
     -H 'X-Api-Key:YOUR_API_KEY' -i \
     -H 'Content-Type: application/json' \
     -d \
'{
  "deployment": {
    "revision": "1.0.2",
    "changelog": "Updating MySQL driver library",
    "description": "Switching to a custom MySQL driver to better accommodate our internal needs",
    "user": "jose@newrelic.com"
  }
}' 

REST API v2: Get a list of metric error counts for a given application.

curl -X GET 'https://api.newrelic.com/v2/applications/YOUR_APP_ID/metrics/data.json' \
     -H 'X-Api-Key:YOUR_API_KEY' -i \
     -G -d 'names[]=Errors/all&names[]=' 

Learn more and start building

Group 7 Created with Sketch.

Documentation

For a full list of all New Relic APIs by product (including RESTful APIs), see Introduction to New Relic APIs.

Group 9 Created with Sketch.

NRU Tutorials

To learn how to generate, share, and save pre-populated dashboard templates, watch Managing dashboards with the New Relic REST API.

Group 8 Created with Sketch.

Community Forum

Connect with other developers in the New Relic Explorers Hub

GitHub

For examples of integrations and other technologies, see our GitHub repo.