Trendsic Platform Service

<back to all web services

AttachmentViewRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/AttachmentView/{AttachmentId}
import Foundation
import ServiceStack

public class AttachmentViewRequest : Codable
{
    public var attachmentId:String

    required public init(){}
}

public class AttachmentViewResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var attachmentId:String
    public var fileName:String
    public var mimeType:String
    public var fileSizeInKB:Double
    public var `extension`:String
    public var category:String
    public var viewer:String
    public var isSensitive:Bool
    public var canDownload:Bool
    public var contentUrl:String
    public var mediaUrl:String
    public var pageCount:Int
    public var currentVersionNo:Int
    public var versionCount:Int
    public var tableName:String
    public var recordId:Int
    public var createdBy:String
    public var createdDate:Date?

    required public init(){}
}


Swift AttachmentViewRequest 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.

GET /v1/AttachmentView/{AttachmentId} 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,
	MimeType: String,
	FileSizeInKB: 0,
	Extension: String,
	Category: String,
	Viewer: String,
	IsSensitive: False,
	CanDownload: False,
	ContentUrl: String,
	MediaUrl: String,
	PageCount: 0,
	CurrentVersionNo: 0,
	VersionCount: 0,
	TableName: String,
	RecordId: 0,
	CreatedBy: String,
	CreatedDate: 0001-01-01
}