24 | | * rasql queries can also be invoked via a Web service by default listening at `localhost:8080/rasdaman/rasql`. To this end, the corresponding servlet needs to be started (see [browser:manuals_and_examples/manuals/doc-guides/inst-guide.pdf Installation Guide]). |
| 24 | * '''rasql queries''' can also be invoked via a Web service by default listening at `localhost:8080/rasdaman/rasql`. To this end, the corresponding servlet needs to be started (see [browser:manuals_and_examples/manuals/doc-guides/inst-guide.pdf Installation Guide]). |
| 25 | + Syntax: http://{service}/{path}/rasdaman/rasql?params (e.g: http://www.acme.com/rasdaman?query=select rgb.red rgb.green from rgb&username=rasguest |
| 26 | &password=rasguest) |
| 27 | + This servlet endpoint accepts KVP requests with the following parameters: |
| 28 | * query=q where q is a valid rasql query, appropriately escaped as per http specification. |
| 29 | * username=u where u is the user name for logging into rasdaman (current: rasguest for retrieval query (select) and rasadmin for the editting query (insert, update, delete,...). |
| 30 | * password=p where p is the password for logging into rasdaman (current: rasguest for username: rasguest and rasadmin for username: rasadmin). |
| 31 | + To upload data to server, it is needed to attach the data in HTTP message's body and send the POST request to the Servlet endpoint. In Linux, one tool can support this feature is cURL. Here is an example: |
| 32 | |
| 33 | {{{ |
| 34 | curl -F 'image=/home/rasdaman/rasdaman/systemtest/testcases_services/test_all_wcst_import/test_data/wcps_mr/mr_1.png' 'http://localhost:8080/rasdaman/rasql?username=rasadmin&password=rasadmin&query=update%20test_mr_test1%20set%20mr_test1%20assign%20decode(%241)' |
| 35 | }}} |
| 36 | |