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}
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class AttachmentVersionRequest
{
    open var AttachmentId:UUID? = null
    open var RevisionLabel:String? = null
    open var Notes:String? = null
}

open class AttachmentVersionResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var AttachmentId:UUID? = null
    open var Versions:ArrayList<AttachmentVersion> = ArrayList<AttachmentVersion>()
    open var CurrentVersionNo:Int? = null
    open var Head:Attachment? = null
}

open class AttachmentVersion
{
    open var AttachmentVersionId:Int? = null
    open var AttachmentId:UUID? = null
    open var VersionNo:Int? = null
    open var AttachmentName:String? = null
    open var MimeType:String? = null
    open var FileSizeInKB:Double? = null
    open var AWSKey:String? = null
    open var RevisionLabel:String? = null
    open var Notes:String? = null
    open var RestoredFromVersionNo:Int? = null
    open var UploadedBy:String? = null
    open var UploadedAt:Date? = null
    open var IsCurrent:Boolean? = null
    open var DownloadUrl:String? = null
}

open class Attachment
{
    open var AttachmentId:UUID? = null
    open var TableName:String? = null
    open var FieldName:String? = null
    open var RecordId:Int? = null
    open var AttachmentName:String? = null
    open var MimeType:String? = null
    open var AttachmentData:ByteArray = ByteArray(0)
    open var FileSizeInKB:Double? = null
    open var CreatedDate:Date? = null
    open var CreatedBy:String? = null
    open var NeedsOCR:Boolean? = null
    open var OCRDate:Date? = null
    open var IsSecurities:Boolean? = null
    open var AWSKey:String? = null
    open var PresignedUrl:String? = null
}

Kotlin AttachmentVersionRequest DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

{
	AttachmentId: 00000000000000000000000000000000,
	RevisionLabel: String,
	Notes: String
}
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,
	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-01,
			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-01,
		CreatedBy: String,
		NeedsOCR: False,
		OCRDate: 0001-01-01,
		IsSecurities: False,
		AWSKey: String,
		PresignedUrl: String
	}
}