Get Communication First Attachment
This request returns the first attachment of a communication object. For retrieving a speccific attachment, see: Get Communication Attachment
Resource
GET /attachments/<OID>/attachment
Where <OID> is the communication’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 attachment
Request
GET https://xelion.nl/api/v1/master/communications/2313503/attachment
Response
{
"object": {
"originalLocation": "doc.html",
"mimeType": "text/html",
"contentsB64String": "PGh0bWw+DQo8Ym9keT4NCjxoMT5ncmVldGluZ3M8L2gxPg0KaGVsbG8hDQo8L2JvZHk+DQo8L2h0bWw+",
"hasThumbnail": false,
"size": 60,
"commonName": "doc.html",
"oid": "2313501",
"objectType": "Attachment"
}
}
Retrieve contents
Request
GET https://xelion.nl/api/v1/master/communications/2313503/attachment?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>