Versions Compared

Key

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

...

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 InterfaceMethodScenario

HTTP Response codes

to be implemented

Notes
1Data

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

  • 200 (OK)
    • success
  • 400
    • dataspace not found
      DataspaceNotFoundException
    • anchor not found
      AnchorNotFoundException
    • Data node not found
      DataNodeNotFoundException
    • invalid xpath
      CpsPathException
  • 500
    • unexpected error

Request parameters:

Parameter nameInRequiredDescription
dataspace-namePathYesDataspace name
anchorPathYesAnchor Name/Reference Anchor
xpathQueryYesxpath of the node
descendantsQueryNoLevel of descendants for delta comparison. 

Request body:

Content-Type:

multipart/form-data



form-dataFileYang fileYang file containing the schema details
form-dataTextjson payloadraw json payload

Response Body/Delta Report Format

...