Attachments API Overview
Attachments are used in aero for saving data like pdf files or pictures for example. These attachment can be viewed inside of the platform and used in different ways. It is essential to use these attachments like intended. Using them to save data that should be visible for a lot of users and give additional information.
The attachment API itself consist of one main core path that will follow in this document. This core path has different usages to get, copy, save or delete and attachment. Most of them are used in the same way with a different type of call.
Copy attachments is more difficult to understand but can be used very widely to make sure attachment can be used in different environments, also the copy attachments makes it easy to move attachment from maybe a wrong location to the correct one.
API Versioning
This documentation focuses on the v2 API for attachments. For older v1 API calls related to attachments, please refer to their respective documentation:
Core Resource Path
All v2 API calls for attachments are built upon a consistent core path structure, which dynamically incorporates the document definition and document identifiers:
api/v2/document-definitions/[DDname or DDid]/documents/[documentId or externalId]/attachments
[DDname or DDid] with the name or ID of your Document Definition, and [documentId or externalId] with the ID or external ID of the specific Document you're interacting with.
Different attachments end points
The Attachments API supports the following fundamental operations for managing your attached files:
| Operation | Purpose | HTTP Method(s) |
|---|---|---|
| Get Attachments | To retrieve information about attachments (like filename, type, size, and unique ID) as well as their downloadURLs. This makes usage of copy or set an attachment easily accesible. | GET |
| Save Attachments | To upload new files as attachments to a specific field within a document, or to update existing attachments. This operation is crucial for populating your documents with associated files. | POST, PUT |
| Delete Attachments | To permanently remove specific attachments from a document field, identified by their unique attachment ID. | DELETE |
| Copy Attachments | To transfer attachments from a source document field to a target document field, potentially across different documents or within the same document. | POST/PUT |