Attachments Endpoint
GET https://tenant_name.autodeskplm360.net/api/v3/workspaces/{workspaceId}/items//{itemId}/attachments?asc=name
This endpoint returns a list of all attachments for the specific item.
Upload attachments
This three-step process is more resilient and secure than using the deprecated REST API v1 endpoint.
Step 1
Create a signed URL for the attachment that’s going to be uploaded to the bucket, containing the file information.
POST https://tenant_name.autodeskplm360.net/api/v3/workspaces/{workspaceId}/items/{itemId}/attachments
Header:
Accept: application/json
Content-Type: application/json
Body:
{
"description":"empty|<string>",
"name":"<file name.extension>",
"folder": null|<folder name>,
"resourceName":"<string>",
"size": <size in bytes>
}
Result: this request will return a URL and headers in the response, which is used for Step 2 below.
Step 2
Upload the file to the bucket.
PUT https://flc-prod-preview.s3.amazonaws.com/{tenantName}/{workspaceId}/...
(URL returned in the response from Step 1)
Header:
x-amz-meta-filename: <filename>,
x-amz-meta-fileurn: <value>
(Headers returned in the response from Step 1)
Body:
<Binary>
Result: this request will return a 200, indicating that the file was successfully uploaded.
Step 3
Check-in the attachment.
PATCH https://tenant_name.autodeskplm360.net/api/v3/workspaces/{workspaceId}/items/{itemId}/attachments/{attachmentId}
Headers:
Accept: application/json
Content-Type: application/json
Body:
{
"status":
{ "name":"CheckIn"
}
}
Result: this request will return a 200, indicating that the file was successfully checked in, and now available in Fusion Manage. The response will contain the attachment entity.