...
# | Sub Interface | Method | Scenario | HTTP Response codes to be implemented | Notes |
---|---|---|---|---|---|
1 | Data | Proposed API: GET- /v2/dataspaces/{dataspace-name}/anchors/{anchor-name}/delta?xpath={xpath}&descendants={descendants Proposed method name: CpsDataApi.getDeltaByDataspaceAnchorAndPayload() | Generate a delta report between an anchor and JSON payload |
|
Request parameters:
Parameter name | In | Required | Description |
---|---|---|---|
dataspace-name | Path | Yes | Dataspace name |
anchor | Path | Yes | Anchor Name/Reference Anchor |
xpath | Query | Yes | xpath of the node |
descendants | Query | No | Level of descendants for delta comparison. |
Alternative proposed API
This alternative API takes in an additional query parameter as an input, where in the user can provide the Schema Context in form of a Yang file. This yang file will only be used to generate the data nodes from the json payload and will not be persisted in CPS DB.
# | Sub Interface | Method | Scenario | HTTP Response codes to be implemented | Notes |
---|---|---|---|---|---|
1 | Data | Proposed API: GET-/v1/dataspaces/:dataspace-name/anchors/:anchor-name/delta?xpath={xpath} Proposed method name: CpsDataApi.getDeltaByDataspaceAnchorAndPayload() | Generate a delta report between an anchor and JSON payload |
|
Request parameters:
Parameter name | In | Required | Description |
---|---|---|---|
dataspace-name | Path | Yes | Dataspace name |
anchor | Path | Yes | Anchor Name/Reference Anchor |
xpath | Query | Yes | xpath of the node |
descendants | Query | No | Level of descendants for delta comparison. |
Request body:
Content-Type: | multipart/form-data | ||
form-data | File | Yang file | Yang file containing the schema details |
form-data | Text | json payload | raw json payload |
Response Body/Delta Report Format
...