We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

create incident with an attachment rest api?

Kiran Kumar 76
Tera Expert

we have a use case where third party create an incident with an attachment if it has one, I see we have two separate APIs to create incident  and add attachment .

 

so in this case how to combine these both APIs so that i create an incident and add attachment to the same after creating

 

 

 

1 REPLY 1

ChrisBurks
Giga Sage

The Attachment API requires that it have the sys_id of the record it is associated with so I don't think the two APIs can really be combined because the incident would need to be created first.

However, you can create a Script REST API so that you only need to use one API. https://nowlearning.servicenow.com/lxp/en/now-platform/now-platformname?id=learning_course_prev&cour...