Trendsic Platform Service

<back to all web services

MarkupPageRequest

Requires Authentication
The following routes are available for this service:
GET,PUT,OPTIONS/v1/markup/{AttachmentId}/{VersionNo}/{PageIndex}
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 DocumentMarkupLayer:
    document_markup_i_d: int = 0
    attachment_id: Optional[str] = None
    version_no: int = 0
    page_index: int = 0
    author_user_id: Optional[str] = None
    author_name: Optional[str] = None
    layer_json: Optional[str] = None
    shape_count: int = 0
    is_published: bool = False
    created_at: Optional[datetime.datetime] = None
    updated_at: Optional[datetime.datetime] = None
    is_mine: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DocumentMarkupLink:
    document_markup_link_i_d: int = 0
    attachment_id: Optional[str] = None
    version_no: int = 0
    page_index: int = 0
    shape_id: Optional[str] = None
    entity_type: Optional[str] = None
    entity_i_d: int = 0
    entity_no: Optional[str] = None
    created_by: Optional[str] = None
    created_at: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MarkupPageResponse:
    response_status: Optional[ResponseStatus] = None
    attachment_id: Optional[str] = None
    version_no: int = 0
    page_index: int = 0
    layers: List[DocumentMarkupLayer] = field(default_factory=list)
    links: List[DocumentMarkupLink] = field(default_factory=list)
    mine: Optional[DocumentMarkupLayer] = None
    can_create_punch: bool = False
    can_create_rfi: bool = False
    project_i_d: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MarkupPageRequest:
    attachment_id: Optional[str] = None
    version_no: int = 0
    page_index: int = 0
    layer_json: Optional[str] = None

Python MarkupPageRequest 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/markup/{AttachmentId}/{VersionNo}/{PageIndex} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	AttachmentId: 00000000000000000000000000000000,
	VersionNo: 0,
	PageIndex: 0,
	LayerJson: String
}
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
		}
	},
	AttachmentId: 00000000000000000000000000000000,
	VersionNo: 0,
	PageIndex: 0,
	Layers: 
	[
		{
			DocumentMarkupID: 0,
			AttachmentId: 00000000000000000000000000000000,
			VersionNo: 0,
			PageIndex: 0,
			AuthorUserId: String,
			AuthorName: String,
			LayerJson: String,
			ShapeCount: 0,
			IsPublished: False,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			IsMine: False
		}
	],
	Links: 
	[
		{
			DocumentMarkupLinkID: 0,
			AttachmentId: 00000000000000000000000000000000,
			VersionNo: 0,
			PageIndex: 0,
			ShapeId: String,
			EntityType: String,
			EntityID: 0,
			EntityNo: String,
			CreatedBy: String,
			CreatedAt: 0001-01-01
		}
	],
	Mine: 
	{
		DocumentMarkupID: 0,
		AttachmentId: 00000000000000000000000000000000,
		VersionNo: 0,
		PageIndex: 0,
		AuthorUserId: String,
		AuthorName: String,
		LayerJson: String,
		ShapeCount: 0,
		IsPublished: False,
		CreatedAt: 0001-01-01,
		UpdatedAt: 0001-01-01,
		IsMine: False
	},
	CanCreatePunch: False,
	CanCreateRfi: False,
	ProjectID: 0
}