| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/cad/{AttachmentId}/reprocess |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CadReprocessRequest
{
public UUID AttachmentId = null;
public Integer VersionNo = null;
public UUID getAttachmentId() { return AttachmentId; }
public CadReprocessRequest setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public Integer getVersionNo() { return VersionNo; }
public CadReprocessRequest setVersionNo(Integer value) { this.VersionNo = value; return this; }
}
public static class CadInfoResponse
{
public ResponseStatus ResponseStatus = null;
public UUID AttachmentId = null;
public String FileName = null;
public CadFileInfo Info = null;
public CadDerivative Derivative = null;
public ArrayList<CadCompanion> Companions = new ArrayList<CadCompanion>();
public Boolean ApsConnected = null;
public Boolean CanRender = null;
public String ViewerScriptUrl = null;
public String ViewerStyleUrl = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public CadInfoResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public UUID getAttachmentId() { return AttachmentId; }
public CadInfoResponse setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public String getFileName() { return FileName; }
public CadInfoResponse setFileName(String value) { this.FileName = value; return this; }
public CadFileInfo getInfo() { return Info; }
public CadInfoResponse setInfo(CadFileInfo value) { this.Info = value; return this; }
public CadDerivative getDerivative() { return Derivative; }
public CadInfoResponse setDerivative(CadDerivative value) { this.Derivative = value; return this; }
public ArrayList<CadCompanion> getCompanions() { return Companions; }
public CadInfoResponse setCompanions(ArrayList<CadCompanion> value) { this.Companions = value; return this; }
public Boolean isApsConnected() { return ApsConnected; }
public CadInfoResponse setApsConnected(Boolean value) { this.ApsConnected = value; return this; }
public Boolean isCanRender() { return CanRender; }
public CadInfoResponse setCanRender(Boolean value) { this.CanRender = value; return this; }
public String getViewerScriptUrl() { return ViewerScriptUrl; }
public CadInfoResponse setViewerScriptUrl(String value) { this.ViewerScriptUrl = value; return this; }
public String getViewerStyleUrl() { return ViewerStyleUrl; }
public CadInfoResponse setViewerStyleUrl(String value) { this.ViewerStyleUrl = value; return this; }
}
public static class CadFileInfo
{
public Integer CadFileInfoID = null;
public UUID AttachmentId = null;
public Integer VersionNo = null;
public String FileName = null;
public String Format = null;
public String FormatLabel = null;
public String CadVersion = null;
public String CadVersionCode = null;
public String Units = null;
public String DrawingNumber = null;
public String Title = null;
public Integer LayoutCount = null;
public ArrayList<CadLayout> Layouts = new ArrayList<CadLayout>();
public Integer LayerCount = null;
public Integer EntityCount = null;
public Integer TextChars = null;
public String ExtractedText = null;
public String Reader = null;
public String Status = null;
public String ErrorText = null;
public Date CreatedAt = null;
public Date UpdatedAt = null;
public Integer AgeSeconds = null;
public Integer getCadFileInfoID() { return CadFileInfoID; }
public CadFileInfo setCadFileInfoID(Integer value) { this.CadFileInfoID = value; return this; }
public UUID getAttachmentId() { return AttachmentId; }
public CadFileInfo setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public Integer getVersionNo() { return VersionNo; }
public CadFileInfo setVersionNo(Integer value) { this.VersionNo = value; return this; }
public String getFileName() { return FileName; }
public CadFileInfo setFileName(String value) { this.FileName = value; return this; }
public String getFormat() { return Format; }
public CadFileInfo setFormat(String value) { this.Format = value; return this; }
public String getFormatLabel() { return FormatLabel; }
public CadFileInfo setFormatLabel(String value) { this.FormatLabel = value; return this; }
public String getCadVersion() { return CadVersion; }
public CadFileInfo setCadVersion(String value) { this.CadVersion = value; return this; }
public String getCadVersionCode() { return CadVersionCode; }
public CadFileInfo setCadVersionCode(String value) { this.CadVersionCode = value; return this; }
public String getUnits() { return Units; }
public CadFileInfo setUnits(String value) { this.Units = value; return this; }
public String getDrawingNumber() { return DrawingNumber; }
public CadFileInfo setDrawingNumber(String value) { this.DrawingNumber = value; return this; }
public String getTitle() { return Title; }
public CadFileInfo setTitle(String value) { this.Title = value; return this; }
public Integer getLayoutCount() { return LayoutCount; }
public CadFileInfo setLayoutCount(Integer value) { this.LayoutCount = value; return this; }
public ArrayList<CadLayout> getLayouts() { return Layouts; }
public CadFileInfo setLayouts(ArrayList<CadLayout> value) { this.Layouts = value; return this; }
public Integer getLayerCount() { return LayerCount; }
public CadFileInfo setLayerCount(Integer value) { this.LayerCount = value; return this; }
public Integer getEntityCount() { return EntityCount; }
public CadFileInfo setEntityCount(Integer value) { this.EntityCount = value; return this; }
public Integer getTextChars() { return TextChars; }
public CadFileInfo setTextChars(Integer value) { this.TextChars = value; return this; }
public String getExtractedText() { return ExtractedText; }
public CadFileInfo setExtractedText(String value) { this.ExtractedText = value; return this; }
public String getReader() { return Reader; }
public CadFileInfo setReader(String value) { this.Reader = value; return this; }
public String getStatus() { return Status; }
public CadFileInfo setStatus(String value) { this.Status = value; return this; }
public String getErrorText() { return ErrorText; }
public CadFileInfo setErrorText(String value) { this.ErrorText = value; return this; }
public Date getCreatedAt() { return CreatedAt; }
public CadFileInfo setCreatedAt(Date value) { this.CreatedAt = value; return this; }
public Date getUpdatedAt() { return UpdatedAt; }
public CadFileInfo setUpdatedAt(Date value) { this.UpdatedAt = value; return this; }
public Integer getAgeSeconds() { return AgeSeconds; }
public CadFileInfo setAgeSeconds(Integer value) { this.AgeSeconds = value; return this; }
}
public static class CadLayout
{
public String Name = null;
public Boolean IsPaperSpace = null;
public String getName() { return Name; }
public CadLayout setName(String value) { this.Name = value; return this; }
public Boolean getIsPaperSpace() { return IsPaperSpace; }
public CadLayout setIsPaperSpace(Boolean value) { this.IsPaperSpace = value; return this; }
}
public static class CadDerivative
{
public Integer CadDerivativeID = null;
public UUID AttachmentId = null;
public Integer VersionNo = null;
public String Urn = null;
public String ObjectKey = null;
public String Status = null;
public Integer Progress = null;
public String StageLabel = null;
public Boolean Has2d = null;
public Boolean Has3d = null;
public Boolean HasPdf = null;
public String ThumbKey = null;
public String ThumbUrl = null;
public UUID PdfAttachmentId = null;
public String ErrorText = null;
public String RequestedBy = null;
public Date RequestedAt = null;
public Date FinishedAt = null;
public Integer AgeSeconds = null;
public Integer getCadDerivativeID() { return CadDerivativeID; }
public CadDerivative setCadDerivativeID(Integer value) { this.CadDerivativeID = value; return this; }
public UUID getAttachmentId() { return AttachmentId; }
public CadDerivative setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public Integer getVersionNo() { return VersionNo; }
public CadDerivative setVersionNo(Integer value) { this.VersionNo = value; return this; }
public String getUrn() { return Urn; }
public CadDerivative setUrn(String value) { this.Urn = value; return this; }
public String getObjectKey() { return ObjectKey; }
public CadDerivative setObjectKey(String value) { this.ObjectKey = value; return this; }
public String getStatus() { return Status; }
public CadDerivative setStatus(String value) { this.Status = value; return this; }
public Integer getProgress() { return Progress; }
public CadDerivative setProgress(Integer value) { this.Progress = value; return this; }
public String getStageLabel() { return StageLabel; }
public CadDerivative setStageLabel(String value) { this.StageLabel = value; return this; }
public Boolean isHas2d() { return Has2d; }
public CadDerivative setHas2d(Boolean value) { this.Has2d = value; return this; }
public Boolean isHas3d() { return Has3d; }
public CadDerivative setHas3d(Boolean value) { this.Has3d = value; return this; }
public Boolean isHasPdf() { return HasPdf; }
public CadDerivative setHasPdf(Boolean value) { this.HasPdf = value; return this; }
public String getThumbKey() { return ThumbKey; }
public CadDerivative setThumbKey(String value) { this.ThumbKey = value; return this; }
public String getThumbUrl() { return ThumbUrl; }
public CadDerivative setThumbUrl(String value) { this.ThumbUrl = value; return this; }
public UUID getPdfAttachmentId() { return PdfAttachmentId; }
public CadDerivative setPdfAttachmentId(UUID value) { this.PdfAttachmentId = value; return this; }
public String getErrorText() { return ErrorText; }
public CadDerivative setErrorText(String value) { this.ErrorText = value; return this; }
public String getRequestedBy() { return RequestedBy; }
public CadDerivative setRequestedBy(String value) { this.RequestedBy = value; return this; }
public Date getRequestedAt() { return RequestedAt; }
public CadDerivative setRequestedAt(Date value) { this.RequestedAt = value; return this; }
public Date getFinishedAt() { return FinishedAt; }
public CadDerivative setFinishedAt(Date value) { this.FinishedAt = value; return this; }
public Integer getAgeSeconds() { return AgeSeconds; }
public CadDerivative setAgeSeconds(Integer value) { this.AgeSeconds = value; return this; }
}
public static class CadCompanion
{
public UUID AttachmentId = null;
public String AttachmentName = null;
public Date CreatedDate = null;
public Double FileSizeInKB = null;
public UUID getAttachmentId() { return AttachmentId; }
public CadCompanion setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public String getAttachmentName() { return AttachmentName; }
public CadCompanion setAttachmentName(String value) { this.AttachmentName = value; return this; }
public Date getCreatedDate() { return CreatedDate; }
public CadCompanion setCreatedDate(Date value) { this.CreatedDate = value; return this; }
public Double getFileSizeInKB() { return FileSizeInKB; }
public CadCompanion setFileSizeInKB(Double value) { this.FileSizeInKB = 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.
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>