Attachment API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 05:09 AM
Hi
can anyone suggest how to create incident attachment POST API along with the fields short description and description by using REST API explorer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 05:19 AM
incident attachment post API?
Are you saying while creating incident itself you want to send attachment data?
That's not possible using either Table API or Attachment API
1st you need to use Table API to create incident and then use Attachment API to post a file to that newly created incident
OR
You can use scripted rest api and create incident and at same time add file to it
check this link and enhance your logic to create incident and tag the file with it
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 08:45 PM
Hi Ankur thank you for your response
In REST API explorer there are three mandatory fields while creating attachment POST API for incident can you please give me one example what values I need to place in those three fields 1 table name (we can give incident table name) 2 table_sys_id( is this individual incident sys id??) 3 File _name(??) sharing screen shot for reference kindly help me in this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 09:46 PM
you need to give the name of table -> incident
then the record sysId to which the file should be attached and the file name
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 10:54 PM
Hi Ankur
following above steps 1.table name (incident) 2.tabale_sys_id(incident sys id -82247108db4588500bc0ef3c0b96198b ) 3.filename (image002) but I am getting the error code BAD request sharing screen shot for reference