Not able to attach files to incident through REST API

nehasr1288
Tera Expert

When I try to raise an incident using rest api ,I

tried to attach a file but the incident is raised but file is not attached

Capture.png

1 ACCEPTED SOLUTION

Hi Neha,



I was able to do this successfully.



You should change sys_id to table_sys_id and also check the post query string checkbox. Please try and let me know



find_real_file.png




Thanks


Please Hit like, Helpful or Correct depending on the impact of the response


View solution in original post

11 REPLIES 11

dravvyramlochun
ServiceNow Employee
ServiceNow Employee

You can refer to the Attachment API and this can help you to understand how to attach the attachments to your incidents.



Regards,


Dravvy


shloke04
Kilo Patron

Hi,



You can refer the below links which will be useful for your query:



Generate Attachments in ServiceNow via REST | John Andersen


Web Services Part 5 | How to Make REST Attachment API Requests - YouTube


ServiceNow Attachment Files via Web Service - YouTube


Attachment API



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke