- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 11:49 AM
First . . . I am brand new to Service Now and a pretty new developer.
I requested a PDI, it's running and I used a template to create a PTO application. Now I'd like to access that application using REST API calls. Does my PDI expose REST API?
Any source of help for this would be appreciated.
Steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 01:31 PM
Hi, PDI's are accessable via API and they require the same configuration as a Production instance.
I would start by creating an oauth Client record via menu module
System Oauth > Application Registry
and then testing the token end point
/oauth_token.do
In Postman
Type = Post
Endpoint = https://<yourInstance>.service-now.com/oauth_token.do
Authorization Type = Bearer Token (drop down selection on authorization tab)
Body (x-www-form-urlencoded)
grant_type: password
client_id: <from Your Oauth Client Record>
client_secret: <from Your Oauth Client Record>
username: <the SNC account you are using for integration>
password: <SNC account password>
The developer portal has some good learning material and I would recommend that you work through it.
Courses | ServiceNow Developers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 01:31 PM
Hi, PDI's are accessable via API and they require the same configuration as a Production instance.
I would start by creating an oauth Client record via menu module
System Oauth > Application Registry
and then testing the token end point
/oauth_token.do
In Postman
Type = Post
Endpoint = https://<yourInstance>.service-now.com/oauth_token.do
Authorization Type = Bearer Token (drop down selection on authorization tab)
Body (x-www-form-urlencoded)
grant_type: password
client_id: <from Your Oauth Client Record>
client_secret: <from Your Oauth Client Record>
username: <the SNC account you are using for integration>
password: <SNC account password>
The developer portal has some good learning material and I would recommend that you work through it.
Courses | ServiceNow Developers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2022 05:19 AM
Hi Tony . . .thanks for the response. I will go thru the developer portal. That said, I am anxious to actually see the REST API work and I cannot find the "menu module" and that seems pretty basic.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2022 05:57 AM
I found the System Oauth > Application registry, created an oauth Client, and following the rest of your directions got a 200 OK sending to /oauth_token.do
However, when I try to substitute my URI, it fails and geives a "Requested URI doesn't exist" message, but I am copying and pasting that URI from my browser where it DOES work.
I'm lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2022 05:28 AM
Hi steve,
Your instance has API Rest Explorer for all the tables and applications that you have on it. Search 'Rest api explorer' on filter navigator and you will there all tables and applications for using rest methods (Get, Post, Put, Patch and delete)
Apart from this, you can use POSTMAN also for this. Postman it's an application which allows you to work on this REST calls. Only need to set a basic profile and you can start creating calls. Check this easy video: https://www.youtube.com/watch?v=UQb4bHIvjsM
If it was helpful, please give positive feedback.
thanks,
☆ Community Rising Star 22, 23 & 24 ☆