Skip to content

Dataset.set_param

Set a parameter value on this dataset.

Creates the parameter key in the system if it doesn't exist yet. If the parameter already has a value, this creates an additional one (use delete_param to remove existing values first).

Signature

set_param(key: str, value: str) -> dict[str, Any]

Parameters

Name Type Required Default
key str yes -
value str yes -

HTTP parameters

Name In Type Required Default
dataset_id path string yes -

Fields

Schema: ParameterValueCreateSchema

Field Type Required
editable boolean no
parameter_key_id string no
parameter_key_title string no
value string yes

Return shape

HTTP 201 — Created

Schema: ParameterValueSchema

Field Type Required
editable boolean yes
id string yes
parameter_key_id string yes
parameter_key_title string yes
parameter_key_unit string no
parameter_key_value_type string no
snap_id string yes
source_type string yes
value string yes

Permission

Required permission: parameter:create

HTTP

POST /api/datasets/{id}/parameters/ (createParameterValue)

Usage

ds.set_param("Temperature", "25")
ds.set_param("Cable Length", "1.5m")