help needed for api call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2024 02:40 PM
hi
i have a field called u_imapcted_asset but when i put into the Rest API i am not getting any result . not understanding why
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 12:24 AM
Hi @chercm ,
You have a typo in your field name (dictionary is u_imAPcted_asset) and you are missing an operator in your query.
An easy way to get an encoded query is by navigating to the list view, forming your filter and then right clicking on the filter breadcrumb and select 'Copy Query'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 12:42 AM
Hi @chercm ,
Query parameter is wrong, Impacted asset field is list type so it will accept sys_id like below.
u_impacted_assetLIKEd64b9bd783095210a9589780deaad3c6.
LIKE means contain here.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 01:47 AM
Hi @chercm,
The easiest way is go to incident table and get the encoded query from the filter and paste it here. I guess you have put the query manually.
I hope it helps..
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 02:34 AM
Hi @chercm ,
sysparm_query= u_impacted_asset=00aba08d3790200044e0bfc8bcbe5dfc
From incident list view open your designated asset record then right click and copy query.
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand