This documentation is for WSO2 Stream Processor 4.3.0. View documentation for the latest release.

All docs This doc
                                                                                                                                                                                                                                                                                                               
||
Skip to end of metadata
Go to start of metadata

Query records in Siddhi store

Overview

DescriptionQueries records in the Siddhi store. For more information, see Managing Stored Data via REST APIs.
API Context/stores/query
HTTP MethodPOST
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeWorker/ Editor

curl command syntax

curl -X POST <protocol>://<host>:<port>/stores/query -H "content-type: application/json" -u "<username>:<password>" -d '{"appName" : "<SiddhiAppName>", "query" : "<Siddhi Select Query>" }'


Sample curl command for Worker profile

The following is a sample curl command to issue when the Siddhi application is deployed and run in the Worker profile. For more information, see WSO2 Stream Processor Profiles.

curl -X POST https://localhost:7443/stores/query -H "content-type: application/json" -u "admin:admin" -d '{"appName" : "RoomService", "query" : "select 10 as roomNumber, 1 as arrival update RoomTypeTable  set RoomTypeTable.people = RoomTypeTable.people + arrival on RoomTypeTable.roomNo == roomNumber;" }' -k

Sample curl command for Editor profile

The following is a sample curl command to issue when the Siddhi application is deployed and run in the Editor profile. For more information, see WSO2 Stream Processor Profiles.

curl -X POST http://localhost:7370/stores/query -H "content-type: application/json" -d '{"appName" : "RoomService", "query" : "select 10 as roomNumber, 1 as arrival update RoomTypeTable  set RoomTypeTable.people = RoomTypeTable.people + arrival on RoomTypeTable.roomNo == roomNumber;" }'

Sample output

{
records: []
}

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels