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)' |
| 25 | * Syntax: |
| 26 | {{{ |
| 27 | http://{service}/{path}/rasdaman/rasql?params |
| 28 | |
| 29 | Example: |
| 30 | http://www.acme.com/rasdaman?query=select%20rgb.red+rgb.green%20from%20rgb&username=rasguest&password=rasguest |
| 31 | }}} |
| 32 | * This servlet endpoint accepts KVP requests with the following parameters: |
| 33 | * ''query=q'' where q is a valid rasql query, appropriately escaped as per http pecification. |
| 34 | * ''username=u'' where u is the user name for logging into rasdaman (current: ''rasguest'' for retrieval query (select) and ''rasadmin'' for the editable query (insert, update, delete,...). |
| 35 | * ''password=p'' where p is the password for logging into rasdaman (current: ''rasguest'' for username: ''rasguest'' and ''rasadmin'' for username: ''rasadmin''). |
| 36 | * 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 with user have the write permission (e.g: rasadmin). In Linux, one tool can support this feature is cURL. Syntax: |
| 37 | {{{ |
| 38 | curl -F 'image=@{/Path_To_Image}' '{http://Rasql_Servlet_Endpoint?username=rasadmin&password=rasadmin&query={insert/update query}' |
| 39 | }}} |
| 40 | * Here is an example: |
| 41 | {{{ |
| 42 | Collection: test_mr_test1 |
| 43 | |
| 44 | Insert file to collection: |
| 45 | 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=insert%20into%20test_mr_test1%20values%20decode(%241)' |
| 46 | |
| 47 | Update file to collection: |
| 48 | 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%20test_mr_test1%20assign%20decode(%241)' |
| 49 | |