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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AttachmentViewResponse:
    response_status: Optional[ResponseStatus] = None
    attachment_id: Optional[str] = None
    file_name: Optional[str] = None
    mime_type: Optional[str] = None
    file_size_in_k_b: float = 0.0
    extension: Optional[str] = None
    category: Optional[str] = None
    viewer: Optional[str] = None
    is_sensitive: bool = False
    can_download: bool = False
    content_url: Optional[str] = None
    media_url: Optional[str] = None
    page_count: int = 0
    current_version_no: int = 0
    version_count: int = 0
    table_name: Optional[str] = None
    record_id: int = 0
    created_by: Optional[str] = None
    created_date: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AttachmentViewRequest:
    attachment_id: Optional[str] = None

Python AttachmentViewRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
HTTP/1.1 200 OK
Content-Type: application/json
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-01T00:00:00.0000000"}