getBinaryData
Purpose
Retrieves the file attachment associated with a particular file field from a specific record.
For objects in dedicated tables, you must specify the objName parameter.
HTTP Method
GET method
URL
https://app.infiniteblue.com/rest/api/getBinaryData
URL Parameters
sessionId
The session ID obtained from the body of the response when calling login.
objName
The object integration name.
id
A long value containing the record ID.
fieldName
A string containing the file field integration name.
output
Optional parameter specifying the output format, which is one of:
raw(the default) for raw binary output.xmlfor XML output.jsonfor JSON output.
Permissions Required
View permission for the requested object type.
Response
The file attachment from the specified file field. The content type and length of output will be set to correspond to the attachment.
Example
Input example (URL parameters) specifying JSON output:
http://localhost:8080/rest/api/getBinaryData?objName=a&id=806765 &fieldName=My_File&output=json&sessionId=a78c32aeff854b9e91833efd4d304aef@5903
Output example in JSON (fileData truncated):
{ "My_File": { "contentType": "application/octet-stream", "fileName": "Bug.node",
"fileData": "LyoNCiAqIFByb2dyZXNw0KCQl9KTsNCgl9KTsNCn0NCg0K" } }