Spaces method and path for this operation:
Refer to Spaces for more information.
Update an existing private location's label, tags, or agent policy.
You must have all privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.
When a private location's label is updated, all monitors using this location are also updated to maintain data consistency.
When a private location's agent policy is changed, the package policies of all monitors using this location are deleted and recreated on the new agent policy. Monitors stop running on the previous agents until agents on the new policy pick them up. The new agent policy must be available in all spaces of the private location and must not be used by another private location.
[Required authorization] Route required privileges: uptime-read AND private-location-write AND uptime-write.
Path parameters
-
The unique identifier of the private location to update.
Minimum length is
1, maximum length is1024.
Responses
-
A successful response.
-
If the
labelis shorter than 1 character, or theagentPolicyIdis not available in the current space, does not cover all spaces of the private location, or is already used by another private location, the API returns a 400 Bad Request response with a corresponding error message. -
If the private location with the specified ID does not exist, the API returns a 404 Not Found response.
curl \
-X PUT "${KIBANA_URL}/api/synthetics/private_locations/location-id" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{"label":"Updated Private Location Name"}'
PUT kbn://api/synthetics/private_locations/location-id
{"label":"Updated Private Location Name"}
{
"label": "Updated Private Location Name"
}
{
"agentPolicyId": "new-agent-policy-id"
}
{
"agentPolicyId": "test-private-location-id",
"geo": {
"lat": 37.7749,
"lon": -122.4194
},
"id": "test-private-location-id",
"isInvalid": false,
"isServiceManaged": false,
"label": "Updated Private Location Name",
"spaces": [
"*"
],
"tags": [
"private",
"testing",
"updated"
]
}