Create a private location

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

Create a private location backed by a Fleet agent policy.

You must have all privileges for the Synthetics and Uptime feature in the Observability section of the Kibana feature privileges.

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.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

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

The ID of the agent policy associated with the private location. Each agent policy can back only one 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.

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

A label for the private location. Must be unique.

spaces string[] · max items: 100

An array of space IDs where the private location is available. If it is not provided, the private location is available in all spaces.

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 agentPolicyId is already used by an existing private location or if the label already exists, the API returns a 400 Bad Request response with a corresponding error message.

Base URL
https://{kibana_url}