Get a full data set by ID
This method returns the full data set of a given type and ID.
| JSON-RPC | REST | Parameters | Returns |
|---|---|---|---|
data/get | GET data/{type}/{id} | @type, @id | E > RootEntity |
Try it
You can edit and execute the example below. Just make sure an openLCA IPC
server is running on port 8080:
// This should return the flow property "Mass" when you are connected to a
// database with openLCA reference data. Try to change the type to Process with
// an ID from your database for example.
const v = await call("data/get", {
"@type": "FlowProperty",
"@id": "93a60a56-a3c8-11da-a746-0800200b9a66"
});
console.log(v);
Python IPC
import olca_ipc as ipc
import olca_schema as o
client = ipc.Client()
process = client.get(o.Process, "eacc4872-6f4e-4ff1-946e-c1bddeda24be")
print(process)
# Process(
# id='eacc4872-6f4e-4ff1-946e-c1bddeda24be',
# exchanges=[Exchange(amount=1.0, flow=Ref(id='b254bbdf- ...
Curl
endpoint="http://localhost:8080"
process_id="eacc4872-6f4e-4ff1-946e-c1bddeda24be"
curl "$endpoint/data/process/$process_id"
# { "@type":"Process",
# "@id":"eacc4872-6f4e-4ff1-946e-c1bddeda24be",
# "name":"blast furnace gas, Recycled Content cut-off