| POST,OPTIONS | /v1/projects/{ProjectID}/bluebeam/import/commit |
|---|
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 BluebeamRow:
row_no: int = 0
subject: Optional[str] = None
page_label: Optional[str] = None
page_index: Optional[int] = None
author: Optional[str] = None
date: Optional[str] = None
status: Optional[str] = None
color: Optional[str] = None
comments: Optional[str] = None
label: Optional[str] = None
layer: Optional[str] = None
space: Optional[str] = None
length: Optional[float] = None
area: Optional[float] = None
count: Optional[float] = None
volume: Optional[float] = None
measurement: Optional[str] = None
x: Optional[float] = None
y: Optional[float] = None
width: Optional[float] = None
height: Optional[float] = None
extras: Dict[str, str] = field(default_factory=dict)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BluebeamMappedRow:
row_no: int = 0
target: Optional[str] = None
title: Optional[str] = None
description: Optional[str] = None
area: Optional[str] = None
trade: Optional[str] = None
assigned_sub: Optional[str] = None
priority: Optional[str] = None
quantity: Optional[float] = None
quantity_kind: Optional[str] = None
unit: Optional[str] = None
task_seq: Optional[int] = None
reason: Optional[str] = None
source: Optional[BluebeamRow] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BluebeamCommitResult:
punch_created: int = 0
rfis_created: int = 0
skipped: int = 0
created: List[str] = field(default_factory=list)
quantities: List[BluebeamMappedRow] = field(default_factory=list)
errors: List[str] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BluebeamCommitResponse:
response_status: Optional[ResponseStatus] = None
result: Optional[BluebeamCommitResult] = None
quantities_csv: Optional[str] = None
quantities_written: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BluebeamCommitRequest:
project_i_d: int = 0
file_name: Optional[str] = None
rows: List[BluebeamMappedRow] = field(default_factory=list)
rfp_document_u_i_d: Optional[str] = None
Python BluebeamCommitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/projects/{ProjectID}/bluebeam/import/commit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
FileName: String,
Rows:
[
{
RowNo: 0,
Target: String,
Title: String,
Description: String,
Area: String,
Trade: String,
AssignedSub: String,
Priority: String,
Quantity: 0,
QuantityKind: String,
Unit: String,
TaskSeq: 0,
Reason: String,
Source:
{
RowNo: 0,
Subject: String,
PageLabel: String,
PageIndex: 0,
Author: String,
Date: String,
Status: String,
Color: String,
Comments: String,
Label: String,
Layer: String,
Space: String,
Length: 0,
Area: 0,
Count: 0,
Volume: 0,
Measurement: String,
X: 0,
Y: 0,
Width: 0,
Height: 0,
Extras:
{
String: String
}
}
}
],
RfpDocumentUID: 00000000000000000000000000000000
}
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
}
},
Result:
{
PunchCreated: 0,
RfisCreated: 0,
Skipped: 0,
Created:
[
String
],
Quantities:
[
{
RowNo: 0,
Target: String,
Title: String,
Description: String,
Area: String,
Trade: String,
AssignedSub: String,
Priority: String,
Quantity: 0,
QuantityKind: String,
Unit: String,
TaskSeq: 0,
Reason: String,
Source:
{
RowNo: 0,
Subject: String,
PageLabel: String,
PageIndex: 0,
Author: String,
Date: String,
Status: String,
Color: String,
Comments: String,
Label: String,
Layer: String,
Space: String,
Length: 0,
Area: 0,
Count: 0,
Volume: 0,
Measurement: String,
X: 0,
Y: 0,
Width: 0,
Height: 0,
Extras:
{
String: String
}
}
}
],
Errors:
[
String
]
},
QuantitiesCsv: String,
QuantitiesWritten: 0
}