cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Prime Infrastructure 3.1 API Tutorial with Postman

2853
Views
9
Helpful
4
Comments
Cisco Employee

Hey folks.  We've been striving to make the API easier to learn and adopt.  One of the ideas we've come up with is publishing a Postman collection of requests that follow the Prime Infrastructure 3.1 API tutorial.

So without further ado, here's the Postman collection for the 3.1 tutorial.

Before you begin

Be sure to complete step 1 of the tutorial and create (or update) a user.

Before sending each request in Postman, go to the Authorization tab, enter the username and password of your user, then click Update Request.

Next, create an environment in Postman.  Click the sprocket icon postman_sprocket.png next to the environment list, then click Manage Environments.  Then add a new environment, and setup one variable called "hostname" with a value of the IP address or hostname of your Prime Infrastructure server.  Be sure to click the add button then select this environment in the dropdown.  After you finish, you should have something like this.

postman_environment.png

Lastly, since your Prime Infrastructure server has an untrusted self-signed certificate (unless a trusted certificate has been installed) be sure to visit the Prime Infrastructure server in your browser and click past the security warning.  Otherwise, Postman requests may fail.

We need your feedback

Please let us know what you think.  Should we publish more Postman collections?  Did you find this helpful?  Would you like to see Postman integrations (like "Run in Postman" buttons) directly in the API documentation?

Please share any suggestions, comments, and criticism in the comment section below!

4 Comments
Cisco Employee

Great initiative Spencer.

Any thoughts on getting a Prime Always On demo server in dcloud, similar to APIC-EM.

Adam

Cisco Employee

I've mentioned this idea to some of the marketing folks a few times.  I think one of the biggest blockers is ensuring that we have devices to interact with.  I've successfully managed to get Prime Infrastructure and VIRL working together, which could be a solution (VIRL would allow us to reset the topology back to a known good state as needed); but since it doesn't support wireless devices (controllers and APs) we wouldn't be able to expose the features that most of our customers are interested in.

How did you guys solve it for APIC-EM?

Cisco Employee

A DB only controller is being used for APIC.  It is populated with useful data, and is perfect for GET calls.  Lots of PUT/POST/DELETE will work, as long as they do not change device state.

It is a great tradeoff, and really useful.

Chat to me offline about the details.

Dont metter what I try to do with Postman, I always get some error.

Followed the tutorial:

-Created an environment with PI ip address

-Added username and pass

-I´ve connected to the Prime via Browser many times accepting the certificate.

What else can I check ?

Could not get any response

There was an error connecting to https://X.X.X.X

Why this might have happened:

The server couldn't send a response:

Ensure that the backend is working properly

Self-signed SSL certificates are being blocked:

Fix this by turning off 'SSL certificate verification' in Settings > General

Client certificates are required for this server:

Fix this by adding client certificates in Settings > Certificates

Request timeout:

Change request timeout in Settings > General

This widget could not be displayed.