| 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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<EngineRunsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Runs>
<WorkflowRunView>
<Attempts>0</Attempts>
<DurationMs>0</DurationMs>
<FinishedAt>0001-01-01T00:00:00</FinishedAt>
<MaxAttempts>0</MaxAttempts>
<RecordHref>String</RecordHref>
<RecordLabel>String</RecordLabel>
<RunAfter>0001-01-01T00:00:00</RunAfter>
<RunId>0</RunId>
<RunKey>String</RunKey>
<StartedAt>0001-01-01T00:00:00</StartedAt>
<Status>String</Status>
<Steps>
<WorkflowRunStepView>
<Attempts>0</Attempts>
<BranchReason>String</BranchReason>
<DurationMs>0</DurationMs>
<Input>String</Input>
<Kind>String</Kind>
<Name>String</Name>
<NodeId>String</NodeId>
<Note>String</Note>
<Output>String</Output>
<Status>String</Status>
<StepId>0</StepId>
</WorkflowRunStepView>
</Steps>
<VersionNum>0</VersionNum>
<WaitReason>String</WaitReason>
<WorkflowId>0</WorkflowId>
<WorkflowName>String</WorkflowName>
</WorkflowRunView>
</Runs>
</EngineRunsResponse>