Get private locations

GET /api/synthetics/private_locations

Spaces method and path for this operation:

get /s/{space_id}/api/synthetics/private_locations

Refer to Spaces for more information.

Get a list of private locations. You must have read privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.

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.

GET /api/synthetics/private_locations
curl \ --request GET 'https://localhost:5601/api/synthetics/private_locations' \ --header "Authorization: $API_KEY"
Response examples (200)
[ { "label": "Test private location", "id": "fleet-server-policy", "agentPolicyId": "fleet-server-policy", "isInvalid": false, "geo": { "lat": 0, "lon": 0 }, "namespace": "default" }, { "label": "Test private location 2", "id": "691225b0-6ced-11ee-8f5a-376306ee85ae", "agentPolicyId": "691225b0-6ced-11ee-8f5a-376306ee85ae", "isInvalid": false, "geo": { "lat": 0, "lon": 0 }, "namespace": "test" } ]