Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Issues and Decisions 

now we are able to add more than one root nodes. can we update data fragments of more than one root nodes.  
#IssuesNotesDecision
1Exposing endpoint to clients might be vulnerable. we can add a flag to enable/disable this feature in docker compose file.2do we need separate operation for list or can we support all variations using same solution without interface changes

Toine Siebelink Prefer single solution that address all scenarios (multiple containers or list entries) correctly without interface changes. 

2Should all patch operations be part of singel transactionfor now treat individual
3what to do with failures
  1. stop and rollback (depends on issue #2)
  2. silently ignore
  3. stop processing with rollback 

Initial findings

When trying to perform Patch operation on a list data node, wherein multiple list items are updated in one request. It is seen that only the top most item in the list gets updated where as the remaining list items remain as it is.

...

Code Block
titleResponse
{
    "status": "400 BAD_REQUEST",
    "message": "Operation is not supported for multiple data nodes",
    "details": "Number of data nodes present: 2"
}


Possible Solutions to Updating multiple items

...

By having a new sub end point for Patch operation that specifically performs update on list data nodes

New sub endpoint: PATCH http://{IP}:{PORT}/cps/api/v1/dataspaces/{dataspace-name}/anchor/{anchor-name}/list-nodes?xpath

...

.

  • Iterate over top-level element in patch.
  • match each top element element to target data 
  • execute each patch
  • Transactional ?!
  • test & demo for each scenario
    • top level containers
    • top level list elements
    • list elements under same continaer

...