REST API EXPLORER
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2017 08:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2017 10:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2017 02:32 PM
Hi Carlos,
The REST API Explorer is a developmental test bench to help build REST integrations. It is not intended to be used as a standalone app. Are you trying to build a REST integration with the test table? Please help me understand the "underlying requirement" instead of the "proposed solution". Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2017 05:48 AM
Yes, i am trying toa REST integration with the test table. i did this by using this script:
var request = new GlideHTTPRequest('https://dev25125.service-now.com/api/now/table/sys_atf_test_suite');
request.setBasicAuth("rest", "rest");
request.addHeader('Accept', 'application/json');
var response = request.get();
gs.log(response.getStatusCode());
gs.log(response.getBody());
so i was able to get back all the values from the test table using this script.
Carlos

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2017 05:51 AM
Hi Carlos,
You are on the right track.
Take a look at sn_ws.RESTMessageV2(). It provides similar functionality, but it is better suited to REST integrations and works in scoped apps.
You can get a snippet of it's usage from the link on the REST API Explorer if you use another table (as a test) and then set your endpoint accordingly in the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2017 06:17 AM
thats great. i have another question using that script in the background-Script its getting my back all data from the test table which is great. Now i want to use that script in a table in the "Run this script" so when user submit the form the sript will be automatic ejecuted and presented the result in another table if possible.
this is table i am creating so the script i gave you above it would be in the red box.
is it possible? i appreciate any help provided.