- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 09:53 PM
/api/now/attachment?sysparm_fields=sys_id
sysparm_fields is not working for attachment api.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 10:30 PM
Hi,
what is your expected result .can you expain .
also check this one may help you https://developer.servicenow.com/dev.do#!/reference/api/tokyo/rest/c_AttachmentAPI

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 11:26 PM - edited 06-29-2023 11:27 PM
Hello
sysparm_fields is not an option in the Get operation of the attachment API. Please try to use something like this -
/api/now/attachment?sysparm_query=sys_id=30a53f2c97b721106f5ab0efe153af59
Also, check the Rest API Explorer in ServiceNow - https://docs.servicenow.com/en-US/bundle/utah-api-reference/page/integrate/inbound-rest/concept/use-...
I hope this helps you.
Regards,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 10:03 PM - edited 06-29-2023 10:04 PM
Hi,
Try to change sys_id to table_sys_id . Please try and let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 10:18 PM - edited 06-29-2023 10:19 PM
sys_id is also a field in response. I tried with all the possible field options but, i am not getting the expected output.
sample response :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 10:30 PM
Hi,
what is your expected result .can you expain .
also check this one may help you https://developer.servicenow.com/dev.do#!/reference/api/tokyo/rest/c_AttachmentAPI

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2023 11:26 PM - edited 06-29-2023 11:27 PM
Hello
sysparm_fields is not an option in the Get operation of the attachment API. Please try to use something like this -
/api/now/attachment?sysparm_query=sys_id=30a53f2c97b721106f5ab0efe153af59
Also, check the Rest API Explorer in ServiceNow - https://docs.servicenow.com/en-US/bundle/utah-api-reference/page/integrate/inbound-rest/concept/use-...
I hope this helps you.
Regards,
Omkar