cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2115
Views
12
Helpful
6
Comments
Spencer Zier
Cisco Employee
Cisco Employee

Hey folks.  As we wind down the development of 3.2, we wanted to preview some of the new features and enhancements coming to the API.  We're looking forward to your feedback on what you like, dislike, and what you'd change.  Since we're talking about a product still in development, please know that this post is not necessarily representative of the final product; what's presented here is subject to change without notice.

In 3.2, we're introducing API v3.  We're using the opportunity to make some changes to improve performance, resolve ambiguities, and reduce some complexity.  As we were developing API v3, we noticed that it was difficult to identify which resources underwent changes.  For example, we removed some response parameters in v3 from the GET Devices resource to improve performance, but unless you read the What's New page or specifically checked the documentation page for the GET Devices resource, you'd never know that a change was made to it in v3.

To make it clearer to know which API resources underwent changes in an API version, we've made some enhancement to the "Detailed Prime Infrastructure API Resource Documentation" (or as we refer to it internally, the index page).  These changes allow for you to see, at a glance, how an API version has affected any given resource.

index_1.png

(Click screenshot to see details)

In the above screenshot, note that there's a new column on the far right, "API Version".  It lists out all of the available API versions running on the appliance.  When a resource is introduced, or has undergone significant changes, the version will be highlighted in dark blue.  When it is available in a given version but did not undergo significant changes, the version will be highlighted in light blue.  Each version listing is a link that will take you directly to the documentation page for that resource in that version.  So, for the Devices resource, we introduced that resource in v1, and made a significant (and in this case, backwards incompatible) change to it in v3, so both the v1 and v3 links are dark blue.  However, in v2, the Devices resource was the same as it was in v1, so the link is light blue.

index_2.png

(Click screenshot to see details)

In some cases, for instance, when we've deprecated a resource, we've removed it from API v3.  In these cases, note that v3 listing is gray to indicate that the resource is not available in v3.

We've also made some enhancements to the pages that document each individual resource.  Previously, after we introduced API v2, we changed the pages that document each individual resource to include version tabs, but we only listed tabs for versions where the resource was introduced or significant changes were made.  For example, the Client Details resource had a v1 and v2 tab, but most other resources didn't.  In 3.2, each resource's documentation page will now have a tab for every version.  The tabs are color coded using the same scheme as we used above.

resource_doc_1.png

Again, using the Devices resource as an example, there is now a tab for each version, but only v1 and v3 are dark blue.  We also added a note to let you know what was changed in the version.  Following that note, is the table of the Response Parameters and the sample payloads, as before.

One other thing we'd like to note, in v2 we changed the JSON provider to get more consistent JSON output (the provider used for v1 would sometimes output JSON arrays as objects if they only had one member, or would change between strings and numeric data types depending on the content).  One of the other benefits of the enhancements that we've made is that you can now get JSON sample payloads for the v2/v3 provider even if there have been no changes to the resource since v1.  For example, the v1 page for Devices shows the following as part of the JSON sample payload

"manufacturerPartNrs" : {

          "manufacturerPartNr" : "String value"

}

But on the v2 page, it shows the following

"manufacturerPartNrs" : {

          "manufacturerPartNr" : [ "String value" ]

}

We hope this helps API developers understand and predict output from the API better.

Questions?  Comments?  Concerns?  Please leave your feedback below!

6 Comments
aradford
Cisco Employee
Cisco Employee

Thanks Spencer,

this is very helpful.

How long can people expect v1 of the API around?  Will that be deprecated at some point?

Adam

Spencer Zier
Cisco Employee
Cisco Employee

We don't have any dates yet.  It will definitely be deprecated at some point.  When we deprecate, we'll give clear notice in the documentation shipped with the product as well as post about it here.  That notice will include the date that customers can expect the API to be removed (that is, major releases after the date will not include the v1 API any longer).

Ben Clifton
Level 1
Level 1

The changes look good to me.

Is there any word on VRF support in 3.2? being able to track clients in VRF's would be fantastic as we could expose the 'ClientDetails' API endpoint to other teams for self service. Once they have the switch & switchport that their host is connected to they can then use the other API's for switchport health checks and verifying vlans etc.

Spencer Zier
Cisco Employee
Cisco Employee

I haven't heard anything about that, but my perspective is fairly limited.  You'd be better off asking ask-prime-infrastructure@cisco.com or using the builtin feedback tool (top right menu > Feedback > I wish this page would...).

Ben Clifton
Level 1
Level 1

Thanks Spencer, I'll give that a shot.

Another question though - will there be any way for us to modify how Prime responds to Options requests or pre-flight requests that are triggered by Chrome and Firefox and the CORS spec?

Currently, Prime 3 responds with a 302 redirect because there is no way to attach authentication details to the Options request. At that point, the browser cancels the actual GET or POST etc that was going to be sent.

Spencer Zier
Cisco Employee
Cisco Employee

Unfortunately, we have no plans to support CORS.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: