Versions Compared

Key

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

...

we want to update multiple fragments of data node for a given dataspace, anchor and CPS-Path. In current implementation, we can only update single fragments of data node. for example below PATCH payload only updated name of code "1" but request was to update name of code "1" and "2" both. 

{
    "categories": [
      {
        "code": "1",
        "name": "SciFi01"
      },

      {
        "code": "2",
        "name": "Kids01"
      }
    ]
 }

Issues and Decisions 

#IssuesNotesDecision
1Exposing endpoint to clients might be vulnerable. we can add a flag to enable/disable this feature in docker compose file.
2now we are able to add more than one root nodes. can we update data fragments of more than one root nodes.  

Endpoint Definition

New API : PATCH http://{IP}:{PORT}/cps/api/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/nodes/bulkupdate


Parameters:
Parameter nameInisRequired
dataspace-namepathYes
anchor-namepathYes
cps-pathqueryYes
observed-timestampqueryYes