Using the Table Rest API and Joins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2022 11:04 AM
Hi community.
I am using the Table REST API to extract the following tables:
sc_req_item,
sc_item_option,
sc_item_option_mtom
Is there a way, in the filters that I can join and filter on all 3 tables in one api call?
e.g. Get all requests made by x-user, for a specific item category, and for that category get the rows from mtom for 2 list-values ?
Im struggling a bit with dotwalking and also saw a post https://www.servicenow.com/community/developer-forum/rest-api-and-a-quot-get-quot-function-of-a-join... that mentions joining through the API. but when doing some, either no rows are returned, or some rows but fields from the task table.
Best regards
GloriousWater

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2022 04:39 PM
Have you tried a script rest api? This should allow you to queries the table and return the response needed. https://docs.servicenow.com/bundle/tokyo-application-development/page/integrate/custom-web-services/...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2022 01:27 PM
I am familiar with the "regular" rest api. I can query each table and then do the join, but I want to reduce the amount of data queried that will be excluded after the join. e.g. join serverside, then return the results. Its unclear to me how I do that with the script api.