Download a document - via JSON base64 string
Attachment View
Parameter | Description | Examples | More info |
---|---|---|---|
API | The API area | attachments.json | |
Action | action=attachmentview | ||
<General> | Parameters described in overview | user=user&password=user | v3.3 Overview |
Attachment | attachment=5471 |
For retrieving the base64 of the attachment Note: If the attachment is stored in S3 (cloud) it has to download from AWS to the 4D Server and convert into base64
Example request:
http://<SERVER>/jsonapi/attachments.json?&user=user&password=user&version=3.3&company=1&attachment=5471&action=attachmentview
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"totalrows": 1,
"totalpages": 1,
"responsemessage": "",
"pagerows": 0,
"pagenumber": 1,
"success": true,
"data": [
{
"attachmentUuid": "E4A7C32FC8A5D849BED41CDA8256DBF2",
"attachmentTimestampModified": 1501773244,
"attachmentRecordVersionNumber": 1,
"attachmentOriginalFilename": "tmp.csv",
"attachmentBase64": "SEVSRSBJUyBTT01FIFRFWFQNCg==",
"attachmentContentDisposition": "attachment; filename=\"tmp.csv\"",
"attachmentContentType": "application/csv"
}
]
}