Insert or update a data set
Inserts or updates a provided data set in the database. This method is not available when a server runs in read-only mode.
| JSON-RPC | REST | Parameters | Returns |
|---|---|---|---|
data/put | PUT data/{type} | the data set, E > RootEntity | Ref |
Try it
You can edit and execute the example below. Just make sure an openLCA IPC
server is running on port 8080:
// This will insert the given source data set into the database, if it already
// exists there, it will update it. (In openLCA, press F5 in the navigation to
// see it after the method call.)
const v = await call("data/put", {
"@type": "Source",
"@id": "91bbc461-4ce1-4f83-b95d-de0909575174",
"name": "Inter-process communication with openLCA",
// ...
});
console.log(v);
Python IPC
import olca_ipc as ipc
import olca_schema as o
client = ipc.Client()
ref = client.put(o.Source(name="Inter-process communication with openLCA"))
print(ref)
# Ref(
# id="16cba9b2-2987-4735-9f3e-96fedf8449dd",
# name="Inter-process communication with openLCA",
# ...