|
|
|
@ -71,6 +71,18 @@ public class DatasourceOperation {
|
|
|
|
|
HttpKits.post(String.format("%s/api/v1/datasource/table/upload/finish", ProjectConstants.BASE_URI), headers(), entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void deleteTable(String tableId) throws Exception { |
|
|
|
|
JSONObject body = new JSONObject(); |
|
|
|
|
body.put("tableId", tableId); |
|
|
|
|
HttpEntity entity = new StringEntity(body.toString(), StandardCharsets.UTF_8); |
|
|
|
|
HttpKits.post(String.format("%s/api/v1/datasource/table/delete", ProjectConstants.BASE_URI), headers(), entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void reset() throws Exception { |
|
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
|
HttpKits.post(String.format("%s/api/v1/datasource/reset", ProjectConstants.BASE_URI), headers(), params); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Map<String, String> headers() throws Exception { |
|
|
|
|
Map<String, String> headers = new HashMap<>(); |
|
|
|
|
headers.put("Authorization", auth.getToken()); |
|
|
|
|