Get Communication Attachment
This request retrieves an attachment of a communication object.
Resource
GET /communications/<OID>/attachments/<ATTACHMENT_OID>
Where <OID> is the communication’s object ID and <ATTACHMENT_OID> is the attachment’s object ID.
Parameters
Name | Type | Description |
---|---|---|
|
[json|stream] |
if stream is specified then the attachments contents are streamed to the client. |
|
boolean |
retrieve the thumbnail of this attachment. See Get Thumbnail for more information. |
Payload
None
Response
The Attachment field contentsB64String
contains the attachment’s data in Base64 econding.
Context
Authorization |
User |
Errors
HTTP code | Xelion code | Description |
---|---|---|
500 |
11000 |
If the attachment exceeds the maximum size or another server error occurred. See error message for more information. |
Examples
Retrieve the attachment object
Request
GET https://xelion.nl/api/v1/master/communications/2313503/attachments/2313501
Response
{
"object": {
"originalLocation": "doc.html",
"mimeType": "text/html",
"contentsB64String": "PGh0bWw+DQo8Ym9keT4NCjxoMT5ncmVldGluZ3M8L2gxPg0KaGVsbG8hDQo8L2JvZHk+DQo8L2h0bWw+",
"hasThumbnail": false,
"size": 60,
"commonName": "doc.html",
"oid": "2313501",
"objectType": "Attachment"
}
}
Stream the contents
Request
GET https://xelion.nl/api/v1/master/communications/2313503/attachments/2312501?response_type=stream
headers
Content-Type: text/htmol;charset=utf-8 Content-Disposition: attachment; filename=doc.html ...
body
<html> <body> <h1>greetings</h1> hello! </body> </html>