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.
For an overview of all our available APIs, see Intro to APIs.
You can now manage your synthetic monitors (including certificate check monitors, step monitors, and broken links monitors) with our NerdGraph API.
The newest version of the synthetic monitoring API (v3) adds these features:
Synthetic monitoring 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 synthetic monitoring 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 synthetic monitors. (Additional API methods for scripted browser and API test monitors 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.
For US-based accounts, use the following endpoint:
For EU-based accounts, use the following endpoint:
The synthetic monitoring 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.