Trigger an on-demand test run for a monitor
Generally available; added in 9.2.0
Spaces method and path for this operation:
post /s/{space_id}/api/synthetics/monitor/test/{monitorId}
Refer to Spaces for more information.
Trigger an immediate test execution for the specified monitor. The response includes the generated testRunId
. If the test encounters issues in one or more service locations, an errors
array is also returned with details about the failures.
POST
/api/synthetics/monitor/test/{monitorId}
curl \
--request POST 'https://localhost:5601/api/synthetics/monitor/test/{monitorId}' \
--header "Authorization: $API_KEY"
Response examples (200)
{
"testRunId": "2bd506e5-4f9a-4aa6-a019-7988500afba0",
"errors": [
{
"locationId": "us_central_staging",
"error": {
"status": 401,
"reason": "no auth credentials provided",
"failed_monitors": null
}
}
]
}