REST API documentation Page

IP Address: http://52.1.107.126/
restBaseUrl: http://52.1.107.126:7654/

You can find both the art and science of creating REST Web services in the following webpage.
http://www.restapitutorial.com/

Build Index

Receive: new datasource request and corresponding database schema.
Function: automatically build index, and store index in local database for other users’ retrieval

url: restBaseUrl + "/Index"
type: 'PUT'
data: { id, dbType, ipAddress, port, username, password, dbName, title, description, tables: [ { tableName, columns: [ { columnName } ] } ] }
dataType: 'json'
contentType: "application/json"
Input instance:
{"id": 1, "IPAddress": "ip1", "port": 123, "DBname": "dbName1", "username": "username1", "password": "password1", "DBtype": "MySQL", "tables": [ { "tableName" : "test", "columns": [ { "columnName": "field" } ] } ] }

Search Keywords

Input: key words (combining with whitespace)
Output: key words’ information (database name, table name, column name)

url: restBaseUrl + "Index/"+ yourkeywords,
type: 'GET',
dataType: 'json',
contentType: "application/json",
Url instance: http://52.1.107.126:7654/Index/chi%20hao
Ouput instance:
{"columnName":"firstname","databaseName":"0","id":957,"tableName":"person","term":"Ming"},
{"columnName":"firstname","databaseName":"0","id":958,"tableName":"person","term":"Hao"}

Show all Keywords

Output: all key words’ information (database name, table name, column name)

url: restBaseUrl + "Index/" ,
type: 'GET',
dataType: 'json',
contentType: "application/json",
Url instance: http://52.1.107.126:7654/Index/
Output instance:
{"columnName":"firstname","databaseName":"0","id":957,"tableName":"person","term":"Ming"},
{"columnName":"firstname","databaseName":"0","id":958,"tableName":"person","term":"Hao"}