Introduction
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 /PCCIS/V1/ViewingSession/u{ViewingSessionID}/Attachments | Lists the attachments available in the source document. |
GET /PCCIS/V1/ViewingSession/u{ViewingSessionID}/Attachments
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.
Request
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. |
Examples
Request
GET prizmdoc_server_base_url/PCCIS/V1/ViewingSession/uGcIsIsEGbLV2_V9yy4NzmK2HB-JuLOH--A9sZ16cla9txO0ZDBGfq1G4kKu0r_GyEps4wWCvDwn4dpnZAR76Uw/Attachments
NOTE: See the Base URL for PrizmDoc Server topic for more information.
Response
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"
}