...
Name | Endpoint | Issue | Required Action | |||
---|---|---|---|---|---|---|
1 | Create a Node | /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes | Returns 500 status on data validation failure | Return 400 status with updated and detailed error message. Updated Message:
| ||
2 | Update Node Leaves | /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes | Returns 400 status with entire JSON payload in error message | |||
3 | Replace Nodes | /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes | Returns 400 status with entire JSON payload in error message | |||
4 | Add List Element | /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes | Returns 500 status on data validation failure | |||
5 | Replace List element | /{apiVersion}/dataspaces/{dataspace-name}/anchors/{anchor-name}/list-nodes | Returns 400 status with entire JSON payload in error message | |||
6 | Get Delta between anchor and JSON payload | /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/deltaAnchors | Returns 400 status with entire JSON payload in error message |
Example
The following example shows the expected changes to existing APIs to implement a dry-run flag:
# | API | Request parameters | Response Codes | Scenarios | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Create a Node: /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes |
|
| Scenario 1: dry run set to false In this case there will be no functional change in the APIs, and they would return appropriate response codes with messages in case of any failure. Scenario 2: dry run set to true In this case the APIs will return the same response codes. The only difference will be, in case data validation passes, then it would return a 200-response code, but the data will not be persisted in case of POST operation or modified in case of PUT/PATCH operations. |
References:
...