Get Construct Viewer Model
GET
/api/construct-models/:model_id/viewer-modelGet Construct Viewer Model
Request
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
model_id | path | string | yes |
Responses
200Successful Response
application/json
ViewerModelobject
| Property | Type | Required |
|---|---|---|
areas | object[] | no |
bounds | object | yes |
frames | object[] | no |
gridLines | object[] | no |
id | string | null | no |
materials | object[] | no |
metadata | object | no |
name | string | yes |
nodes | object[] | yes |
schemaVersion | const viewer-model/v1 | no |
sections | object[] | no |
source | object | null | no |
supports | object[] | no |
units | object | no |
Raw schema
{
"additionalProperties": true,
"properties": {
"areas": {
"items": {
"properties": {
"cardinalPoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Cardinalpoint"
},
"diaphragmId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Diaphragmid"
},
"id": {
"title": "Id",
"type": "string"
},
"kind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Kind"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Label"
},
"materialId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Materialid"
},
"nodeIds": {
"items": {
"type": "string"
},
"minItems": 3,
"title": "Nodeids",
"type": "array"
},
"openingNodeIds": {
"items": {
"items": {
"type": "string"
},
"type": "array"
},
"title": "Openingnodeids",
"type": "array"
},
"sectionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sectionid"
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
},
"thickness": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Thickness"
}
},
"required": [
"id",
"nodeIds"
],
"title": "ViewerArea",
"type": "object"
},
"title": "Areas",
"type": "array"
},
"bounds": {
"properties": {
"max": {
"properties": {
"x": {
"title": "X",
"type": "number"
},
"y": {
"title": "Y",
"type": "number"
},
"z": {
"title": "Z",
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "ViewerVector3",
"type": "object"
},
"min": {
"properties": {
"x": {
"title": "X",
"type": "number"
},
"y": {
"title": "Y",
"type": "number"
},
"z": {
"title": "Z",
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "ViewerVector3",
"type": "object"
}
},
"required": [
"min",
"max"
],
"title": "ViewerBounds",
"type": "object"
},
"frames": {
"items": {
"properties": {
"endNodeId": {
"title": "Endnodeid",
"type": "string"
},
"id": {
"title": "Id",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Label"
},
"length": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Length"
},
"materialId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Materialid"
},
"memberId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Memberid"
},
"rotation": {
"default": 0,
"title": "Rotation",
"type": "number"
},
"sectionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Sectionid"
},
"sectionOffset": {
"anyOf": [
{
"properties": {
"x": {
"title": "X",
"type": "number"
},
"y": {
"title": "Y",
"type": "number"
}
},
"required": [
"x",
"y"
],
"title": "ViewerPoint2",
"type": "object"
},
{
"type": "null"
}
]
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
},
"startNodeId": {
"title": "Startnodeid",
"type": "string"
}
},
"required": [
"id",
"startNodeId",
"endNodeId"
],
"title": "ViewerFrame",
"type": "object"
},
"title": "Frames",
"type": "array"
},
"gridLines": {
"items": {
"properties": {
"axis": {
"enum": [
"X",
"Y",
"Z"
],
"title": "Axis",
"type": "string"
},
"coordinate": {
"title": "Coordinate",
"type": "number"
},
"id": {
"title": "Id",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Label"
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
}
},
"required": [
"id",
"axis",
"coordinate"
],
"title": "ViewerGridLine",
"type": "object"
},
"title": "Gridlines",
"type": "array"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id"
},
"materials": {
"items": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
}
},
"required": [
"id"
],
"title": "ViewerMaterial",
"type": "object"
},
"title": "Materials",
"type": "array"
},
"metadata": {
"additionalProperties": true,
"title": "Metadata",
"type": "object"
},
"name": {
"title": "Name",
"type": "string"
},
"nodes": {
"items": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Label"
},
"position": {
"properties": {
"x": {
"title": "X",
"type": "number"
},
"y": {
"title": "Y",
"type": "number"
},
"z": {
"title": "Z",
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "ViewerVector3",
"type": "object"
},
"radius": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Radius"
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
}
},
"required": [
"id",
"position"
],
"title": "ViewerNode",
"type": "object"
},
"title": "Nodes",
"type": "array"
},
"schemaVersion": {
"const": "viewer-model/v1",
"default": "viewer-model/v1",
"title": "Schemaversion",
"type": "string"
},
"sections": {
"items": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"materialId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Materialid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Name"
},
"polygon": {
"items": {
"properties": {
"x": {
"title": "X",
"type": "number"
},
"y": {
"title": "Y",
"type": "number"
}
},
"required": [
"x",
"y"
],
"title": "ViewerPoint2",
"type": "object"
},
"title": "Polygon",
"type": "array"
},
"shape": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Shape"
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
},
"thickness": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Thickness"
}
},
"required": [
"id"
],
"title": "ViewerSection",
"type": "object"
},
"title": "Sections",
"type": "array"
},
"source": {
"anyOf": [
{
"properties": {
"system": {
"title": "System",
"type": "string"
},
"version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Version"
}
},
"required": [
"system"
],
"title": "ViewerSource",
"type": "object"
},
{
"type": "null"
}
]
},
"supports": {
"items": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"nodeId": {
"title": "Nodeid",
"type": "string"
},
"restraints": {
"properties": {
"r1": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "R1"
},
"r2": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "R2"
},
"r3": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "R3"
},
"u1": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "U1"
},
"u2": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "U2"
},
"u3": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "U3"
}
},
"title": "ViewerSupportRestraints",
"type": "object"
},
"source": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Source"
}
},
"required": [
"id",
"nodeId"
],
"title": "ViewerSupport",
"type": "object"
},
"title": "Supports",
"type": "array"
},
"units": {
"properties": {
"current": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Current"
},
"force": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Force"
},
"length": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Length"
},
"temperature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Temperature"
}
},
"title": "ViewerUnits",
"type": "object"
}
},
"required": [
"name",
"bounds",
"nodes"
],
"title": "ViewerModel",
"type": "object"
}422Validation Error
application/json
HTTPValidationErrorobject
| Property | Type | Required |
|---|---|---|
detail | object[] | no |
Raw schema
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Location",
"type": "array"
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
},
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError",
"type": "object"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}