| GET,OPTIONS | /v1/engine/runs |
|---|
import 'package:servicestack/servicestack.dart';
class WorkflowRunStepView implements IConvertible
{
int? StepId;
String? NodeId;
String? Name;
String? Kind;
String? Status;
int? DurationMs;
String? Input;
String? Output;
String? Note;
String? BranchReason;
int? Attempts;
WorkflowRunStepView({this.StepId,this.NodeId,this.Name,this.Kind,this.Status,this.DurationMs,this.Input,this.Output,this.Note,this.BranchReason,this.Attempts});
WorkflowRunStepView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
StepId = json['StepId'];
NodeId = json['NodeId'];
Name = json['Name'];
Kind = json['Kind'];
Status = json['Status'];
DurationMs = json['DurationMs'];
Input = json['Input'];
Output = json['Output'];
Note = json['Note'];
BranchReason = json['BranchReason'];
Attempts = json['Attempts'];
return this;
}
Map<String, dynamic> toJson() => {
'StepId': StepId,
'NodeId': NodeId,
'Name': Name,
'Kind': Kind,
'Status': Status,
'DurationMs': DurationMs,
'Input': Input,
'Output': Output,
'Note': Note,
'BranchReason': BranchReason,
'Attempts': Attempts
};
getTypeName() => "WorkflowRunStepView";
TypeContext? context = _ctx;
}
class WorkflowRunView implements IConvertible
{
int? RunId;
String? RunKey;
int? WorkflowId;
String? WorkflowName;
int? VersionNum;
String? Status;
String? RecordLabel;
String? RecordHref;
String? WaitReason;
DateTime? RunAfter;
int? Attempts;
int? MaxAttempts;
DateTime? StartedAt;
DateTime? FinishedAt;
int? DurationMs;
List<WorkflowRunStepView>? Steps = [];
WorkflowRunView({this.RunId,this.RunKey,this.WorkflowId,this.WorkflowName,this.VersionNum,this.Status,this.RecordLabel,this.RecordHref,this.WaitReason,this.RunAfter,this.Attempts,this.MaxAttempts,this.StartedAt,this.FinishedAt,this.DurationMs,this.Steps});
WorkflowRunView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RunId = json['RunId'];
RunKey = json['RunKey'];
WorkflowId = json['WorkflowId'];
WorkflowName = json['WorkflowName'];
VersionNum = json['VersionNum'];
Status = json['Status'];
RecordLabel = json['RecordLabel'];
RecordHref = json['RecordHref'];
WaitReason = json['WaitReason'];
RunAfter = JsonConverters.fromJson(json['RunAfter'],'DateTime',context!);
Attempts = json['Attempts'];
MaxAttempts = json['MaxAttempts'];
StartedAt = JsonConverters.fromJson(json['StartedAt'],'DateTime',context!);
FinishedAt = JsonConverters.fromJson(json['FinishedAt'],'DateTime',context!);
DurationMs = json['DurationMs'];
Steps = JsonConverters.fromJson(json['Steps'],'List<WorkflowRunStepView>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'RunId': RunId,
'RunKey': RunKey,
'WorkflowId': WorkflowId,
'WorkflowName': WorkflowName,
'VersionNum': VersionNum,
'Status': Status,
'RecordLabel': RecordLabel,
'RecordHref': RecordHref,
'WaitReason': WaitReason,
'RunAfter': JsonConverters.toJson(RunAfter,'DateTime',context!),
'Attempts': Attempts,
'MaxAttempts': MaxAttempts,
'StartedAt': JsonConverters.toJson(StartedAt,'DateTime',context!),
'FinishedAt': JsonConverters.toJson(FinishedAt,'DateTime',context!),
'DurationMs': DurationMs,
'Steps': JsonConverters.toJson(Steps,'List<WorkflowRunStepView>',context!)
};
getTypeName() => "WorkflowRunView";
TypeContext? context = _ctx;
}
class EngineRunsResponse implements IConvertible
{
List<WorkflowRunView>? Runs = [];
ResponseStatus? ResponseStatus;
EngineRunsResponse({this.Runs,this.ResponseStatus});
EngineRunsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Runs = JsonConverters.fromJson(json['Runs'],'List<WorkflowRunView>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Runs': JsonConverters.toJson(Runs,'List<WorkflowRunView>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "EngineRunsResponse";
TypeContext? context = _ctx;
}
class EngineRunsRequest implements IConvertible
{
String? Status;
int? WorkflowId;
int? Top;
EngineRunsRequest({this.Status,this.WorkflowId,this.Top});
EngineRunsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Status = json['Status'];
WorkflowId = json['WorkflowId'];
Top = json['Top'];
return this;
}
Map<String, dynamic> toJson() => {
'Status': Status,
'WorkflowId': WorkflowId,
'Top': Top
};
getTypeName() => "EngineRunsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'WorkflowRunStepView': TypeInfo(TypeOf.Class, create:() => WorkflowRunStepView()),
'WorkflowRunView': TypeInfo(TypeOf.Class, create:() => WorkflowRunView()),
'List<WorkflowRunStepView>': TypeInfo(TypeOf.Class, create:() => <WorkflowRunStepView>[]),
'EngineRunsResponse': TypeInfo(TypeOf.Class, create:() => EngineRunsResponse()),
'List<WorkflowRunView>': TypeInfo(TypeOf.Class, create:() => <WorkflowRunView>[]),
'EngineRunsRequest': TypeInfo(TypeOf.Class, create:() => EngineRunsRequest()),
});
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>