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.

Download encrypted attachment using API

RagunathC
Tera Contributor

Hello all 

 

I am trying to download an encrypted attachment using this API https://myinstance.com/api/now/attachment/{sys_id}/file.

Files without encryption works without any issues.

 

I get the following response

 

    "error": {
        "message""No Record found",
        "detail""Record doesn't exist or ACL restricts the record retrieval"
    },
    "status""failure"

 

How do I download encrypted files using service now API?

 

Thank you

Ragu

2 REPLIES 2

Najmuddin Mohd
Mega Sage

Hi @RagunathC ,
Are you sys_id should be of the Attachment from the sys_attachment.LIST table.

 

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin,.

Hi Nahmuddin,

 

I have the Sys_id and I am able to download unencrypted file without any issues.

 

I get the error only when I try to download files that were encrypted while uploading.

 

Hope this helps.