Dataservices Attachment Client V2 only supports upload

Hi. I came around the class com.mgmtp.a12.dataservices.client.attachment.AttachmentClientV2 and it’s implementation.

I’m confused about the promised methods - or their absence. When thinking of a REST architecture, there could be 4 Standard operations on Resources (Create - Read - Update - Delete). If attachments are the resource, only the “Create” method would be provided by the client.

Why are the other methods not part of the interface?

For example, the ModelsClient has more methods on it’s resource “models”.

In my case I’m looking for a standard method to “get attachments” from the connected storage, which this client knows of.

Moin @stefan-grey-canyon,

I am stumbling over the same currently in the context of extending the Data Services Tutorial.

The now deprecated interface AttachmentControllerImpl, which is used for downloading attachments (REST Endpoint: Download Attachment), allows downloading attachments, but question remains on what and when it will be replaced.

I also look for a standard method to “Query/List attachments (of a document) - like LIST_DOCUMENTS for documents”

Hi @stefan-grey-canyon ,

We are moving away from REST in favor of JSON-RPC. There are however some endpoints which do not match JSON-RPC architecture. Namely model load and attachment upload. Attachments are no longer directly available because they are now available only via un-secured expirable URLs which can be obtained via LOAD_ATTACHMENT_URL operation for attachments and LOAD_THUMBNAIL_URL operation for thumbnails.For more information please see GetA12 Login

I know the documentation.

Why don’t you provide a standard method to download attachments from Content-Store. If there is a “A12 procedure to do this” you should give an example how to use/implement/customise this on our own.

Hi @stefan-grey-canyon ,

A12 Client already handles all of this automatically therefore changing from attachments 1.5 to 2.0 should be without migration on the API level. Actual migration of data is handled by DS migration step. There is no DS API that will serve attachments directly. There is only API that gives a caller URL from where the attachment can be downloaded. This way the browser download manager can download attachments. The download progress bar is displayed together with history of downloads. This is aimed to improve interaction with attachments in the browser.

Can you please describe your use-case? Why do you want to download attachments directly ? Is A12 client not fitting for you? We do not like to create APIs which no one requests because there are maintenance and testing costs to every public API that DS provides