| Requires any of the roles: | Worker, Agent, Administrator |
| GET,OPTIONS | /v1/cad/{AttachmentId}/{VersionNo} | ||
|---|---|---|---|
| GET,OPTIONS | /v1/cad/{AttachmentId} |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class CadCompanion
Public Overridable Property AttachmentId As Guid
Public Overridable Property AttachmentName As String
Public Overridable Property CreatedDate As Date?
Public Overridable Property FileSizeInKB As Double?
End Class
Public Partial Class CadDerivative
Public Overridable Property CadDerivativeID As Integer
Public Overridable Property AttachmentId As Guid
Public Overridable Property VersionNo As Integer
Public Overridable Property Urn As String
Public Overridable Property ObjectKey As String
Public Overridable Property Status As String
Public Overridable Property Progress As Integer
Public Overridable Property StageLabel As String
Public Overridable Property Has2d As Boolean
Public Overridable Property Has3d As Boolean
Public Overridable Property HasPdf As Boolean
Public Overridable Property ThumbKey As String
Public Overridable Property ThumbUrl As String
Public Overridable Property PdfAttachmentId As Guid?
Public Overridable Property ErrorText As String
Public Overridable Property RequestedBy As String
Public Overridable Property RequestedAt As Date?
Public Overridable Property FinishedAt As Date?
Public Overridable Property AgeSeconds As Integer
End Class
Public Partial Class CadFileInfo
Public Overridable Property CadFileInfoID As Integer
Public Overridable Property AttachmentId As Guid
Public Overridable Property VersionNo As Integer
Public Overridable Property FileName As String
Public Overridable Property Format As String
Public Overridable Property FormatLabel As String
Public Overridable Property CadVersion As String
Public Overridable Property CadVersionCode As String
Public Overridable Property Units As String
Public Overridable Property DrawingNumber As String
Public Overridable Property Title As String
Public Overridable Property LayoutCount As Integer
Public Overridable Property Layouts As List(Of CadLayout) = New List(Of CadLayout)
Public Overridable Property LayerCount As Integer
Public Overridable Property EntityCount As Integer
Public Overridable Property TextChars As Integer
Public Overridable Property ExtractedText As String
Public Overridable Property Reader As String
Public Overridable Property Status As String
Public Overridable Property ErrorText As String
Public Overridable Property CreatedAt As Date?
Public Overridable Property UpdatedAt As Date?
Public Overridable Property AgeSeconds As Integer
End Class
Public Partial Class CadInfoRequest
Public Overridable Property AttachmentId As Guid
Public Overridable Property VersionNo As Integer?
End Class
Public Partial Class CadInfoResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property AttachmentId As Guid
Public Overridable Property FileName As String
Public Overridable Property Info As CadFileInfo
Public Overridable Property Derivative As CadDerivative
Public Overridable Property Companions As List(Of CadCompanion) = New List(Of CadCompanion)
Public Overridable Property ApsConnected As Boolean
Public Overridable Property CanRender As Boolean
Public Overridable Property ViewerScriptUrl As String
Public Overridable Property ViewerStyleUrl As String
End Class
Public Partial Class CadLayout
Public Overridable Property Name As String
Public Overridable Property IsPaperSpace As Boolean
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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-01,
UpdatedAt: 0001-01-01,
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-01,
FinishedAt: 0001-01-01,
AgeSeconds: 0
},
Companions:
[
{
AttachmentId: 00000000000000000000000000000000,
AttachmentName: String,
CreatedDate: 0001-01-01,
FileSizeInKB: 0
}
],
ApsConnected: False,
CanRender: False,
ViewerScriptUrl: String,
ViewerStyleUrl: String
}