Versions Compared

Key

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

...

API : GET http://<IP>:<PORT>/cps/api/v2/dataspaces/{dataspace-name}/nodes/query?cps-path={cps-path}&descendants={descendants}&pageIndex={pageIndex}&resultSizepageSize={resultSizepageSize}

Request Parameters:

ParameterisRequiredDescription
cps-pathyesnode path to be queried
descendantsnoNumber of descendants to be queried. default is none
pageIndexnopage index starting from 1. 
resultSizepageSizenonumber of records per request. It is nothing but number of anchors to be queried.  Default value is 5(TBD).

...

QueryDescription
SELECT id FROM anchor order by id LIMIT : anchorSize pageSize OFFSET : (resultIndex pageIndex -1) * :anchorSize   pageSize query list of anchors 
SELECT id, anchor_id AS anchorId, xpath, parent_id AS parentId, CAST(attributes AS TEXT) AS attributes FROM FRAGMENT WHERE anchor_id IN :anchorList AND xpath ~ :xpathRegexquery fragments for list of anchors from above query

...