How to get the attachment from a specific ticket by api ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2017 01:12 AM
I tried "api/now/v1/attachment/<sysid>" but got errors as the statement below.
{"error":{"detail":"Record doesn't exist or ACL restricts the record retrieval","message":"No Record found"},"status":"failure"}
I am sure that the <sys_id> is right and I can queried the ticket by the <sys_id>.
Does someone know how to fix it or the right way ?
Regards and thanks,
Fandy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2017 11:44 AM
Have you tested this with the REST API Explorer?
I think for the get, you specify the sys_id in the sysparm_query section, not on the URL.
Docs: REST API Explorer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2017 12:50 AM
We already tested "https://XXXX.service-now.com/api/now/attachment?sysparm_limit=10&sysparm_query=ile_name=backup-4.xls " but it still shows many records not related to this attachment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2017 06:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2017 01:07 PM
Hello Fandy,
Here you go.
Here replace d71b3b41c0a8016700a8ef040791e72a with the record sys_id and Incident with the exact table name.