Trendsic Platform Service

<back to all web services

AttachmentVersionRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,POST,OPTIONS/v1/AttachmentVersion/{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 Attachment
            Public Overridable Property AttachmentId As Guid
            Public Overridable Property TableName As String
            Public Overridable Property FieldName As String
            Public Overridable Property RecordId As Integer
            Public Overridable Property AttachmentName As String
            Public Overridable Property MimeType As String
            Public Overridable Property AttachmentData As Byte() = New Byte(){}
            Public Overridable Property FileSizeInKB As Double
            Public Overridable Property CreatedDate As Date
            Public Overridable Property CreatedBy As String
            Public Overridable Property NeedsOCR As Boolean
            Public Overridable Property OCRDate As Date
            Public Overridable Property IsSecurities As Boolean
            Public Overridable Property AWSKey As String
            Public Overridable Property PresignedUrl As String
        End Class

        Public Partial Class AttachmentVersion
            Public Overridable Property AttachmentVersionId As Integer
            Public Overridable Property AttachmentId As Guid
            Public Overridable Property VersionNo As Integer
            Public Overridable Property AttachmentName As String
            Public Overridable Property MimeType As String
            Public Overridable Property FileSizeInKB As Double?
            Public Overridable Property AWSKey As String
            Public Overridable Property RevisionLabel As String
            Public Overridable Property Notes As String
            Public Overridable Property RestoredFromVersionNo As Integer?
            Public Overridable Property UploadedBy As String
            Public Overridable Property UploadedAt As Date?
            Public Overridable Property IsCurrent As Boolean
            Public Overridable Property DownloadUrl As String
        End Class

        Public Partial Class AttachmentVersionRequest
            Public Overridable Property AttachmentId As Guid
            Public Overridable Property RevisionLabel As String
            Public Overridable Property Notes As String
        End Class

        Public Partial Class AttachmentVersionResponse
            Public Overridable Property ResponseStatus As ResponseStatus
            Public Overridable Property AttachmentId As Guid
            Public Overridable Property Versions As List(Of AttachmentVersion) = New List(Of AttachmentVersion)
            Public Overridable Property CurrentVersionNo As Integer
            Public Overridable Property Head As Attachment
        End Class
    End Namespace
End Namespace

VB.NET AttachmentVersionRequest DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/AttachmentVersion/{AttachmentId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"AttachmentId":"00000000000000000000000000000000","RevisionLabel":"String","Notes":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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","Versions":[{"AttachmentVersionId":0,"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"AttachmentName":"String","MimeType":"String","FileSizeInKB":0,"AWSKey":"String","RevisionLabel":"String","Notes":"String","RestoredFromVersionNo":0,"UploadedBy":"String","UploadedAt":"0001-01-01T00:00:00.0000000","IsCurrent":false,"DownloadUrl":"String"}],"CurrentVersionNo":0,"Head":{"AttachmentId":"00000000000000000000000000000000","TableName":"String","FieldName":"String","RecordId":0,"AttachmentName":"String","MimeType":"String","AttachmentData":"AA==","FileSizeInKB":0,"CreatedDate":"0001-01-01T00:00:00.0000000","CreatedBy":"String","NeedsOCR":false,"OCRDate":"0001-01-01T00:00:00.0000000","IsSecurities":false,"AWSKey":"String","PresignedUrl":"String"}}