| Requires any of the roles: | Worker, Agent, Administrator |
| GET,OPTIONS | /v1/cad/{AttachmentId}/{VersionNo} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/cad/{AttachmentId} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CadInfoRequest
{
public UUID AttachmentId = null;
public Integer VersionNo = null;
public UUID getAttachmentId() { return AttachmentId; }
public CadInfoRequest setAttachmentId(UUID value) { this.AttachmentId = value; return this; }
public Integer getVersionNo() { return VersionNo; }
public CadInfoRequest 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 .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/cad/{AttachmentId}/{VersionNo} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
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"}