All URIs are relative to the master’s API URL
Method | HTTP request | Description |
---|---|---|
saveTemporaryFile | POST /files | Creates a temporary file on server side for later use. |
FileDefinition saveTemporaryFile(body, name)
Creates a temporary file on server side for later use.
Save a file on the server and returns it's id, you can use it later but the file is deleted after a short period if not used.
// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.FileApi;
FileApi apiInstance = new FileApi();
File body = new File("/path/to/file"); // File |
String name = "name_example"; // String | Optional parameter to give a name of the file (essentially to give a hint about the content of the file).
try {
FileDefinition result = apiInstance.saveTemporaryFile(body, name);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FileApi#saveTemporaryFile");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | File | ||
name | String | Optional parameter to give a name of the file (essentially to give a hint about the content of the file). | optional |
No authorization required