Skip to main content

Set Units

PUT/api/construct-models/:model_id/units

Set Units

Request

Parameters

NameLocationTypeRequired
model_idpathstringyes

Bodyrequired

application/json
ViewerUnitsobject
PropertyTypeRequired
currentstring | nullno
forcestring | nullno
lengthstring | nullno
temperaturestring | nullno
Raw schema
{
  "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"
}

Responses

200Successful Response
application/json
ViewerUnitsobject
PropertyTypeRequired
currentstring | nullno
forcestring | nullno
lengthstring | nullno
temperaturestring | nullno
Raw schema
{
  "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"
}
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"
}