| Requires any of the roles: | Agent, Administrator |
| GET,POST,OPTIONS | /v1/AttachmentVersion/{AttachmentId} |
|---|
export class AttachmentVersion
{
public AttachmentVersionId: number;
public AttachmentId: string;
public VersionNo: number;
public AttachmentName: string;
public MimeType: string;
public FileSizeInKB?: number;
public AWSKey: string;
public RevisionLabel: string;
public Notes: string;
public RestoredFromVersionNo?: number;
public UploadedBy: string;
public UploadedAt?: string;
public IsCurrent: boolean;
public DownloadUrl: string;
public constructor(init?: Partial<AttachmentVersion>) { (Object as any).assign(this, init); }
}
export class Attachment
{
public AttachmentId: string;
public TableName: string;
public FieldName: string;
public RecordId: number;
public AttachmentName: string;
public MimeType: string;
public AttachmentData: string = [];
public FileSizeInKB: number;
public CreatedDate: string;
public CreatedBy: string;
public NeedsOCR: boolean;
public OCRDate: string;
public IsSecurities: boolean;
public AWSKey: string;
public PresignedUrl: string;
public constructor(init?: Partial<Attachment>) { (Object as any).assign(this, init); }
}
export class AttachmentVersionResponse
{
public ResponseStatus: ResponseStatus;
public AttachmentId: string;
public Versions: AttachmentVersion[] = [];
public CurrentVersionNo: number;
public Head: Attachment;
public constructor(init?: Partial<AttachmentVersionResponse>) { (Object as any).assign(this, init); }
}
export class AttachmentVersionRequest
{
public AttachmentId: string;
public RevisionLabel: string;
public Notes: string;
public constructor(init?: Partial<AttachmentVersionRequest>) { (Object as any).assign(this, init); }
}
TypeScript AttachmentVersionRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=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"}}