PrizmDoc® Viewer v14.0 Release - Updated
PrizmDoc Viewer / API Reference / PAS REST API / Viewer Support / Attachments
In This Topic
    In This Topic


    The attachments REST API is used by our viewer to get EML, MSG, and PDF Portfolio attachments for a document being viewed.

    Available URLs

    URL Description
    GET /ViewingSession/u{ViewingSessionID}/Attachments Lists the attachments available in the source document.

    GET /ViewingSession/u{ViewingSessionID}/Attachments

    Routes key: GetAttachments

    This API returns a JSON list of attachment objects. If the return object list length has a zero count and no errors detected, there are no attachments. The status property of the list object indicates whether or not the list has been completed. If the list hasn't been completed, the request must be retried again. Each Attachment object in the list contains displayName and viewingSessionId property. The displayName can be used to label an href link on a web page and the link points to the viewingSessionId URL for the attachment.


    URL Parameters

    Parameter Description
    {ViewingSessionID} The ID of the viewing session associated with the request.

    Successful Response

    Response Body

    If successful, this method returns the following properties:

    • status (String) Specifies the current status of the attachments.
      • "pending" - There may be attachments, but the list has not yet been constructed.
      • "complete" - The list is known and present in this object.
    • attachments (List) The list of attachments, if any. Each item in this list will be a new viewing session ID, which is used to view any of the listed attachments in the Viewer by passing in the viewing session ID provided in this list.

    Error Responses

    Status Code Description
    500 Internal service error. This error can be returned for a number of different reasons. Please verify that your input is correct, and contact Support if the error persists.



    GET pas_base_url/ViewingSession/uGcIsIsEGbLV2_V9yy4NzmK2HB-JuLOH--A9sZ16cla9txO0ZDBGfq1G4kKu0r_GyEps4wWCvDwn4dpnZAR76Uw/Attachments

    NOTE: See the Base URL for PAS topic for more information.


    HTTP/1.1 200 OK
    Content-Type: application/json
        "attachments": [
                "displayName": "example-file.pdf",
                "viewingSessionId": "SC0fZEMYiiGdOPMKBqLY8P6EAnVLEqxeTHjUUYqqxgJJc3s3wsQ8Lw2qqvkD1uLKTpAlF1ce23EQ6BFpYb4E3LC9TsXxwHCgB-I1c5rPOt0"
                "displayName": "second-example.doc",
                "viewingSessionId": "33qQovKTjc0UKbNgOI-5POEyCpNw5x-uEzGMB13iUVhnCa_UHSSnOpRBEzPKeD7Maxq2RQu2SOOwJjl4X4iU_65OQjx2EI5-7h-bXlYc6uA"
        "status": "complete"