| GET | /v1/forms/{FormUID}/versions |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class FormVersionRow implements IConvertible
{
int? VersionNo;
DateTime? PublishedAt;
String? PublishedBy;
String? Notes;
List<String>? Changes = [];
bool? IsLive;
int? Submissions;
FormVersionRow({this.VersionNo,this.PublishedAt,this.PublishedBy,this.Notes,this.Changes,this.IsLive,this.Submissions});
FormVersionRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
VersionNo = json['VersionNo'];
PublishedAt = JsonConverters.fromJson(json['PublishedAt'],'DateTime',context!);
PublishedBy = json['PublishedBy'];
Notes = json['Notes'];
Changes = JsonConverters.fromJson(json['Changes'],'List<String>',context!);
IsLive = json['IsLive'];
Submissions = json['Submissions'];
return this;
}
Map<String, dynamic> toJson() => {
'VersionNo': VersionNo,
'PublishedAt': JsonConverters.toJson(PublishedAt,'DateTime',context!),
'PublishedBy': PublishedBy,
'Notes': Notes,
'Changes': JsonConverters.toJson(Changes,'List<String>',context!),
'IsLive': IsLive,
'Submissions': Submissions
};
getTypeName() => "FormVersionRow";
TypeContext? context = _ctx;
}
class FormVersionsResponse implements IConvertible
{
List<FormVersionRow>? Versions = [];
List<String>? DraftChanges = [];
ResponseStatus? ResponseStatus;
FormVersionsResponse({this.Versions,this.DraftChanges,this.ResponseStatus});
FormVersionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Versions = JsonConverters.fromJson(json['Versions'],'List<FormVersionRow>',context!);
DraftChanges = JsonConverters.fromJson(json['DraftChanges'],'List<String>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Versions': JsonConverters.toJson(Versions,'List<FormVersionRow>',context!),
'DraftChanges': JsonConverters.toJson(DraftChanges,'List<String>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormVersionsResponse";
TypeContext? context = _ctx;
}
class FormVersionsRequest implements IConvertible
{
String? FormUID;
FormVersionsRequest({this.FormUID});
FormVersionsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID
};
getTypeName() => "FormVersionsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormVersionRow': TypeInfo(TypeOf.Class, create:() => FormVersionRow()),
'FormVersionsResponse': TypeInfo(TypeOf.Class, create:() => FormVersionsResponse()),
'List<FormVersionRow>': TypeInfo(TypeOf.Class, create:() => <FormVersionRow>[]),
'FormVersionsRequest': TypeInfo(TypeOf.Class, create:() => FormVersionsRequest()),
});
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/forms/{FormUID}/versions HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormVersionsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<DraftChanges xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</DraftChanges>
<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>
<Versions>
<FormVersionRow>
<Changes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</Changes>
<IsLive>false</IsLive>
<Notes>String</Notes>
<PublishedAt>0001-01-01T00:00:00</PublishedAt>
<PublishedBy>String</PublishedBy>
<Submissions>0</Submissions>
<VersionNo>0</VersionNo>
</FormVersionRow>
</Versions>
</FormVersionsResponse>