FlowApi

FlowApi

All URIs are relative to https://dbos

Method HTTP request Description
createFlow POST /jobFlows Creates a new Flow, and returns its ID for later use.
getJobDefinitionsByFlow GET /jobFlows/{flowId}/jobs Returns job definitions for the given flow ID.
getJobFlow GET /jobFlows/{flowId} Returns a Flow with the given ID, if any.
getJobFlows GET /jobFlows Returns all known flows.

createFlow

JobFlow createFlow(rootJobId)

Creates a new Flow, and returns its ID for later use.

This API creates a new Flow, optionally for an existing Job, and returns the new Flow. If a root Job is provided, and is already associated with a Flow, no flow is created, but the existing Flow is returned instead.

Example

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


FlowApi apiInstance = new FlowApi();
String rootJobId = "rootJobId_example"; // String | Identifier of the existing Job that should be the root of the new Flow. If the root Job is already associated with a Flow, no flow is created, but the existing flow is returned instead. If the root Job does not have an associated flow yet, a new Flow is created and the given root Job is associated to this new Flow.
try {
    JobFlow result = apiInstance.createFlow(rootJobId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FlowApi#createFlow");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
rootJobId String Identifier of the existing Job that should be the root of the new Flow. If the root Job is already associated with a Flow, no flow is created, but the existing flow is returned instead. If the root Job does not have an associated flow yet, a new Flow is created and the given root Job is associated to this new Flow. optional

Return type

JobFlow

Authorization

No authorization required

HTTP request headers

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

getJobDefinitionsByFlow

List<JobDefinition> getJobDefinitionsByFlow(flowId)

Returns job definitions for the given flow ID.

This API allows you to retrieve job definitions by flow ID.

Example

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


FlowApi apiInstance = new FlowApi();
String flowId = "flowId_example"; // String | 
try {
    List<JobDefinition> result = apiInstance.getJobDefinitionsByFlow(flowId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FlowApi#getJobDefinitionsByFlow");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
flowId String

Return type

List<JobDefinition>

Authorization

No authorization required

HTTP request headers

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

getJobFlow

JobFlow getJobFlow(flowId)

Returns a Flow with the given ID, if any.

This API allows you to retrieve a flow.

Example

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


FlowApi apiInstance = new FlowApi();
String flowId = "flowId_example"; // String | 
try {
    JobFlow result = apiInstance.getJobFlow(flowId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FlowApi#getJobFlow");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
flowId String

Return type

JobFlow

Authorization

No authorization required

HTTP request headers

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

getJobFlows

List<JobFlow> getJobFlows()

Returns all known flows.

This API allows you to retrieve all flows from the system.

Example

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


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

Parameters

This endpoint does not need any parameter.

Return type

List<JobFlow>

Authorization

No authorization required

HTTP request headers

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