Looking for Attachment API and sample payload details for 3rd party tool to send attachments to SN

Suggy
Giga Sage

There is an external 3rd party tool which creates incidents in ServiceNow. We have shared the scripted end point.

 

But now need to share the API details for Attachment, along with sample payload.

 

I shared below, 

https://xxxxx.service-now.com/api/now/attachment/file

 
but they are asking what is file above? how do they send the file? They need sample payload.
 
Please help!
9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@Suggy 

if you have created scripted REST API, they can send Attachment details in same payload and you can then add file to your target record

check these links and enhance it as per your logic

Sending attachments using custom scripted web service

Scripted Rest API to update incident with attachment  

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar Thanks for that!

But can I get similar content for OOTB Attachment API please?

@Suggy 

I will suggest to use the scripted REST API and handle the data and attachment part both.

For OOTB Attachment API, links shared by @Maik Skoddow should help you.

also check this link on how to send file from postman to instance, 3rd party also need to do the same

How to send the attachment from postman tool to servicenow? 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Suggy 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar They did not accept to go with scripted rest api.

They want to use OOB Attachment API.

I shared the docs link. and asked them to send the attachment content in the body, still they are asking to send sample payload.

I am not sure how explain them.