Skip to main content
May 26, 2025
Question

Download documents from DOCUMENTUM or CMIS

  • May 26, 2025
  • 4 replies
  • 0 views

Hi,

We are trying to integrate an application with DOCUMENTUM/CMIS document management system. The APIs used do not work for large documents due to the 5MB input/output size limitation in Appian's Integration objects. We would like to know if there is any way to integrate with this document management system, such as a marketplace app, plugin, or other, from Appian, to work around the size limitation.

Does anyone have an idea?

Thanks

4 replies

stefanhelzle0001
May 26, 2025
mathieud0001
May 26, 2025

5MB is for the size of the payload not the document itself.

alfonsorAuthor
May 26, 2025

The limit of the request/response is 5MB. Documentum integration returns base64 info when it tries to download the document, so the respone exceed tihis limit:

IntegrationError title: "Response body size limit exceeded" message: "Unable to process response body - The response body was greater than 5 MB and could not be processed" 

Content type is XML and it can't transform to json value

stefanhelzle0001
May 26, 2025

ChatGPT told me this:

To download files in binary format from Documentum CMS using their REST API, you need to use the Content Media resource provided by the API. Here's a high-level summary of how to do it:


[emoticon:599cc6d89e2145289084ee73d7cb364b] Prerequisites

  • You have access to the Documentum REST API (e.g., via a base URL like http://<host>:<port>/dctm-rest).

  • You have a valid authentication token (e.g., a JSESSIONID or Bearer token depending on your setup).

  • You know the object ID or repository path of the document you want to download.


[emoticon:50e30df2c8334a508ea0b3e9c7f031a4] Step-by-Step: Download a Document as Binary

1. Authenticate

Make a login request (if not using SSO/token-based auth):

POST /dctm-rest/repositories/<repo>/login
Authorization: Basic base64(username:password)

This returns a session token (usually a JSESSIONID cookie).


2. Get Document Metadata (Optional)

To confirm the document’s content URL:

GET /dctm-rest/repositories/<repo>/documents/<objectId>
Accept: application/json

Look for the "content-media" link in the _links section.


3. Download the Binary Content

GET /dctm-rest/repositories/<repo>/documents/<objectId>/content-media
Accept: application/octet-stream

Or, directly:

GET http://<host>:<port>/dctm-rest/repositories/<repo>/documents/<objectId>/content-media

Headers:

Accept: application/octet-stream
Cookie: JSESSIONID=<your-session-id>

This returns the raw binary stream of the file (e.g., PDF, DOCX, etc.), which you can save to disk.


Example Using curl

curl -L \
  -H "Accept: application/octet-stream" \
  -H "Cookie: JSESSIONID=abc123" \
  -o downloaded_file.pdf \
  "">localhost:8080/.../content-media"

[emoticon:ae7100130967426ea42e41262baebc23] Notes

  • Some documents may have multiple content parts — this only fetches the primary content.

  • If you’re using OAuth, replace the Cookie with an Authorization: Bearer <token> header.