Changes between Version 30 and Version 31 of Clients


Ignore:
Timestamp:
Oct 11, 2016, 8:07:13 AM (8 years ago)
Author:
Bang Pham Huu
Comment:

add Rasql Servlet description with detail.

Legend:

Unmodified
Added
Removed
Modified
  • Clients

    v30 v31  
    2323}}}
    2424* '''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)'
     25 * Syntax:
     26{{{
     27http://{service}/{path}/rasdaman/rasql?params
     28
     29Example:
     30http://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{{{
     38curl -F 'image=@{/Path_To_Image}' '{http://Rasql_Servlet_Endpoint?username=rasadmin&password=rasadmin&query={insert/update query}'
     39}}}
     40   * Here is an example:
     41{{{
     42Collection: test_mr_test1
     43
     44Insert file to collection:
     45curl -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
     47Update file to collection:
     48curl -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
    3550}}}
    3651