You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Resources

Assumptions

#Description
1Yang namespaces are globally unique (except for multiple revisions)

Open Issues/Decisions

#DescriptionDetailsDecisions
1How to differentiatie GET queries with different parameters. If we dont have named parameters how best to know what is meant

Alternatives

  1. GET /anchorpoint/dataspace/{dataspace} versus /anchor-point/name/{dataspace}
  2. GET /anchorpoint?dataspace={dataspace} versus /anchor-point?name={dataspace}
  3. GET /dataspace/{dataspace-id}/anchorpoint versus /anchor-point/{name}
  4. GET /dataspace/{dataspace-id}/anchorpoint versus /anchor-point/name/{name}
  5. GET /dataspace/{dataspace-id}/anchorpoint versus /name/{name}/anchor-point
  6. etc.

Team meeting Flavio,Tony,Toine,Bruno,Niamh, Rishi 8 Oct 2020:

Use hierarchical resource urls including the concept of 'dataspaces' and 'anchors'. 'Fragments' will be replaced by 'Nodes'

e.g.

GET /dataspaces/{dataspace_id}/anchors → returns Anchor-points

GET /dataspaces/{dataspace_id}/anchors/{anchor-id}/nodes?xpath="..."  → returns Node(s)

GET /dataspaces/{dataspace_id}/anchors/{anchor-id}/nodes?schema_node_identifier="..."  → returns Node(s)

GET /dataspaces/{dataspace_id}/nodes&xpath="..." → returns Node(s)

GET /dataspaces/{dataspace_id}/modules → returns Modules


2Advance queries v Simple Queries (gets) for data fragments. Do we want/need differentiatie on UTL?
  1. GET /fragment/query/{xpath}
  2. GET/fragment/{xpath}  
  3. GET /query/{xpath}

Note . The xpath could be a full unambiguous xpath returning one object or it could be partial path using wildcards etc allowing for more advanced queries return 0 or more fragments (developed over many iterations)

Team meeting Flavio,Tony,Toine,Bruno,Niamh, Rishi 8 Oct 2020:

Advanced queries will implemented as advanced xpath' (and or schema node identifiers) no need for separate URLs

3We have no modules sets!model files just arbitrarily group a few modules, is there a need to persist this grouping (We do have the concept of a dataspace as well)Team meeting Flavio,Tony,Toine,Bruno,Niamh, Rishi 8 Oct 2020:
The way modules are delivered i.e. grouped in files is not relevant for the CPS application. What needs to be stored for each 'anchor'  is the namespace and revision of the model that describes the 'root' of that  instance

API definitions

Note. All urls in below table will be prefixed with something like : <server>/cps/v1/

Group#OperationPayloadDescription

Modelling storage

1PUT /module/{dataspace}FileCreate/Update (and validate) a module set. (upload a model file)
2GET /module/
Read all modules in the store.
3GET /module/{namespace}
Read all modules in the store for the given namespace
4GET /module/{namespace}/{revision}
Read all modules in the store for the given namespace and revision
5GET /dataspaces/{dataspace-id}/modules
Read all modules in the store for the given dataspace

Anchor Points persistence

6PUT /anchor-point/Json Object 

Create an anchor point given a name and a dataspace and module (namespace and revision)

7GET /anchor-point/{dataspace}/{name}/
Read an anchor point and the associated attributes given a name and a dataspace.
8DELETE /anchor-point/{dataspace}/{name}

Delete an anchor point given a name and a dataspace. (will delete whole tree)

9GET /dataspaces/{dataspace-id}/anchors

Read all anchor points in the system given a dataspace.

10GET /module/{dataspace}/{anchor-point}/

Get a module (reference), given an anchor point 

11GET /anchor-point/fragment/{dataspace}/{xpath}/
Get the anchor point of a fragment given a node xpath

Fragment persistence

12PUT /fragment/{dataspace}/{name}/FileCreate a (root) node for a given anchor point, the node can have children.
13PUT /fragment/{parent-fragment-id}/FileCreate a node given an ID relative to the parent
14GET /fragment/{dataspace}/{name}/
Get a node given an anchor point (return just one level with just xpath references to its children)
15GET /dataspaces/{dataspace-id}/nodes&xpath="..."
Get a node given a Xpath expression 
16GET /dataspaces/{dataspace_id}/anchors/{anchor-id}/nodes?xpath="..."
Get all the nodes under an anchor point given a anchor point (notice similarity with /fragment/{dataspace}/{anchor-point}/  (just one letter!)
17GET /dataspaces/{dataspace_id}/anchors/{anchor-id}/nodes schema_node_identifier="..." 
Get all the relevant nodes given a schema node identifier 
(not need to specify dataspace is schema-node-identifier is globally unique)
  • No labels