POST /projects/{projectId}/assets

Upload asset to project with the given data

Path parameters

  • projectId string Required

    Project ID

multipart/form-data

Body Required

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • id string Required
    • filename string Required
    • size integer Required

      Size of file in bytes

      Minimum value is 0.

    • checksum string Required

      SHA-256 checksum of file contents

    • created string Required

      ISO 8601 datetime

    • modified string Required

      ISO 8601 datetime

    • project_id string Required

      Project ID

    • job_id string | null Required

      Job ID that created this asset, if any

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • code integer

      HTTP response code

    • name string

      Status text corresponding to the HTTP response code

    • description string

      Detailed error message

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • code integer

      HTTP response code

    • name string

      Status text corresponding to the HTTP response code

    • description string

      Detailed error message

POST /projects/{projectId}/assets
curl \
 --request POST 'https://api.metafold3d.com/projects/{projectId}/assets' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: multipart/form-data"
Response examples (201)
{
  "id": "123",
  "size": 262144,
  "job_id": null,
  "created": "2006-01-02T22:04:05+00:00",
  "checksum": "sha256:2d063a84b13e5b23730a509cbb6ba42534acde451249a0b7409172a4f8814ef0",
  "filename": "part.stl",
  "modified": "2006-01-02T22:04:05+00:00",
  "project_id": "123"
}
Response examples (400)
{
  "code": 400,
  "name": "Bad Request",
  "description": "Expected parameter \"foo\""
}
Response examples (401)
{
  "code": 401,
  "name": "Unauthorzed",
  "description": "Token has expired"
}