Add parameters

POST /api/synthetics/params

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.

application/json

Body array[object] | object Required

The request body can contain either a single parameter object or an array of parameter objects.

One of:
Hide attributes Show attributes object
  • A description of the parameter.

  • key string Required

    The key of the parameter.

  • Specify whether the parameter should be shared across spaces.

  • tags array[string]

    An array of tags to categorize the parameter.

  • value string Required

    The value associated with the parameter.

Responses

POST /api/synthetics/params
curl \
 --request POST 'https://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
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)
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"
  }
]