| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/cad/{AttachmentId}/reprocess |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CadLayout implements IConvertible
{
String? Name;
bool? IsPaperSpace;
CadLayout({this.Name,this.IsPaperSpace});
CadLayout.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
IsPaperSpace = json['IsPaperSpace'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'IsPaperSpace': IsPaperSpace
};
getTypeName() => "CadLayout";
TypeContext? context = _ctx;
}
class CadFileInfo implements IConvertible
{
int? CadFileInfoID;
String? AttachmentId;
int? VersionNo;
String? FileName;
String? Format;
String? FormatLabel;
String? CadVersion;
String? CadVersionCode;
String? Units;
String? DrawingNumber;
String? Title;
int? LayoutCount;
List<CadLayout>? Layouts = [];
int? LayerCount;
int? EntityCount;
int? TextChars;
String? ExtractedText;
String? Reader;
String? Status;
String? ErrorText;
DateTime? CreatedAt;
DateTime? UpdatedAt;
int? AgeSeconds;
CadFileInfo({this.CadFileInfoID,this.AttachmentId,this.VersionNo,this.FileName,this.Format,this.FormatLabel,this.CadVersion,this.CadVersionCode,this.Units,this.DrawingNumber,this.Title,this.LayoutCount,this.Layouts,this.LayerCount,this.EntityCount,this.TextChars,this.ExtractedText,this.Reader,this.Status,this.ErrorText,this.CreatedAt,this.UpdatedAt,this.AgeSeconds});
CadFileInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CadFileInfoID = json['CadFileInfoID'];
AttachmentId = json['AttachmentId'];
VersionNo = json['VersionNo'];
FileName = json['FileName'];
Format = json['Format'];
FormatLabel = json['FormatLabel'];
CadVersion = json['CadVersion'];
CadVersionCode = json['CadVersionCode'];
Units = json['Units'];
DrawingNumber = json['DrawingNumber'];
Title = json['Title'];
LayoutCount = json['LayoutCount'];
Layouts = JsonConverters.fromJson(json['Layouts'],'List<CadLayout>',context!);
LayerCount = json['LayerCount'];
EntityCount = json['EntityCount'];
TextChars = json['TextChars'];
ExtractedText = json['ExtractedText'];
Reader = json['Reader'];
Status = json['Status'];
ErrorText = json['ErrorText'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
AgeSeconds = json['AgeSeconds'];
return this;
}
Map<String, dynamic> toJson() => {
'CadFileInfoID': CadFileInfoID,
'AttachmentId': AttachmentId,
'VersionNo': VersionNo,
'FileName': FileName,
'Format': Format,
'FormatLabel': FormatLabel,
'CadVersion': CadVersion,
'CadVersionCode': CadVersionCode,
'Units': Units,
'DrawingNumber': DrawingNumber,
'Title': Title,
'LayoutCount': LayoutCount,
'Layouts': JsonConverters.toJson(Layouts,'List<CadLayout>',context!),
'LayerCount': LayerCount,
'EntityCount': EntityCount,
'TextChars': TextChars,
'ExtractedText': ExtractedText,
'Reader': Reader,
'Status': Status,
'ErrorText': ErrorText,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
'AgeSeconds': AgeSeconds
};
getTypeName() => "CadFileInfo";
TypeContext? context = _ctx;
}
class CadDerivative implements IConvertible
{
int? CadDerivativeID;
String? AttachmentId;
int? VersionNo;
String? Urn;
String? ObjectKey;
String? Status;
int? Progress;
String? StageLabel;
bool? Has2d;
bool? Has3d;
bool? HasPdf;
String? ThumbKey;
String? ThumbUrl;
String? PdfAttachmentId;
String? ErrorText;
String? RequestedBy;
DateTime? RequestedAt;
DateTime? FinishedAt;
int? AgeSeconds;
CadDerivative({this.CadDerivativeID,this.AttachmentId,this.VersionNo,this.Urn,this.ObjectKey,this.Status,this.Progress,this.StageLabel,this.Has2d,this.Has3d,this.HasPdf,this.ThumbKey,this.ThumbUrl,this.PdfAttachmentId,this.ErrorText,this.RequestedBy,this.RequestedAt,this.FinishedAt,this.AgeSeconds});
CadDerivative.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CadDerivativeID = json['CadDerivativeID'];
AttachmentId = json['AttachmentId'];
VersionNo = json['VersionNo'];
Urn = json['Urn'];
ObjectKey = json['ObjectKey'];
Status = json['Status'];
Progress = json['Progress'];
StageLabel = json['StageLabel'];
Has2d = json['Has2d'];
Has3d = json['Has3d'];
HasPdf = json['HasPdf'];
ThumbKey = json['ThumbKey'];
ThumbUrl = json['ThumbUrl'];
PdfAttachmentId = json['PdfAttachmentId'];
ErrorText = json['ErrorText'];
RequestedBy = json['RequestedBy'];
RequestedAt = JsonConverters.fromJson(json['RequestedAt'],'DateTime',context!);
FinishedAt = JsonConverters.fromJson(json['FinishedAt'],'DateTime',context!);
AgeSeconds = json['AgeSeconds'];
return this;
}
Map<String, dynamic> toJson() => {
'CadDerivativeID': CadDerivativeID,
'AttachmentId': AttachmentId,
'VersionNo': VersionNo,
'Urn': Urn,
'ObjectKey': ObjectKey,
'Status': Status,
'Progress': Progress,
'StageLabel': StageLabel,
'Has2d': Has2d,
'Has3d': Has3d,
'HasPdf': HasPdf,
'ThumbKey': ThumbKey,
'ThumbUrl': ThumbUrl,
'PdfAttachmentId': PdfAttachmentId,
'ErrorText': ErrorText,
'RequestedBy': RequestedBy,
'RequestedAt': JsonConverters.toJson(RequestedAt,'DateTime',context!),
'FinishedAt': JsonConverters.toJson(FinishedAt,'DateTime',context!),
'AgeSeconds': AgeSeconds
};
getTypeName() => "CadDerivative";
TypeContext? context = _ctx;
}
class CadCompanion implements IConvertible
{
String? AttachmentId;
String? AttachmentName;
DateTime? CreatedDate;
double? FileSizeInKB;
CadCompanion({this.AttachmentId,this.AttachmentName,this.CreatedDate,this.FileSizeInKB});
CadCompanion.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AttachmentId = json['AttachmentId'];
AttachmentName = json['AttachmentName'];
CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
FileSizeInKB = JsonConverters.toDouble(json['FileSizeInKB']);
return this;
}
Map<String, dynamic> toJson() => {
'AttachmentId': AttachmentId,
'AttachmentName': AttachmentName,
'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
'FileSizeInKB': FileSizeInKB
};
getTypeName() => "CadCompanion";
TypeContext? context = _ctx;
}
class CadInfoResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
String? AttachmentId;
String? FileName;
CadFileInfo? Info;
CadDerivative? Derivative;
List<CadCompanion>? Companions = [];
bool? ApsConnected;
bool? CanRender;
String? ViewerScriptUrl;
String? ViewerStyleUrl;
CadInfoResponse({this.ResponseStatus,this.AttachmentId,this.FileName,this.Info,this.Derivative,this.Companions,this.ApsConnected,this.CanRender,this.ViewerScriptUrl,this.ViewerStyleUrl});
CadInfoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
AttachmentId = json['AttachmentId'];
FileName = json['FileName'];
Info = JsonConverters.fromJson(json['Info'],'CadFileInfo',context!);
Derivative = JsonConverters.fromJson(json['Derivative'],'CadDerivative',context!);
Companions = JsonConverters.fromJson(json['Companions'],'List<CadCompanion>',context!);
ApsConnected = json['ApsConnected'];
CanRender = json['CanRender'];
ViewerScriptUrl = json['ViewerScriptUrl'];
ViewerStyleUrl = json['ViewerStyleUrl'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'AttachmentId': AttachmentId,
'FileName': FileName,
'Info': JsonConverters.toJson(Info,'CadFileInfo',context!),
'Derivative': JsonConverters.toJson(Derivative,'CadDerivative',context!),
'Companions': JsonConverters.toJson(Companions,'List<CadCompanion>',context!),
'ApsConnected': ApsConnected,
'CanRender': CanRender,
'ViewerScriptUrl': ViewerScriptUrl,
'ViewerStyleUrl': ViewerStyleUrl
};
getTypeName() => "CadInfoResponse";
TypeContext? context = _ctx;
}
class CadReprocessRequest implements IConvertible
{
String? AttachmentId;
int? VersionNo;
CadReprocessRequest({this.AttachmentId,this.VersionNo});
CadReprocessRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AttachmentId = json['AttachmentId'];
VersionNo = json['VersionNo'];
return this;
}
Map<String, dynamic> toJson() => {
'AttachmentId': AttachmentId,
'VersionNo': VersionNo
};
getTypeName() => "CadReprocessRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'CadLayout': TypeInfo(TypeOf.Class, create:() => CadLayout()),
'CadFileInfo': TypeInfo(TypeOf.Class, create:() => CadFileInfo()),
'List<CadLayout>': TypeInfo(TypeOf.Class, create:() => <CadLayout>[]),
'CadDerivative': TypeInfo(TypeOf.Class, create:() => CadDerivative()),
'CadCompanion': TypeInfo(TypeOf.Class, create:() => CadCompanion()),
'CadInfoResponse': TypeInfo(TypeOf.Class, create:() => CadInfoResponse()),
'List<CadCompanion>': TypeInfo(TypeOf.Class, create:() => <CadCompanion>[]),
'CadReprocessRequest': TypeInfo(TypeOf.Class, create:() => CadReprocessRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/cad/{AttachmentId}/reprocess HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"AttachmentId":"00000000000000000000000000000000","VersionNo":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"AttachmentId":"00000000000000000000000000000000","FileName":"String","Info":{"CadFileInfoID":0,"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"FileName":"String","Format":"String","FormatLabel":"String","CadVersion":"String","CadVersionCode":"String","Units":"String","DrawingNumber":"String","Title":"String","LayoutCount":0,"Layouts":[{"Name":"String","IsPaperSpace":false}],"LayerCount":0,"EntityCount":0,"TextChars":0,"ExtractedText":"String","Reader":"String","Status":"String","ErrorText":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","AgeSeconds":0},"Derivative":{"CadDerivativeID":0,"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"Urn":"String","ObjectKey":"String","Status":"String","Progress":0,"StageLabel":"String","Has2d":false,"Has3d":false,"HasPdf":false,"ThumbKey":"String","ThumbUrl":"String","PdfAttachmentId":"00000000000000000000000000000000","ErrorText":"String","RequestedBy":"String","RequestedAt":"0001-01-01T00:00:00.0000000","FinishedAt":"0001-01-01T00:00:00.0000000","AgeSeconds":0},"Companions":[{"AttachmentId":"00000000000000000000000000000000","AttachmentName":"String","CreatedDate":"0001-01-01T00:00:00.0000000","FileSizeInKB":0}],"ApsConnected":false,"CanRender":false,"ViewerScriptUrl":"String","ViewerStyleUrl":"String"}