Create an attachment
Prepares an attachment in a project and returns the location to which its content should be uploaded. Send annotationId to add a thumbnail to an annotation. In this case, the returned ID is the thumbnail ID.
Required permission: Collaborator or higher in the project.
Authentication
AuthorizationBearer
An API key associated with your user account and workspace. API requests inherit your existing workspace permissions.
OR
AuthorizationBearer
The session token of a user signed in to the CAD ROOMS app. Every endpoint accepts it in place of an API key.
Path parameters
projectId
Unique identifier of the project.
Request
This endpoint expects an object.
path
Name of the attachment file.
contentType
Content type of the file.
expiresIn
Number of seconds the upload URL stays valid.
annotationId
The annotation this image is a thumbnail for.
Response headers
Request-Id
Request-Id. Unique identifier for the request. Every response, success or error, returns it. Error bodies carry the same value in requestId. Include it when contacting CAD ROOMS support.
Response
Returns the attachment ID and a temporary upload URL.
id
Unique identifier of the attachment.
uploadUrl
Temporary URL to send the file content to with PUT.
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error