Toolkit Update to 2.6.0.401

I have fixed a minor issue with the toolkit when it comes to figuring out the latest version of the REST API when connecting to a FlashArray. When we introduced the REST API we obviously started with 1.0 and as we have released newer versions of the Purity operating environment we have also made improvements to the API.

When I developed the toolkit I created a cmdlet that is not exported called Get-PfaApiVersion which uses a basic URL call such as https://pure01.example.com/api/api_version. This will return:

The highest return value  (Eg. “1.4”) then sets a global URI variable so there is no need to specify a particular version of the REST API. I also implemented a way to specify a specific REST API using the Get-PfaApiVersion cmdlet with a parameter named –RESTAPI. This parameter is a ValidateSet which provides the ability to TAB through all of the options when using the cmdlet from a Windows PowerShell session or if using the Windows PowerShell ISE you will get a dropdown list to choose the version. See examples of both below.

Tab_Values

ValidateSet

For each version of the PowerShell Toolkit that is released the most recent REST API version is set as the default, see below.

By setting this RESTAPI you are specifying that all cmdlets use a particular version of the REST API. For example if you wanted to retrieve volumes that uses the 1.4 REST API below is what that GET call would look like.

In all previous versions of the toolkit the parameter for the REST API defaulted to a pre-set value of the latest version. I have removed that default setting and also improved the logic for determining the latest REST API available for a given FlashArray.

Download the latest 2.8.0.430 2.6.0.401 from GitHub.

BTW, this is not an April Fool’s joke 🙂

Thanks,
barkz