Trendsic Platform Service

<back to all web services

CadReprocessRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
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()),
});

Dart CadReprocessRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<CadReprocessRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
  <VersionNo>0</VersionNo>
</CadReprocessRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CadInfoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ApsConnected>false</ApsConnected>
  <AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
  <CanRender>false</CanRender>
  <Companions>
    <CadCompanion>
      <AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
      <AttachmentName>String</AttachmentName>
      <CreatedDate>0001-01-01T00:00:00</CreatedDate>
      <FileSizeInKB>0</FileSizeInKB>
    </CadCompanion>
  </Companions>
  <Derivative>
    <AgeSeconds>0</AgeSeconds>
    <AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
    <CadDerivativeID>0</CadDerivativeID>
    <ErrorText>String</ErrorText>
    <FinishedAt>0001-01-01T00:00:00</FinishedAt>
    <Has2d>false</Has2d>
    <Has3d>false</Has3d>
    <HasPdf>false</HasPdf>
    <ObjectKey>String</ObjectKey>
    <PdfAttachmentId>00000000-0000-0000-0000-000000000000</PdfAttachmentId>
    <Progress>0</Progress>
    <RequestedAt>0001-01-01T00:00:00</RequestedAt>
    <RequestedBy>String</RequestedBy>
    <StageLabel>String</StageLabel>
    <Status>String</Status>
    <ThumbKey>String</ThumbKey>
    <ThumbUrl>String</ThumbUrl>
    <Urn>String</Urn>
    <VersionNo>0</VersionNo>
  </Derivative>
  <FileName>String</FileName>
  <Info>
    <AgeSeconds>0</AgeSeconds>
    <AttachmentId>00000000-0000-0000-0000-000000000000</AttachmentId>
    <CadFileInfoID>0</CadFileInfoID>
    <CadVersion>String</CadVersion>
    <CadVersionCode>String</CadVersionCode>
    <CreatedAt>0001-01-01T00:00:00</CreatedAt>
    <DrawingNumber>String</DrawingNumber>
    <EntityCount>0</EntityCount>
    <ErrorText>String</ErrorText>
    <ExtractedText>String</ExtractedText>
    <FileName>String</FileName>
    <Format>String</Format>
    <FormatLabel>String</FormatLabel>
    <LayerCount>0</LayerCount>
    <LayoutCount>0</LayoutCount>
    <Layouts>
      <CadLayout>
        <IsPaperSpace>false</IsPaperSpace>
        <Name>String</Name>
      </CadLayout>
    </Layouts>
    <Reader>String</Reader>
    <Status>String</Status>
    <TextChars>0</TextChars>
    <Title>String</Title>
    <Units>String</Units>
    <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    <VersionNo>0</VersionNo>
  </Info>
  <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>
  <ViewerScriptUrl>String</ViewerScriptUrl>
  <ViewerStyleUrl>String</ViewerStyleUrl>
</CadInfoResponse>