GET getFileContentById
GET getFileContentById
Method Description | This function allows you to get a file from SharePoint and returns its contents in a format called Base64, which is often used to safely store or send files as text. |
Returns | |
Limitations | File size capacity is limited to files 10MB or smaller |
Usage | For notes on how to authenticate see NetSuite documentation. |
Since | FileSync 0.6.0 |
Request Parameters
Parameter | Type | Required | Description | Since |
---|---|---|---|---|
| string | required | Static value that has to equal getFileContentById | 0.6.0 |
| string | required | Static value that has to equal customscript_b4cd_fileapi_rl | 0.6.0 |
| string | required | 0.6.0 | |
options.fileUniqueId | string | required | The unique ID of the file for which the content is being requested. This value is generally retrieved by making a call to the getRecordFolderContents method. | 0.6.0 |
options.recordTypeConfigId | integer | required | Internal ID of the FileSync Record Type Configuration record (customrecord_b4cd_record_type_config). | 0.6.0 |
Returns
Property | Type | Description | Since |
---|---|---|---|
| string | The file or folder name | 0.6.0 |
| string | The unique ID of the file or folder as assigned by the file hosting service. | 0.6.0 |
| string | Possible Values: "file", "folder" | 0.6.0 |
| integer | File size in bytes. | 0.6.0 |
| string | The URI used to access the file or folder via the API. | 0.6.0 |
| string | The relative file or folder path on the file hosting service starting from the base directory. | 0.6.0 |
| string | The user-navigable URI for the folder or file on the file hosting platform. This can be used to construct hyperlinks for users to reach the file or folder externally. | 0.6.0 |
| string | File contents as encoded Base64 content | 0.6.0 |
Errors
Error Code | Details |
---|---|
| A required argument is missing or undefined. |
Request Query Parameter Example
{ script: "customscript_b4cd_fileapi_rl", deploy: "customdeploy_b4cd_fileapi_rl", action: "getFileContentById", fileUniqueId: "a234d1232-45ee-9b75-2944-c0833fa68c29", recordTypeConfigId: 3 }