GET | /RestApi/Sitefinity/mobile-formats/preview |
---|
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
class ContentLifecycleStatus(IntEnum):
MASTER = 0
TEMP = 1
LIVE = 2
DELETED = 4
PARTIAL_TEMP = 8
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MobileFormatPreviewDto:
mobile_format_setting_name: Optional[str] = None
content_type_fullname: Optional[str] = None
provider_name: Optional[str] = None
item_url_name: Optional[str] = None
status: Optional[ContentLifecycleStatus] = None
site_id: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MobileFormatPreviewUrlDto:
item_title: Optional[str] = None
mobile_format_url: Optional[str] = None
mobile_format_preview_url: Optional[str] = None
error_message: Optional[str] = None
Python MobileFormatPreviewDto DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /RestApi/Sitefinity/mobile-formats/preview HTTP/1.1 Host: www.asg.com.au Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"ItemTitle":"String","MobileFormatUrl":"String","MobileFormatPreviewUrl":"String","ErrorMessage":"String"}