Get Parameters APIedit

Retrieves parameters based on the provided criteria.

Requestedit

GET <kibana host>:<port>/api/synthetics/params/{id?}

GET <kibana host>:<port>/s/<space_id>/api/synthetics/params/{id?}

Prerequisitesedit

You must have read privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.

Query Parametersedit

id
(Optional, string) The unique identifier of the parameter. If provided, this API will retrieve a specific parameter by its ID. If not provided, it will retrieve a list of all parameters.

Response Exampleedit

The API response includes parameter(s) as JSON objects, where each parameter object has the following attributes:

  • id (string): The unique identifier of the parameter.
  • key (string): The key of the parameter.

If the user has read-only permissions to the Synthetics app, the following additional attributes will be included:

  • description (string, optional): The description of the parameter.
  • tags (array of strings, optional): An array of tags associated with the parameter.
  • namespaces (array of strings): Namespaces associated with the parameter.

If the user has write permissions, the following additional attribute will be included:

  • value (string): The value associated with the parameter.

Here’s an example request for retrieving a single parameter by its ID:

GET /api/synthetics/params/unique-parameter-id

Here’s an example response for retrieving a single parameter by its ID:

For users with read-only permissions:

{
  "id": "unique-parameter-id",
  "key": "your-api-key",
  "description": "Param to use in browser monitor",
  "tags": ["authentication", "security"],
  "namespaces": ["namespace1", "namespace2"]
}

For users with write permissions:

{
  "id": "unique-parameter-id",
  "key": "your-param-key",
  "description": "Param to use in browser monitor",
  "tags": ["authentication", "security"],
  "namespaces": ["namespace1", "namespace2"],
  "value": "your-param-value"
}

And here’s an example response for retrieving a list of parameters:

For users with read-only permissions:

[
  {
    "id": "param1-id",
    "key": "param1",
    "description": "Description for param1",
    "tags": ["tag1", "tag2"],
    "namespaces": ["namespace1"]
  },
  {
    "id": "param2-id",
    "key": "param2",
    "description": "Description for param2",
    "tags": ["tag3"],
    "namespaces": ["namespace2"]
  }
]

For users with write permissions:

[
  {
    "id": "param1-id",
    "key": "param1",
    "description": "Description for param1",
    "tags": ["tag1", "tag2"],
    "namespaces": ["namespace1"],
    "value": "value1"
  },
  {
    "id": "param2-id",
    "key": "param2",
    "description": "Description for param2",
    "tags": ["tag3"],
    "namespaces": ["namespace2"],
    "value": "value2"
  }
]