The CreatorCon Call for Content is officially open! Get started here.

How can I get REST API access to my App Engine Studio PDI instance

Steve Jennings
Tera Contributor

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

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

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

 

View solution in original post

8 REPLIES 8

Steve Jennings
Tera Contributor

Hi Adrian . . . thanks! I actually got Postman to return a 200 by using Tony's suggestion. 

However, when I try and access a table in my app, I get a "Requested URI does not represent any resource". But the URI I am pasting in gives a valid XML response showing my table.

Also, when I watch the video, it says use "Basic Auth" which returns the same message "Requested URI does not represent any resource".

Here's the URI I am using:

https://dev76724.service-now.com/api/now/table/x_857924_ptorequ_0_request
 
And when I put that into my browser, it works and returns my table data in XML.
 
Any thoughts?

Hi Steve,

when you say 'I try to access a table in my app' you try this with postman or browser and with which user are you doing this testing?

Thanks,

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆

Steve Jennings
Tera Contributor

I simply needed to add ? to the end of the URI. All is working well in Postman.

 

Python is still a problem.

 

Thanks

Steve Jennings
Tera Contributor

And my python code is fixed and works . . . just needed to set a proxy.