Background
To query large outputs or large number of fragments across all anchors, we need to provide pagination for Query API( query data nodes across all anchors). it will help client to fetch limited set of data per request. below is possible solutions for further discussions.
Pagination over fragments
Implementation
API : GET http://<IP>:<PORT>/cps/api/v2/dataspaces/{dataspace-name}/nodes/query?cps-path={cps-path}&descendants={descendants}&pageIndex={pageIndex}&pageSize={pageSize}
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. |
pageSize | no | number of fragments per page starting from 1 (TBD). |