How to attach a file using scripted rest api in incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 07:29 AM
I have a requirement where I have designed post scripted rest API which will handle Impact, Urgency, Short Description, Description sent from 3rd party.
Now I would also like to handle attachment . Third party system is also servicenow. They can attach any file in Incident record and my API should be capable enough the attach the same file in target servicenow instance.
Could someone please help me with the set of code .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 07:36 AM - edited ‎04-01-2024 07:38 AM
Hello @Meghant Rai ,
There is a solution shared here; try to enhance it further
Scripted Rest API to update incident with attachment
Regards
Achyut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 03:24 PM
It didn't worked, below is the code but the file getting attached is undefined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2024 03:26 PM
@Ankur Bawiskar : Can you please help here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2024 05:32 AM
The Pdf content is showing as blank
This is code I modified