You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 NameObjectiveExamples
selectTo query only selected fields for a given cps-path. 

?select=title, price

?select=name, price.gt.100







References

Tables and Views — PostgREST 12.0 documentation

  • No labels