Trendsic Platform Service

<back to all web services

DocumentSharePolicyRequest

Requires Authentication
The following routes are available for this service:
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 .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.

PUT /v1/documentshare/policy HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	HighTierNoSmsFallback: String,
	DefaultExpiryHours: 0,
	MaxExpiryHours: 0,
	DefaultMaxViews: 0,
	AllowAdhocEmail: False
}
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
		}
	},
	Policy: 
	{
		DocumentSharePolicyId: 0,
		HighTierNoSmsFallback: String,
		DefaultExpiryHours: 0,
		MaxExpiryHours: 0,
		DefaultMaxViews: 0,
		AllowAdhocEmail: False,
		UpdatedAtUtc: 0001-01-01,
		UpdatedByUserId: 00000000000000000000000000000000
	}
}