Download documents from DOCUMENTUM or CMIS

Certified Lead Developer

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

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

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

  • 0
    Certified Lead Developer
    in reply to Mathieu Drouin

    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

  • 0
    Certified Lead Developer
    in reply to Alfonso

    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:


    White check mark 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.


    Inbox tray 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"
    

    Tools 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.

Reply
  • 0
    Certified Lead Developer
    in reply to Alfonso

    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:


    White check mark 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.


    Inbox tray 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"
    

    Tools 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.

Children
No Data