How to fetch Single Record by using Get Method through using TABLE API in REST API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 04:04 AM
How to fetch Single Record by using Get Method at TABLE API in REST API?
Please provide examples.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 04:06 AM
Hi,
- Open REST API EXPLORER.
- Select the table name.
- From left choose GET
- Set sysparm_limit to 1
- Click on the send button
- Find screenshot attached & you can use sysparm_query to select a particular record such as user_name="abc". it will return user with username abc.
You will get the response.
Thanks
Sudhanshu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 04:12 AM
Hi,
If you want single specific record then you can append the sys_id in the end point to fetch the required record. An example endpoint will be something like below which will get incident based on provided sys_id.
/api/now/v1/table/incident/{sys_id}
if you want to randomly get 1 record then you need to pass query parameter sysparm_limit=1 to limit result returned to 1 record.
Thanks,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2020 04:26 AM
Hi Ram,
If you want to fetch single record using OOB Table API then you need to know the record sys_id
endpoint something similar to this
https://instanceName.service-now.com/api/now/table/{tableName}/{sys_id}
Also most of the times OOB table API is not used as it exposes all the fields to 3rd party
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2020 07:40 AM
Hope you are doing good.
If your query is resolved please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader