This will delete the USEDrelationship (edge) connecting the activity to the attachment (not the node itself). targetId represents the ObjectId in the PHCCP database.
This will create a new USED relationship for the activity, connected to a node for the attachment (which will also be created, if needed). The body of the request is matches the interface in provenance/reference.model.ts — e.g.:
Similar to how we currently pipe the results of a create() event to captureProvActivity.save(), we'd need to do something similar for updateInsight() — maybe something like captureProvActivity.removeUsed() and captureProvActivity.addUsed()?
We also need to figure out a way for the portal to store or retrieve the ID for an activity...
I've added two endpoints to the
prov-service
API:/activities/{activityId}/used/{targetId}
This will delete the
USED
relationship (edge) connecting the activity to the attachment (not the node itself).targetId
represents theObjectId
in the PHCCP database.Example request:
/activities/{activityId}/used
This will create a new
USED
relationship for the activity, connected to a node for the attachment (which will also be created, if needed). The body of the request is matches the interface inprovenance/reference.model.ts
— e.g.:Example request:
Similar to how we currently pipe the results of a
create()
event tocaptureProvActivity.save()
, we'd need to do something similar forupdateInsight()
— maybe something likecaptureProvActivity.removeUsed()
andcaptureProvActivity.addUsed()
?We also need to figure out a way for the portal to store or retrieve the ID for an activity...