How to get URL of all attachments from change request record through REST API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 02:10 AM
We are developing a custom application. On this application, it will display details of change request.
We plan to get them via the TABLE Api using GET method. Now we also need to show the links for the attachments on that change request record. We need help on doing this part via REST APIs.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 02:17 AM
HI,
I am confused. Sorry for that!!!!
Where you have to show this Links? On the change form or anywhere else.
Can you explain business case on this.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 02:37 AM
I updated the question and details to be more clear.
We need to show the links of the attachments on our custom application - this custom application summarizes all the different approvals from our different systems (ServiceNow is just one of them) as such we need this from ServiceNow.
I hope this is more clear.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2018 10:48 PM
We were able to figure this out:
Using the Attachment API of ServiceNow issue the below command:
GET https://instance.service-now.com/api/now/attachment?sysparm_query=table_name%3Dsourcetablehere%5E table_sys_id%3Dsysidhere
So to get all attachments from a change request record:
GET https://instance.service-now.com/api/now/attachment?sysparm_query=table_name%3Dchange_request%5E table_sys_id%3Dxxxxxxxxxxxxxxxxxxxxxx