Java API
Typical APIs
Table 1 describes the typical methods of developing FusionInsight Manager REST APIs.
- The Java API implements basic authentication for login and returns the HttpClient after login. This way, only one API is invoked during the login, simplifying the usage process.
- The API input parameters are obtained from the configuration file UserInfo.properties. Users need to set the parameters in the file. The Java API also invokes multiple methods of the BasicAuthAccess class.
Method |
Description |
---|---|
sendHttpGetRequest(HttpClient httpClient, String operationUrl, String operationName) |
|
sendHttpPostRequest(HttpClient httpClient, String operationUrl, String jsonFilePath, String operationName) |
|
sendHttpPostRequestWithString(HttpClient httpClient, String operationUrl, String jsonString, String operationName) |
|
sendHttpPutRequest(HttpClient httpclient, String operationUrl, String jsonFilePath, String operationName) |
|
sendHttpPutRequestWithString(HttpClient httpclient, String operationUrl, String jsonString, String operationName) |
|
sendHttpDeleteRequest(HttpClient httpClient, String operationUrl, String jsonString, String operationName) |
- APIs in the table are used to send HTTP requests. To invoke the APIs, users only need to provide the URLs corresponding to each type of operations, and JSON files corresponding to the operations or JSON string formats. In this way, no intermediate execution code is required, reducing the code compilation workload and simplifying operation procedures.
- The APIs return the command ID corresponding to the requests. Based on the command IDs, users can query the command execution progress.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.