Store APIs¶
Query records in Siddhi store¶
Overview¶
Description | Queries records in the Siddhi store. For more information, see [Integrating Data Stores in Streaming Integration](https://apim.docs.wso2.com/en/4.0.0/use-cases/streaming-tutorials/integrating-stores#perform-crud-operations-via-rest-api). |
---|---|
API Context | /stores/query |
HTTP Method | POST |
Request/Response format | application/json |
Authentication | Basic |
Username | admin |
Password | admin |
Runtime | server/tooling |
curl command syntax¶
curl -X POST https://localhost:9443/stores/query -H "content-type: application/json" -u "admin:admin" -d '{"appName" : "AggregationTest", "query" : "from stockAggregation select *" }' -k
Sample curl command¶
curl -X POST https://localhost:7443/stores/query -H "content-type: application/json" -u "admin:admin" -d '{"appName" : "ApiRequestSummary", "query" : "from API_REQUEST_SUMMARY within 1586249325000L, 1586335725000L per \"days\" select userId, apiPublisher, sum(totalRequestCount) as net_total_requests group by userId, apiPublisher order by net_total_requests DESC;" }' -k
Sample output¶
{"records":[["admin","admin",66]]}
Response¶
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes . |
---|