Update a private location

PUT /api/synthetics/private_locations/{id}

Spaces method and path for this operation:

put /s/{space_id}/api/synthetics/private_locations/{id}

Refer to Spaces for more information.

Update an existing private location's label. 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 will also be updated to maintain data consistency.

Path parameters

  • id string Required

    The unique identifier of the private location to be updated.

application/json

Body Required

  • label string Required

    A new label for the private location. Must be at least 1 character long.

    Minimum length is 1.

Responses

  • 200 application/json

    A successful response.

    Hide response attributes Show response attributes object
    • agentPolicyId string

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

    • geo object

      Geographic coordinates (WGS84) for the location.

      Hide geo attributes Show geo attributes object
      • 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.

  • 400

    If the label is shorter than 1 character the API will return a 400 Bad Request response with a corresponding error message.

  • 404

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

PUT /api/synthetics/private_locations/{id}
curl \
 --request PUT 'https://localhost:5601/api/synthetics/private_locations/{id}' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '"{\n  \"label\": \"Updated Private Location Name\"\n}"'
Request example
Update a private location's label.
{
  "label": "Updated Private Location Name"
}
Response examples (200)
{
  "label": "Updated Private Location Name",
  "id": "test-private-location-id",
  "agentPolicyId": "test-private-location-id",
  "isServiceManaged": false,
  "isInvalid": false,
  "tags": ["private", "testing", "updated"],
  "geo": {
    "lat": 37.7749,
    "lon": -122.4194
  },
  "spaces": ["*"]
}