Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2017 12:14 PM
Here is an example that pulls from the incident table. I typically use axios instead of request for various reasons. There is also an API explorer to help you form your requests in a better way.
import axios from 'axios';
axios.get(
'https://{your instance}.service-now.com/api/now/v2/table/incident?sysparm_limit=1',
{headers:{"Accept":"application/json","Content-Type":"application/json","Authorization": ("Basic " + new Buffer("admin:{your password}").toString('base64'))}}
).then((data)=>{
console.log("Your Data",data)
}).catch((e)=>{
console.log("error",e.toString());
});