Spaces method and path for this operation:
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] Route required privileges: uptime-read AND private-location-write AND uptime-write.
Body
-
The ID of the agent policy associated with the private location. Each agent policy can back only one private location.
Minimum length is
1, maximum length is1024. -
Geographic coordinates (WGS84) for the location.
Additional properties are NOT allowed.
-
A label for the private location. Must be unique.
Minimum length is
1, maximum length is1024. -
An array of space IDs where the private location is available. If it is not provided, the private location is available in all spaces.
Not more than
100elements. Maximum length of each is256.
curl \
-X POST "${KIBANA_URL}/api/synthetics/private_locations" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "kbn-xsrf: true" \
-H "Content-Type: application/json" \
-d '{"label":"Private Location 1","agentPolicyId":"abcd1234","tags":["private","testing"],"geo":{"lat":40.7128,"lon":-74.006},"spaces":["default"]}'
POST kbn://api/synthetics/private_locations
{"label":"Private Location 1","agentPolicyId":"abcd1234","tags":["private","testing"],"geo":{"lat":40.7128,"lon":-74.006},"spaces":["default"]}
{
"agentPolicyId": "abcd1234",
"geo": {
"lat": 40.7128,
"lon": -74.006
},
"label": "Private Location 1",
"spaces": [
"default"
],
"tags": [
"private",
"testing"
]
}
{
"agentPolicyId": "abcd1234",
"geo": {
"lat": 40.7128,
"lon": -74.006
},
"id": "abcd1234",
"label": "Private Location 1",
"spaces": [
"default"
],
"tags": [
"private",
"testing"
]
}