Get the parameters of a data set

Returns the (local) parameters of the specified data set. In case of processes and impact categories, a list of parameters is returned. For product systems, the respective parameter redefinitions are returned.

Rest APIGET /data/{type}/{id}/parameters
JSON-RPCdata/get/parameters
Python/IPCClient.get_parameters
Return type*

*Return type:

Examples

Python IPC

import olca_ipc as ipc
import olca_schema as o

client = ipc.Client()
params = client.get_parameters(
    o.ProductSystem, "0db1eda6-a34e-4c82-b06b-19f27c92495a"
)
for p in params:
    print(f"{p.name}: {p.value}")
# param1: 42
# param2: 21
# ...

JSON-RPC via Fetch API

The example below shows the usage of this method using the JSON-RPC protocol via the Fetch API which is available in modern web-browsers or platforms like Deno.

  let resp = await fetch("http://localhost:8080", {
    method: "POST",
    body: JSON.stringify({
      jsonrpc: "2.0",
      id: 1,
      method: "data/get/parameters",
      params: {
        "@type": "ProductSystem",
        "@id": "0db1eda6-a34e-4c82-b06b-19f27c92495a",
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   result: [
  //     { name: "param_a", value: 994, isProtected: false },
  //     { name: "param_b", value: 0.7237, isProtected: false },
  //     { name: "param_c", value: 0, isProtected: false },