Add Materials
POST
/api/construct-models/:model_id/materialsAdd Materials
Request
Parameters
| Name | Location | Type | Required |
|---|---|---|---|
model_id | path | string | yes |
Bodyrequired
application/json
MaterialsBatchobject
| Property | Type | Required |
|---|---|---|
materials | object[] | yes |
Raw schema
{
"properties": {
"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"
},
"minItems": 1,
"title": "Materials",
"type": "array"
}
},
"required": [
"materials"
],
"title": "MaterialsBatch",
"type": "object"
}Responses
200Successful Response
application/json
Response Add Construct Materialsobject[]
Raw schema
{
"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": "Response Add Construct Materials",
"type": "array"
}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"
}