...
Parameter | isRequired | Description |
---|---|---|
cps-path | yes | node path to be queried |
descendants | no | Number of descendants to be queried. default is none |
resultIndexpageIndex | no | page index starting from 1. |
resultSize | no | number of fragments per page starting from 1 10 (TBD). |
Query
Query | Description |
---|---|
SELECT id, anchor_id AS anchorId, xpath, parent_id AS parentId, CAST(attributes AS TEXT) AS attributes FROM FRAGMENT WHERE xpath ~ :xpathRegex ORDERED BY id LIMIT :resultSize OFFSET (:resultIndex - 1) * :resultSize | Query limited fragments in order of fragment id |
...
API : GET http://<IP>:<PORT>/cps/api/v2/dataspaces/{dataspace-name}/nodes/query?cps-path={cps-path}&descendants={descendants}&pageIndex={pageIndex}&anchorSizeresultSize={anchorSizeresultSize}
Request Parameters:
Parameter | isRequired | Description |
---|---|---|
cps-path | yes | node path to be queried |
descendants | no | Number of descendants to be queried. default is none |
resultIndexpageIndex | no | anchor page index starting from 1. |
anchorSizeresultSize | no | number of anchors records per request. It is nothing but number of anchors to be queried. Default value is 5(TBD). |
Response Headers
Header | description |
---|---|
totalAnchorstotalResults | total number of anchors |
resultIndex | requested index of anchor |
anchorSize | requested number of anchorsavailable records (achors) |
totalPages | total nulber of pages. |
Query
Query | Description |
---|---|
SELECT id FROM anchor order by id LIMIT : anchorSize OFFSET : (resultIndex -1) * :anchorSize | 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 ~ :xpathRegex | query fragments for list of anchors from above query |
...