| GET,OPTIONS | /v1/engine/runs |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class EngineRunsRequest
{
public String Status = null;
public Integer WorkflowId = null;
public Integer Top = null;
public String getStatus() { return Status; }
public EngineRunsRequest setStatus(String value) { this.Status = value; return this; }
public Integer getWorkflowId() { return WorkflowId; }
public EngineRunsRequest setWorkflowId(Integer value) { this.WorkflowId = value; return this; }
public Integer getTop() { return Top; }
public EngineRunsRequest setTop(Integer value) { this.Top = value; return this; }
}
public static class EngineRunsResponse
{
public ArrayList<WorkflowRunView> Runs = new ArrayList<WorkflowRunView>();
public ResponseStatus ResponseStatus = null;
public ArrayList<WorkflowRunView> getRuns() { return Runs; }
public EngineRunsResponse setRuns(ArrayList<WorkflowRunView> value) { this.Runs = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public EngineRunsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class WorkflowRunView
{
public Integer RunId = null;
public String RunKey = null;
public Integer WorkflowId = null;
public String WorkflowName = null;
public Integer VersionNum = null;
public String Status = null;
public String RecordLabel = null;
public String RecordHref = null;
public String WaitReason = null;
public Date RunAfter = null;
public Integer Attempts = null;
public Integer MaxAttempts = null;
public Date StartedAt = null;
public Date FinishedAt = null;
public Integer DurationMs = null;
public ArrayList<WorkflowRunStepView> Steps = new ArrayList<WorkflowRunStepView>();
public Integer getRunId() { return RunId; }
public WorkflowRunView setRunId(Integer value) { this.RunId = value; return this; }
public String getRunKey() { return RunKey; }
public WorkflowRunView setRunKey(String value) { this.RunKey = value; return this; }
public Integer getWorkflowId() { return WorkflowId; }
public WorkflowRunView setWorkflowId(Integer value) { this.WorkflowId = value; return this; }
public String getWorkflowName() { return WorkflowName; }
public WorkflowRunView setWorkflowName(String value) { this.WorkflowName = value; return this; }
public Integer getVersionNum() { return VersionNum; }
public WorkflowRunView setVersionNum(Integer value) { this.VersionNum = value; return this; }
public String getStatus() { return Status; }
public WorkflowRunView setStatus(String value) { this.Status = value; return this; }
public String getRecordLabel() { return RecordLabel; }
public WorkflowRunView setRecordLabel(String value) { this.RecordLabel = value; return this; }
public String getRecordHref() { return RecordHref; }
public WorkflowRunView setRecordHref(String value) { this.RecordHref = value; return this; }
public String getWaitReason() { return WaitReason; }
public WorkflowRunView setWaitReason(String value) { this.WaitReason = value; return this; }
public Date getRunAfter() { return RunAfter; }
public WorkflowRunView setRunAfter(Date value) { this.RunAfter = value; return this; }
public Integer getAttempts() { return Attempts; }
public WorkflowRunView setAttempts(Integer value) { this.Attempts = value; return this; }
public Integer getMaxAttempts() { return MaxAttempts; }
public WorkflowRunView setMaxAttempts(Integer value) { this.MaxAttempts = value; return this; }
public Date getStartedAt() { return StartedAt; }
public WorkflowRunView setStartedAt(Date value) { this.StartedAt = value; return this; }
public Date getFinishedAt() { return FinishedAt; }
public WorkflowRunView setFinishedAt(Date value) { this.FinishedAt = value; return this; }
public Integer getDurationMs() { return DurationMs; }
public WorkflowRunView setDurationMs(Integer value) { this.DurationMs = value; return this; }
public ArrayList<WorkflowRunStepView> getSteps() { return Steps; }
public WorkflowRunView setSteps(ArrayList<WorkflowRunStepView> value) { this.Steps = value; return this; }
}
public static class WorkflowRunStepView
{
public Integer StepId = null;
public String NodeId = null;
public String Name = null;
public String Kind = null;
public String Status = null;
public Integer DurationMs = null;
public String Input = null;
public String Output = null;
public String Note = null;
public String BranchReason = null;
public Integer Attempts = null;
public Integer getStepId() { return StepId; }
public WorkflowRunStepView setStepId(Integer value) { this.StepId = value; return this; }
public String getNodeId() { return NodeId; }
public WorkflowRunStepView setNodeId(String value) { this.NodeId = value; return this; }
public String getName() { return Name; }
public WorkflowRunStepView setName(String value) { this.Name = value; return this; }
public String getKind() { return Kind; }
public WorkflowRunStepView setKind(String value) { this.Kind = value; return this; }
public String getStatus() { return Status; }
public WorkflowRunStepView setStatus(String value) { this.Status = value; return this; }
public Integer getDurationMs() { return DurationMs; }
public WorkflowRunStepView setDurationMs(Integer value) { this.DurationMs = value; return this; }
public String getInput() { return Input; }
public WorkflowRunStepView setInput(String value) { this.Input = value; return this; }
public String getOutput() { return Output; }
public WorkflowRunStepView setOutput(String value) { this.Output = value; return this; }
public String getNote() { return Note; }
public WorkflowRunStepView setNote(String value) { this.Note = value; return this; }
public String getBranchReason() { return BranchReason; }
public WorkflowRunStepView setBranchReason(String value) { this.BranchReason = value; return this; }
public Integer getAttempts() { return Attempts; }
public WorkflowRunStepView setAttempts(Integer value) { this.Attempts = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/engine/runs HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Runs:
[
{
RunId: 0,
RunKey: String,
WorkflowId: 0,
WorkflowName: String,
VersionNum: 0,
Status: String,
RecordLabel: String,
RecordHref: String,
WaitReason: String,
RunAfter: 0001-01-01,
Attempts: 0,
MaxAttempts: 0,
StartedAt: 0001-01-01,
FinishedAt: 0001-01-01,
DurationMs: 0,
Steps:
[
{
StepId: 0,
NodeId: String,
Name: String,
Kind: String,
Status: String,
DurationMs: 0,
Input: String,
Output: String,
Note: String,
BranchReason: String,
Attempts: 0
}
]
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}