Skip to main content

Import Universal Model

POST/api/models/import

Import Universal Model

Request

Bodyrequired

application/json
UniversalModelImportRequestobject
PropertyTypeRequired
diagnosticsDiagnosticsno
import_schema_versionstring | nullno
metadataobjectno
source_file_hashstring | nullno
source_file_namestring | nullno
source_file_sizeinteger | nullno
source_formatstringyes
statsobjectno
tablesobject[]no
thumbnail_urlstring | nullno
titlestring | nullno
viewer_modelobjectyes
Raw schema
{
  "properties": {
    "diagnostics": {
      "title": "Diagnostics"
    },
    "import_schema_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Import Schema Version"
    },
    "metadata": {
      "additionalProperties": true,
      "title": "Metadata",
      "type": "object"
    },
    "source_file_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source File Hash"
    },
    "source_file_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source File Name"
    },
    "source_file_size": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source File Size"
    },
    "source_format": {
      "title": "Source Format",
      "type": "string"
    },
    "stats": {
      "additionalProperties": true,
      "title": "Stats",
      "type": "object"
    },
    "tables": {
      "items": {
        "properties": {
          "columns": {
            "items": {},
            "title": "Columns",
            "type": "array"
          },
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "row_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Row Count"
          },
          "rows": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          },
          "source_table_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Table Name"
          },
          "storage_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Storage Path"
          },
          "table_key": {
            "title": "Table Key",
            "type": "string"
          },
          "table_kind": {
            "default": "model",
            "enum": [
              "model",
              "raw",
              "diagnostics"
            ],
            "title": "Table Kind",
            "type": "string"
          }
        },
        "required": [
          "table_key"
        ],
        "title": "UniversalModelTableCreate",
        "type": "object"
      },
      "title": "Tables",
      "type": "array"
    },
    "thumbnail_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Thumbnail Url"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "viewer_model": {
      "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"
    }
  },
  "required": [
    "source_format",
    "viewer_model"
  ],
  "title": "UniversalModelImportRequest",
  "type": "object"
}

Responses

200Successful Response
application/json
UniversalModelImportResponseobject
PropertyTypeRequired
created_atdate-timeyes
idintegeryes
model_typeconst universalno
namestringyes
public_idstringyes
redirect_urlstringyes
source_formatstringyes
statsobjectno
statusstringyes
table_countintegeryes
thumbnail_urlstring | nullno
titlestringyes
updated_atdate-timeyes
viewer_model_urlstringyes
Raw schema
{
  "properties": {
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "id": {
      "title": "Id",
      "type": "integer"
    },
    "model_type": {
      "const": "universal",
      "default": "universal",
      "title": "Model Type",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "public_id": {
      "title": "Public Id",
      "type": "string"
    },
    "redirect_url": {
      "title": "Redirect Url",
      "type": "string"
    },
    "source_format": {
      "title": "Source Format",
      "type": "string"
    },
    "stats": {
      "additionalProperties": true,
      "title": "Stats",
      "type": "object"
    },
    "status": {
      "title": "Status",
      "type": "string"
    },
    "table_count": {
      "title": "Table Count",
      "type": "integer"
    },
    "thumbnail_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Thumbnail Url"
    },
    "title": {
      "title": "Title",
      "type": "string"
    },
    "updated_at": {
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "viewer_model_url": {
      "title": "Viewer Model Url",
      "type": "string"
    }
  },
  "required": [
    "id",
    "public_id",
    "name",
    "title",
    "source_format",
    "status",
    "created_at",
    "updated_at",
    "table_count",
    "redirect_url",
    "viewer_model_url"
  ],
  "title": "UniversalModelImportResponse",
  "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"
}