Inbound API to download and upload large files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:15 AM
I have a requirement where I need to provide two endpoints:
1 - Endpoint that receives the sys_id of an attachment. Using this endpoint, the user will download the attachment.
2 - Endpoint that receives sys_id and table name of target record and a file. Using this endpoint, the user will upload a file to the target record.
I could use the OOTB Attachment API but it has limitation on the file size and I wouldn’t be able to alter the values of the properties that control these limits.
Is there any other way to achieve this requirement? The user needs to upload and download files to ServiceNow up to 1 GB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:59 PM
Hi, I believe that all REST\API payloads are subject to size limitations
Controlling maximum request size (servicenow.com)
but was unable to test this in a PDI as my 23mb and 50mb payloads resulted in timeouts; which are probably to be expected and I expect any large payload would encounter timeout issues even if there was no size cap.
In my opinion increasing timeout to allow for 1G files would have a detrimental impact to your operational environment and so even if the size was not an issue this scenario should be avoided.
1 option might be conversion to base64, post the file in chunks/paginate and then reassemble the separate pieces at destination.