Skip to navigation

Files

A file represents a CAD file or any other file stored within a project. Each file has a unique path and includes information about its latest state, such as its current revision (including its ID, major and minor values), file size, and the contribution that last modified it.

The API also allows you to explore relationships between files, similar to the Components and Referenced By panels in the CAD ROOMS app:

  • List dependencies: Returns the files that a file uses, such as the parts within an assembly.
  • List references: Returns the files that use a file, such as the assemblies that contain a part.

To list files within a project, use /projects/{projectId}/files. To retrieve an individual file, use /projects/{projectId}/files?path=....

Check-outs

A check-out reserves a file for a single user, preventing others from modifying it. Because CAD files cannot be merged, check-outs prevent multiple users from making conflicting changes to the same file. Other users cannot modify the file until it is checked in.

You can check out individual files by path or all files within a project. You can also specify a purpose, which is visible to other users. To release a check-out, call Check in files or set checkIn when you create a contribution.

Changes

Changes are edits within a project that have not yet been contributed. Each user maintains their own set of changes within a project, which is not visible to other users.

Uploads

An upload transfers new file content to a project using signed URLs. CAD ROOMS provides the signed URLs, and you upload the content directly to storage. Uploaded files appear in your changes until you create a contribution.

To upload files:

  1. Call Create uploads with the path, content type, size, and SHA-256 hash of each file. CAD ROOMS automatically checks out each new file to you.
  2. Send the content of each file using PUT to its uploadUrl. For large files, the response contains multipart instead. Upload each part to its corresponding URL.
  3. Call Complete uploads, including the parts for any large files. CAD ROOMS starts CAD processing and adds the files to your changes.
  4. Call Create a contribution to save your changes as new revisions.

If CAD ROOMS already stores identical file content, the upload contains neither uploadUrl nor multipart. Skip step 2 for that file.

Imports

An import groups multiple uploads from a single source, such as a folder on your computer. CAD ROOMS tracks the status of each file within the import, allowing interrupted imports to resume.

To add files to an import, create uploads with importId and each file’s sourcePath.

Starred files

Starring a file highlights it within a project. Each file has a single star status shared by all project members. The starred field on each file indicates whether it is starred.

To star or unstar a file, call Update files. To list starred files within a project, use starred=true on List files. To list starred files across all projects within a workspace, use List starred files.

Shares

A share grants an individual user access to a specific version of a file. If the user is not already a member of the workspace, they join it as a guest.

List shares returns either the users a file is shared with or the files shared with a specific guest.