Get the descriptor of a data set

Returns the descriptor of the data set with the given type and ID.

Rest APIGET /data/{type}/{id}/info
JSON-RPCdata/get/descriptor
Python/IPCClient.get_descriptor
Return type:Ref

Examples

Python IPC

import olca_ipc as ipc
import olca_schema as o

client = ipc.Client()
mass_ref = client.get_descriptor(o.FlowProperty, name="Mass")
print(mass_ref)
# Ref(
#   id='93a60a56-a3c8-11da-a746-0800200b9a66',
#   category='Technical flow properties',
#   name='Mass',
# ...

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/descriptor",
      params: {
        "@type": "Process",
        "@id": "eacc4872-6f4e-4ff1-946e-c1bddeda24be",
      }
    })
  });
  let v = await resp.json();
  console.log(v);
  // {
  //   jsonrpc: "2.0",
  //   id: 1,
  //   result: {
  //     "@type": "Process",
  //     "@id": "eacc4872-6f4e-4ff1-946e-c1bddeda24be",
  //     name: "blast furnace gas, Recycled Content cut-off",
  //     processType: "LCI_RESULT",
  //     flowType: "PRODUCT_FLOW"
  //   }
  // }