Skip to main content

Add Model Elements

POST/api/construct-models/:model_id/elements

Add Model Elements

Request

Parameters

NameLocationTypeRequired
model_idpathstringyes

Bodyrequired

application/json
ConstructModelElementsBatchobject
PropertyTypeRequired
areasobject[]no
framesobject[]no
materialsobject[]no
membersobject[]no
nodesobject[]no
sectionsobject[]no
supportsobject[]no
Raw schema
{
  "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"
    },
    "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"
    },
    "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"
    },
    "members": {
      "items": {
        "properties": {
          "frameIds": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Frameids",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "materialId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Materialid"
          },
          "sectionId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sectionid"
          }
        },
        "required": [
          "id",
          "frameIds"
        ],
        "title": "ConstructMember",
        "type": "object"
      },
      "title": "Members",
      "type": "array"
    },
    "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"
    },
    "sections": {
      "items": {
        "properties": {
          "dimensions": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Dimensions",
            "type": "object"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "materialId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Materialid"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "polygon": {
            "anyOf": [
              {
                "items": {
                  "properties": {
                    "x": {
                      "title": "X",
                      "type": "number"
                    },
                    "y": {
                      "title": "Y",
                      "type": "number"
                    }
                  },
                  "required": [
                    "x",
                    "y"
                  ],
                  "title": "ViewerPoint2",
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Polygon"
          },
          "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"
          },
          "type": {
            "default": "rectangular",
            "enum": [
              "rectangular",
              "pipe",
              "i_wide_flange",
              "channel",
              "angle",
              "shell",
              "custom",
              "section_designer"
            ],
            "title": "ConstructSectionType",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "title": "ConstructSectionCreate",
        "type": "object"
      },
      "title": "Sections",
      "type": "array"
    },
    "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"
    }
  },
  "title": "ConstructModelElementsBatch",
  "type": "object"
}

Responses

200Successful Response
application/json
ViewerModelobject
PropertyTypeRequired
areasobject[]no
boundsobjectyes
framesobject[]no
gridLinesobject[]no
idstring | nullno
materialsobject[]no
metadataobjectno
namestringyes
nodesobject[]yes
schemaVersionconst viewer-model/v1no
sectionsobject[]no
sourceobject | nullno
supportsobject[]no
unitsobjectno
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
PropertyTypeRequired
detailobject[]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"
}