Delete a data set
Deletes the specified root entity from the database. This method is unavailable when the server runs in read-only mode.
Warning: This method does not check whether the entity is still referenced elsewhere. Deleting a data set that is in use can corrupt the database. Always check its usages first.
| JSON-RPC | REST | Parameters | Returns |
|---|---|---|---|
data/delete | DELETE data/{type}/{id} | @type, @id | Ref |
Try it
You can edit and execute the example below. Just make sure an openLCA IPC
server is running on port 8080:
// This would delete the source that we created in the put-example ... so
// nothing bad should happen
const v = await call("data/delete", {
"@type": "Source",
"@id": "91bbc461-4ce1-4f83-b95d-de0909575174",
});
console.log(v);
Python IPC
import olca_ipc as ipc
import olca_schema as o
client = ipc.Client()
ref = client.delete(
o.Ref(ref_type=o.RefType.Source, id="16cba9b2-2987-4735-9f3e-96fedf8449dd")
)
print(ref)
# Ref(
# id="16cba9b2-2987-4735-9f3e-96fedf8449dd",
# name="Inter-process communication with openLCA",
# ...