Create a private location
- Base URL
-
https://{kibana_url}
- POST /api/synthetics/private_locations
- POST /s/{space_id}/api/synthetics/private_locations
Refer to Spaces for more information.
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 authorization
- Privileges uptime-read and private-location-write and uptime-write
Request body
-
agentPolicyIdstring · min length: 1 · max length: 1024required -
The ID of the agent policy associated with the private location. Each agent policy can back only one private location.
-
labelstring · min length: 1 · max length: 1024required -
A label for the private location. Must be unique.
-
spacesstring · 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.
-
An array of tags to categorize the private location.
Responses
A successful response.
-
isInvalidboolean -
Indicates whether the location is invalid. If
true, the location is invalid, which means the agent policy associated with the location is deleted. -
namespacestring -
The namespace of the location, which is the same as the namespace of the agent policy associated with the location.
-
An array of tags to categorize the private location.
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.