| GET,PUT,OPTIONS | /v1/documentshare/policy |
|---|
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 DocumentSharePolicy:
document_share_policy_id: int = 0
high_tier_no_sms_fallback: Optional[str] = None
default_expiry_hours: int = 0
max_expiry_hours: int = 0
default_max_views: Optional[int] = None
allow_adhoc_email: bool = False
updated_at_utc: datetime.datetime = datetime.datetime(1, 1, 1)
updated_by_user_id: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DocumentSharePolicyResponse:
response_status: Optional[ResponseStatus] = None
policy: Optional[DocumentSharePolicy] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DocumentSharePolicyRequest:
high_tier_no_sms_fallback: Optional[str] = None
default_expiry_hours: int = 0
max_expiry_hours: int = 0
default_max_views: int = 0
allow_adhoc_email: bool = False
Python DocumentSharePolicyRequest 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.
PUT /v1/documentshare/policy HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"HighTierNoSmsFallback":"String","DefaultExpiryHours":0,"MaxExpiryHours":0,"DefaultMaxViews":0,"AllowAdhocEmail":false}
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"}},"Policy":{"DocumentSharePolicyId":0,"HighTierNoSmsFallback":"String","DefaultExpiryHours":0,"MaxExpiryHours":0,"DefaultMaxViews":0,"AllowAdhocEmail":false,"UpdatedAtUtc":"0001-01-01T00:00:00.0000000","UpdatedByUserId":"00000000000000000000000000000000"}}