Spaces method and path for this operation:
Refer to Spaces for more information.
Partially update multiple monitors in a single request.
Each updates entry has its own id and attributes patch, so one request can apply a different change per monitor. Unspecified fields are left unchanged. Patches use the same merge, validate, and encrypt path as PUT /api/synthetics/monitors/{id}.
For private-location monitors, Fleet is synced once for the batch instead of once per monitor.
You must have all privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.
This is a versioned public API (elastic-api-version: 2023-10-31).
Responses
-
A successful response. The
resultarray is in request order. Per-id failures (not found, validation, Fleet sync) setupdated: falseanderrorwithout failing the whole batch.errorsis present only when there are service-level sync errors. -
Bad request. Returned when
updatesis missing or empty, anattributesobject is empty, or the sameidappears more than once.
curl \
--request PUT 'https://localhost:5601/api/synthetics/monitors/_bulk_update' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"updates": [
{
"id": "monitor1-id",
"attributes": {
"enabled": false
}
},
{
"id": "monitor2-id",
"attributes": {
"tags": ["bulk-patched"]
}
},
{
"id": "monitor3-id",
"attributes": {
"schedule": {
"number": "15",
"unit": "m"
}
}
}
]
}'
{
"updates": [
{
"id": "monitor1-id",
"attributes": {
"enabled": false
}
},
{
"id": "monitor2-id",
"attributes": {
"tags": ["bulk-patched"]
}
},
{
"id": "monitor3-id",
"attributes": {
"schedule": {
"number": "15",
"unit": "m"
}
}
}
]
}
{
"result": [
{
"id": "monitor1-id",
"updated": true
},
{
"id": "missing-id",
"updated": false,
"error": "Monitor id missing-id not found!"
},
{
"id": "monitor3-id",
"updated": true
}
]
}