Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Get the usage of a data set

Returns references to the data sets that use a specified data set. For example, for a flow, these are the processes that have the flow as an input or output, the impact categories with characterization factors for that flow, etc. For a process, these are the product systems that contain the process, and so on. If the data set is not used anywhere, an empty list is returned. This is the same search that openLCA runs before a data set is deleted.

JSON-RPCRESTParametersReturns
data/get/usage–@type, @idList[Ref]

Try it

You can edit and execute the example below. Just make sure an openLCA IPC server is running on port 8080:

// Modify the type or ID and maybe do not take the ID of a flow that is used in
// thousands of processes...
const v = await call("data/get/usage", {
  "@type": "Flow",
  "@id": "e87f039d-d9ce-4242-ac18-c9284cc80f3d",
});
console.log(v);

Python IPC

import olca_ipc as ipc
import olca_schema as o

client = ipc.Client()
refs = client.get_usage(o.Flow, "7f6bb533-2d3c-43a6-ac60-6eef299d7c52")
for ref in refs:
    print(f"{ref.ref_type}: {ref.name}")
# RefType.Process: steel production
# RefType.Process: car assembly
# RefType.ImpactCategory: Climate change
# ...