TaskApi

All URIs are relative to the master’s API URL

Method HTTP request Description
getTask GET /tasks/{taskId} Get a specific task details.
getTasks GET /tasks Get all known tasks.

getTask

Task getTask(taskId)

Get a specific task details.

This API retrieves the details for a specific task. If the task is known, but disabled (the worker is down), details can still be retrieved. This is, on purpose, not the same behaviour as the API to retrieve the list of tasks. This allows to get information about completed jobs derived from disabled tasks.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.TaskApi;


TaskApi apiInstance = new TaskApi();
String taskId = "taskId_example"; // String | 
try {
    Task result = apiInstance.getTask(taskId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TaskApi#getTask");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
taskId String

Return type

Task

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml

getTasks

List<Task> getTasks()

Get all known tasks.

This API allows you to retrieve all currently known tasks in the system. The list of tasks is an aggregate of all the taskIds supported by the connected workers.

Example

// Import classes:
//import com.decisionbrain.optimserver.client.java.resttemplate.ApiException;
//import com.decisionbrain.optimserver.client.java.resttemplate.api.TaskApi;


TaskApi apiInstance = new TaskApi();
try {
    List<Task> result = apiInstance.getTasks();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling TaskApi#getTasks");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<Task>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/xml