...
Parameter | isRequired | Description |
---|---|---|
cps-path | yes | node path to be queried |
descendants | no | Number of descendants to be queried. default is none |
pageIndex | no | page index starting from 1. |
pageSize | no | number of fragments per page starting from 1 (TBD). |
Query changes
Query | Description | Decision |
---|---|---|
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 :pageSize OFFSET : pageIndex + 1 | Query limited fragments in order of fragment id | |
Pagination over anchors
we can provide pagination over anchors where client can chose number of anchors per request to fetch fragments from.
...
API : GET http://<IP>:<PORT>/cps/api/v2/dataspaces/{dataspace-name}/nodes/query?cps-path={cps-path}&descendants={descendants}&pageIndex={pageIndex}&anchorSize={anchorSize}
Request Parameters:
Parameter | isRequired | Description |
---|---|---|
cps-path | yes | node path to be queried |
descendants | no | Number of descendants to be queried. default is none |
pageIndex | no | page index starting from 1. |
anchorSize | no | number of anchors per page starting from 1 (TBD). |