Downloading Attachments by Using the External Approval API

This procedure describes how to use the External Approval API to download attachments.

Prerequisites

Context

The GET /Document/<documentId>/attachments/<docAttachmentId> endpoint of the External Approval API enables you to download an attachment.

Procedure

  1. Use the GET /Workspace/{workspaceId} endpoint to obtain the document ID (documentId) in the response.

    Example:

    GET {{runtime_URL}}/Workspace/WS2474005?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite
    Specify the following required parameters:
    • user: It is the ID of the user for whom the External Approval API will perform the action. This is a required parameter.

    • passwordAdapter: It is the password for authenticating the user, such as PasswordAdapter1. This is a required parameter.

    • realm: It is your site name. This is a required parameter.

  2. Use the GET /document/{documentId} endpoint to obtain the ID of the attachment (docAttachmentId) in the response.

    Example:

    GET {{runtime_URL}}/document/Doc44449999?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite
    Specify the following required parameters:
    • user: It is the ID of the user for whom the External Approval API will perform the action. This is a required parameter.

    • passwordAdapter: It is the password for authenticating the user, such as PasswordAdapter1. This is a required parameter.

    • realm: It is your site name. This is a required parameter.

  3. Use the GET /Document/{documentId}/attachments/{docAttachmentId} endpoint to download an attachment.

    Example:

    GET {{runtime_URL}}/Document/Doc44449999>/attachments/AAMAGM3377A?user=myUser&passwordAdapter=PasswordAdapter1&realm=mySite
    Specify the following required parameters:
    • user: It is the ID of the user for whom the External Approval API will perform the action. This is a required parameter.

    • passwordAdapter: It is the password for authenticating the user, such as PasswordAdapter1. This is a required parameter.

    • realm: It is your site name. This is a required parameter.

    To troubleshoot your queries to the External Approval API, refer to Error Messages Returned by the External Approval API.