How to use REST data broker in UI Builder to retrieve ServiceNow data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have read one of the most efficient ways to retrieve data in UI Builder or a Workspace is by using internal REST APIs to retrieve the data to display, however, I have not been able to find any examples I can follow or seen any documentation or posts on how to do this. I've looked at some components built for CAB meetings in Service Operations Workspace that do use REST to get data, but a lot of it is hidden and I can't figure out how it is done.
Using a very simple example, how would I create a REST data broker in a workspace to retrieve data from the Incident table and display the data in a repeater? Can anyone walk me through this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
You can achieve this by creating a Scripted REST API to fetch Incident records, then exposing it via a REST Data Resource (Data Broker) in UI Builder.
Bind the data broker output to a Repeater using @data.<resource>.output, and inside the repeater use @item.value.<field> to display values like number and description.
The key idea is: Data Broker fetches data → Repeater renders the array.
For simple use cases, you can also use “Lookup Multiple Records” instead of REST.
For more details you can refer to the below articles:
UI Builder: How to create and use a REST data brok... - ServiceNow Community
All About Data Resources in UI Builder - ServiceNow Community
How to use Repeaters in ServiceNow | by Debendu Das | Medium
Next Experience - UI Builder Basic Repeater Exampl... - ServiceNow Community
If this response helps, please mark it as Accept as Solution and Helpful.
~Ak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @gjz
Refer following posts/video:
UI Builder: How to create and use a REST data broker
https://www.youtube.com/watch?v=3SgY8E6T7oA
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti