Automatically choose REST API version

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatically choose REST API version

L0 Member

Hi, I've been using the REST API for some months (and I like it). The base url (e.g. "/restapi/v11.2") I set from a config file. I've been thinking about how to avoid this and use the XML API to lookup the current version (e.g. using "<show><upgrade-history/></show>" or "<show><system><info/></system></show>"). Can I extract the API version ("major.minor") from the current Panorama version?

Regards
  Tilmann

1 REPLY 1

Cyber Elite

Hi @T.Boess ,

 

Yes, you can run the /api/?type=op&cmd=<show><system><info></info></system></show> XML API command and parse the <sw-version>11.2.4-h7</sw-version> string out of it.

 

Thanks,

 

Tom

Help the community: Like helpful comments and mark solutions.
  • 422 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!