...
HTTP response codes for Delta between Anchor and Payload API
Proposed API
The proposed API will be part of the CPS Data Interface. The following response codes will be returned by the 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
...