Skip to content
Stella ConnectDocs
Files

Import one or more 2D CAD files as parts

POST{baseUrl}/v2.0/2d/files/import

Uploads one or more 2D CAD files and extracts every part contained in them. Each extracted part is assigned a stable PartId that downstream endpoints (classification, nesting, rendering) require.

Supported file types

  • DXF
  • DWG
Authx-api-key

multipart/form-data
Field
Type
Required
Description
files[]file[]Yes

One or more CAD files to import. See the endpoint description for supported formats. A single file may contain multiple parts; separate closed contours are extracted as distinct parts.

Status
When
200

Success

400

Bad Request

401

Unauthorized

403

Forbidden

413

The upload exceeded the maximum request body size.

500

An unexpected error occurred on the server.

Field
Type
Required
Description
dataobject | nullNo

Response payload for the file-import endpoints. Returned inside a ConnectEnvelope<ImportFilesResponse>.

data.files[]object[]No

One entry per uploaded file, in the order the files were received.

data.files[].fileIduuidNo

Stable identifier for the imported file. Persist this to reference the file in subsequent calls.

data.files[].namestringNo

Original file name as supplied at upload time.

data.files[].parts[]object[]No

Every part extracted from the file. A file with a single closed contour yields one entry; multi-body files yield one entry per body.

data.files[].parts[].partIduuidNo

Stable identifier for the extracted part. Required by classification, nesting and rendering endpoints.

data.files[].parts[].namestringNo

Part name derived from the CAD file, or a synthesized default when the file does not name the part.

errors[]object[] | nullNo

One or more errors describing why the request failed. Absent (null) on success.

errors[].descriptionstring | nullNo

Human-readable explanation of the error. Intended for display to end users or logs. Wording is not stable and should not be branched on.

errors[].errorIdstring | nullNo

Machine-readable, stable error identifier. Consumers should branch on this value rather than on Description. See ConnectErrorIds for the catalog.

pagingobject | nullNo

Paging metadata for list endpoints. Absent on single-item responses.

paging.limitintegerNo
paging.startintegerNo
paging.totalintegerNo

Example 200 response
{
  "data": {
    "files": [
      {
        "fileId": "a1c6a2ab-4b01-4253-b4c9-70e04b3b48fc",
        "name": "string",
        "parts": [
          {
            "partId": "08fcc2e5-7760-493b-b8f1-1ad26fcb0a9e",
            "name": "string"
          }
        ]
      }
    ]
  },
  "errors": [
    {
      "description": "string",
      "errorId": "string"
    }
  ],
  "paging": {
    "limit": 0,
    "start": 0,
    "total": 0
  }
}