Update a private location

Base URL
https://{kibana_url}
  • PUT /api/synthetics/private_locations/{id}
  • PUT /s/{space_id}/api/synthetics/private_locations/{id}
Auth

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 privileges

Privileges uptime-read and private-location-write and uptime-write

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

id string · min length: 1 · max length: 1024 required

The unique identifier of the private location to update.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

agentPolicyId string · min length: 1 · max length: 1024

The ID of the Fleet agent policy to move the private location to.

label string · min length: 1 · max length: 1024

A new label for the private location. Monitors using this location are updated to match.

tags string[] · max items: 100

An array of tags to categorize the private location.

Responses

A successful response.

application/json
agentPolicyId string

The ID of the agent policy associated with the private location.

geo object

Geographic coordinates (WGS84) for the location.

lat number required

The latitude of the location.

lon number required

The longitude of the location.

id string

The unique identifier of the private location.

isInvalid boolean

Indicates whether the location is invalid. If true, the location is invalid, which means the agent policy associated with the location is deleted.

label string

A label for the private location.

namespace string

The namespace of the location, which is the same as the namespace of the agent policy associated with the location.

spaces string[]

The space IDs where the private location is available.

tags string[]

An array of tags to categorize the private location.

400

If the label is shorter than 1 character, or the agentPolicyId is 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.

404

If the private location with the specified ID does not exist, the API returns a 404 Not Found response.

Base URL
https://{kibana_url}