...
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
# | Issues | Notes | Decision |
---|---|---|---|
1 | Exposing endpoint to clients might be vulnerable. | we can add a flag to enable/disable this feature in docker compose file. | |
2 | now 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 name | In | isRequired |
---|---|---|
dataspace-name | path | Yes |
anchor-name | path | Yes |
cps-path | query | Yes |
observed-timestamp | query | Yes |