Objective
CPS query API can be further improved to support more generic query parameters or request parameters where we can provide request input like JSON and that will be parsed to SQL query. these parameters are optional and provides more generic approach to query from large data.
So, we are proposing to use generic SQL query like request parameters along with cps-path for enhanced query operations. these parameters will be parsed to SQL statement for query operation.
API changes
Query Data nodes API will be enhanced with extra optional query parameter
API: GET http://<IP>:<PORT>/cps/v2/dataspaces/{dataspace-name}/anchor/{anchor-name}/nodes/query?select={generic_query_parameter}
Query parameters
Parameter Name | Objective | Examples |
---|---|---|
select | To query only selected fields for a given cps-path. | ?select=title, price ?select=name, price.gt.100 |