-
Notifications
You must be signed in to change notification settings - Fork 20
Rest api
johnchronis edited this page Mar 24, 2016
·
17 revisions
Through our REST API a user is able to:
- to request the execution plan from Exareme
- submit queries
- retrieve results
##Settings A POST request is used to perform any of the tasks described in Functionality.
- Exareme listens on port 9090
- Content Type should be application/x-www-form-uriencoded
- Every request should contain a form with the following values:
- db : path to the database
- query : the ExaDFL query/script
- mode : _json _or viz (applicable on when requesting the execution plan from Exareme
Note: an ExaDFL script can contain more than one queries separated by semi-column (;). At most one table can have as output a non temporary table.
##Endpoints
- http://<ip>:9090/query/ : to perform a query
- http://<ip>:9090/table/
- http://<ip>:9090/explain/ : to request the execution plan from Exareme
##Example
-
Select your favorite REST client. The following screenshots are from Advanced REST client add-on from chrome.
-
Issue a ExaDFL query.
- endpoint: http://<ip>:9090/query/
- db: /tmp/db
- query : create distributed table example_table as select * from range(100);
- Retrieve the contents of a table.
- endpoint: http://<ip>:9090/table/
- db: /tmp/db
- query : example_table
- Drop table
- endpoint: http://<ip>:9090/query/
- db: /tmp/db
- query : distributed drop table example_table;
##Notes The explain endpoint when used with the viz mode returns a html page that shows a graphic representation of the execution plan, same colors represent same workers.