- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 08-11-2021 02:35 PM
Summary
Using a Rest api is useful when you need to query for ServiceNow data on a public page. Querying for data requires authentication meaning all global data brokers require sign on. Using a rest api is a good way to bypass authentication and still retrieve your data. You can do other operations with a REST data broker such as transforming and altering data, eliminating the need for other data brokers.
| ![]() | |
5. Fill out the Name and Description fields 6. In this example, our Http method is GET 7. Fill out the properties field as shown above
8. Skip the API and Parameters fields for now, we will come back to this field on step 26 9. Double click the top grey bar and click save or insert and stay
|
| |
10. Open a new window of your instance and use the filter navigator to navigate to System Applications - Studio 11. Select the Application your page resides in 12. Click the +Create Application File button in the top left of the page 13. Type “REST” or “scripted REST API” into the filter and select Scripted REST API | ![]() | |
14. Fill out the Name field 15. The API_ID will be auto generated but you can change it if you desire 16. Click Submit 17. Scroll to the bottom of the page and select the Resources tab 18. Click New
| ||
19. Fill out the name and relative path field
20. Right Click the top grey bar and Save | ![]() | |
21. The Resource Path should now appear beneath the HTTP method and Relative path fields 22. Copy this field to your clipboard 23. Keep this record open as you will return to it to write the script |
| |
24. Return to your REST Data Broker record page from Step 4 25. Paste the Resource path into the API field 26. Fill out the parameter field as follows
27. Click Save
|
| |
28. Now return to the window where you created your REST resource from step 18 29. The script below queries the user table by user Id and returns the user’s name and email
Pasted below is the script: (function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {
|
| |
30.Scroll down and make sure to uncheck the Requires Authentication checkbox 31. Update the record | ![]() | |
32. Return to your UIB page 33. Click the data resource Icon 34. Click +Add 35. Select the application scope your page and data resource resides in 36. Select the REST data broker we just created 37. Click Add | ![]() |
- 4,509 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
Looks promising but the image are broken on my side 😞
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Are we going to fix this?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Can you fix the images please?
Thanks
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Nick121 Kindly fix this issue 😞 Looks very promising but hard to follow without screenshots.