Toolkit Update to

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 This will return:

{"version": ["1.0", "1.1", "1.2", "1.3", "1.4"]}

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.

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

[ValidateSet('1.0', '1.1', '1.2', '1.3', '1.4')][string]$RESTAPI = "1.4"

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 from GitHub.

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


Add Comment

Required fields are marked *. Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.