Skip to main content

Add Sections

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

Add Sections

Request

Parameters

NameLocationTypeRequired
model_idpathstringyes

Bodyrequired

application/json
SectionsBatchobject
PropertyTypeRequired
sectionsobject[]yes
Raw schema
{
  "properties": {
    "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"
      },
      "minItems": 1,
      "title": "Sections",
      "type": "array"
    }
  },
  "required": [
    "sections"
  ],
  "title": "SectionsBatch",
  "type": "object"
}

Responses

200Successful Response
application/json
Response Add Construct Sectionsobject[]
Raw schema
{
  "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": "Response Add Construct Sections",
  "type": "array"
}
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"
}