POST /api/synthetics/params

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.

[Required authorization] Route required privileges: uptime-read AND uptime-write.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

application/json
Body object | array[object]

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

Any of:

Not more than 10000 elements.

Hide attributes Show attributes object
  • description string

    A description of the parameter.

    Maximum length is 4096.

  • key string Required

    The key of the parameter.

    Minimum length is 1, maximum length is 1024.

  • share_across_spaces boolean

    Specify whether the parameter should be shared across spaces.

  • tags array[string]

    An array of tags to categorize the parameter.

    Not more than 100 elements. Maximum length of each is 256.

  • value string Required

    The value associated with the parameter.

    Minimum length is 1, maximum length is 1000000.

Responses

  • 200 application/json

    A successful response.

    One of:
    Hide attributes Show attributes object
    • description string

      A description of the parameter.

    • id string

      The unique identifier for the parameter.

    • key string

      The parameter key.

    • share_across_spaces boolean

      Indicates whether the parameter is shared across spaces.

    • tags array[string]

      An array of tags associated with the parameter.

    • value string

      The value associated with the parameter.

  • 409

    A parameter with the same key already exists in the space.

POST /api/synthetics/params
curl \
  -X POST "${KIBANA_URL}/api/synthetics/params" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{"key":"your-key-name","value":"your-parameter-value","description":"Param to use in browser monitor","tags":["authentication","security"],"share_across_spaces":true}'
POST kbn://api/synthetics/params
{"key":"your-key-name","value":"your-parameter-value","description":"Param to use in browser monitor","tags":["authentication","security"],"share_across_spaces":true}
Request examples
Add a single parameter.
{
  "description": "Param to use in browser monitor",
  "key": "your-key-name",
  "share_across_spaces": true,
  "tags": [
    "authentication",
    "security"
  ],
  "value": "your-parameter-value"
}
Add multiple parameters.
[
  {
    "key": "param1",
    "value": "value1"
  },
  {
    "key": "param2",
    "value": "value2"
  }
]
Response examples (200)
A successful response for a single added parameter.
{
  "description": "Param to use in browser monitor",
  "id": "unique-parameter-id",
  "key": "your-key-name",
  "share_across_spaces": true,
  "tags": [
    "authentication",
    "security"
  ],
  "value": "your-param-value"
}
A successful response for multiple added parameters.
[
  {
    "id": "param1-id",
    "key": "param1",
    "value": "value1"
  },
  {
    "id": "param2-id",
    "key": "param2",
    "value": "value2"
  }
]