Use the Synthetics REST API to create and manage synthetic monitors of all types: ping, simple browser, scripted browser, and API test monitors. All synthetic monitoring data is available via the REST API.
To use the Synthetics REST API, you must have a user role that allows that capability and a user key.
For an overview of all available New Relic APIs, see Intro to APIs.
The newest version of the Synthetics API (v3) adds these features:
Synthetics API (v3)
Options field for POST and PUT request
You can specify the options for
You can update only the fields of a monitor you want to change, rather than having to specify the entire monitor entity in a PUT. You can also specify the
More detail with 400
As of v3, the Synthetics API attempts to return as much information as possible when a validation failure occurs. This will help you figure out what might be wrong with the request. The API runs all validations and returns any failed validation messages, rather than failing on the first validation error as occurred in previous API versions.
Large API responses are properly paginated.
These are the monitor types and how they're referred to in the API:
This API can be used for all Synthetics monitors. (Additional API methods for scripted browser and API test monitors are also available to update the script associated with those monitors.) All Synthetics data is available via the API. API examples show cURL commands.
For US-based accounts, use the following endpoint:
For EU-based accounts, use the following endpoint:
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.
In addition to the general API, there are several API methods for the scripted Browsers (
SCRIPT_BROWSER) and API test browsers (
SCRIPT_API). These examples show cURL commands.
Here is an example of using New Relic's REST API and the bash script to create a scripted browser monitor.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.