All URIs are relative to the master’s API URL
Method | HTTP request | Description |
---|---|---|
createJob | POST /jobs | Creates a new asyncron Job (without starting it), and returns its ID for later use. |
deleteJob | DELETE /jobs/{jobId} | Deletes this job and cleans all related data. |
getJobDefinition | GET /jobs/{jobId} | Returns a job definition. |
getJobs | GET /jobs | Returns all current job definitions. |
JobDefinition createJob(jobCreation)
Creates a new asyncron Job (without starting it), and returns its ID for later use.
This API creates a new asyncron Job. The returned ID must be used for further requests like register events/submit/stop/delete the job.
// Import classes:
//import com.decisionbrain.optimserver.client.java.jersey2.ApiException;
//import com.decisionbrain.optimserver.client.java.jersey2.api.JobApi;
JobApi apiInstance = new JobApi();
JobCreation jobCreation = new JobCreation(); // JobCreation |
try {
JobDefinition result = apiInstance.createJob(jobCreation);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling JobApi#createJob");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
jobCreation | JobCreation |
No authorization required
String deleteJob(jobId)
Deletes this job and cleans all related data.
This API is to be called when your application is finished with this job. This will delete all related data like process, input data, response, etc.
// Import classes:
//import com.decisionbrain.optimserver.client.java.jersey2.ApiException;
//import com.decisionbrain.optimserver.client.java.jersey2.api.JobApi;
JobApi apiInstance = new JobApi();
String jobId = "jobId_example"; // String |
try {
String result = apiInstance.deleteJob(jobId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling JobApi#deleteJob");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
jobId | String |
String
No authorization required
JobDefinition getJobDefinition(jobId)
Returns a job definition.
This API allows you to retrieve a job definition.
// Import classes:
//import com.decisionbrain.optimserver.client.java.jersey2.ApiException;
//import com.decisionbrain.optimserver.client.java.jersey2.api.JobApi;
JobApi apiInstance = new JobApi();
String jobId = "jobId_example"; // String |
try {
JobDefinition result = apiInstance.getJobDefinition(jobId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling JobApi#getJobDefinition");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
jobId | String |
No authorization required
List<JobDefinition> getJobs()
Returns all current job definitions.
This API allows you to retrieve all current jobs from the system.
// Import classes:
//import com.decisionbrain.optimserver.client.java.jersey2.ApiException;
//import com.decisionbrain.optimserver.client.java.jersey2.api.JobApi;
JobApi apiInstance = new JobApi();
try {
List<JobDefinition> result = apiInstance.getJobs();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling JobApi#getJobs");
e.printStackTrace();
}
This endpoint does not need any parameter.
No authorization required