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

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-RPCRESTParametersReturns
data/putPUT data/{type}the data set, E > RootEntityRef

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",
# ...