Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

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

3 REPLIES 3

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.

Narendran2
Tera Expert

Hi Ragunath,

Could you pls share the solution you figured out for this scenario.

 

Thanks & Regards,

Narendran