Sending attachments over a REST message to an incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2019 03:55 PM
how do i send an attachment to an incident over a REST message ?
The target instance has a scripted REST API Endpoint, which I need to consume and send an update to an incident including attachment files.
Also, how do i parse the received REST message on the target, extract the attachment and attach it to the incident?
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2019 04:20 PM
Hi, I don’t think you need to parse the attachment message, as there is a dedicated Attachment API.
The response from your incident insert\update should give you the record sys_id and sys_class_name and with these values (and the file name) you should be able to use the Attachment API to upload your file(s).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2019 04:24 PM
If you are sending an attachment from one instance to another, the solution below may help you:
Sending a pdf to the Rest API with javascript
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022