Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Attachment API returning 404 error

Anirudh Gupta
Mega Expert

Hello community members,

Hope all are safe and doing great!

I am trying to retrieve/download an attachment using the Attachment API. This attachment is a csv file attached to a record on sc_request.

But when I try to hit it using the REST API Explorer it returns with a 404 error although the record is there is the sys_attachment table.

find_real_file.png

find_real_file.png

Any idea why this could happen ?

Although the logged in user is an admin and all the READ ACL has admin override checked. Also to be at a safer side have created an ACL which gives read access to admin role.

Any kind of help is highly appreciated.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Anirudh,

Are you passing the sys_id of the attachment record? 

 

-Pradeep Sharma

View solution in original post

5 REPLIES 5

You are very welcome Anirudh. Thanks for participating in the community.

- Pradeep Sharma