Add parameters
Spaces method and path for this operation:
post /s/{space_id}/api/synthetics/params
Refer to Spaces for more information.
Add one or more parameters to the Synthetics app.
You must have all
privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.
POST
/api/synthetics/params
curl \
--request POST 'http://localhost:5601/api/synthetics/params' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '"{\n \"key\": \"your-key-name\",\n \"value\": \"your-parameter-value\",\n \"description\": \"Param to use in browser monitor\",\n \"tags\": [\"authentication\", \"security\"],\n \"share_across_spaces\": true\n}"'
Request examples
Single parameter
Add a single parameter.
{
"key": "your-key-name",
"value": "your-parameter-value",
"description": "Param to use in browser monitor",
"tags": ["authentication", "security"],
"share_across_spaces": true
}
Add multiple parameters.
[
{
"key": "param1",
"value": "value1"
},
{
"key": "param2",
"value": "value2"
}
]
Response examples (200)
Single parameter
A successful response for a single added parameter.
{
"id": "unique-parameter-id",
"key": "your-key-name",
"value": "your-param-value",
"description": "Param to use in browser monitor",
"tags": ["authentication", "security"],
"share_across_spaces": true
}
A successful response for multiple added parameters.
[
{
"id": "param1-id",
"key": "param1",
"value": "value1"
},
{
"id": "param2-id",
"key": "param2",
"value": "value2"
}
]