JIRA SERVCIENOW - MIGRATION with REST API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I need to call the JIRA API to download files and save them into ServiceNow’s sys_attachment table.
However, I am running into the following issues:
When using getBody() from RESTMessageV2, the file is returned as a string, and binary files (images, PDFs, etc.) become corrupted.
When attempting to use getStream(), I cannot properly read the file stream in server-side scripts.
Even when trying GlideSysAttachment.write() or writeBase64(), the saved files are corrupted.
I need a reliable method to:
Download a file from JIRA via API.
Preserve its binary content correctly.
Save it into the ServiceNow sys_attachment table without corruption.
Could you provide a sample or recommended approach for this scenario?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @andrewjeun ,
Please review below KB article and see if it will help to resolve your problem..
Method to get attachments from JIRA to ServiceNow - Support and Troubleshooting
If you found my response helpful, could you please mark it as ‘Accept as Solution’ and ‘Helpful’? This small action goes a long way in helping other community members find the right answers more easily and supports the community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
did you check API documentation what's the response coming as?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
