A question came up on our community about a Chrome extension called Advanced REST Client and I had never used it before, so I decided to check it out. Install it here. It will add an extension that allows you to make REST calls to, well whatever from your Chrome browser.
Of course there are a billion ways to do this (I traditionally have just used Invoke-RestMethod in PowerShell) but this is another one for your tool arsenal . A quick and easy way to pull REST information from the FlashArray without having to learn another tool like PowerShell to do it.
Non-disruptive install and then you can launch the extension.
So the first step is to create/fetch the API token for your user with the following command:
Replace the IP with your FlashArray IP or FQDN.
You need to add the username and password values into the payload section of the call, with the content-type set to url encoded.
Do that and hit send. Make sure “post” is selected. You will get a response with your API token, you need this to create an maintain the session.
You can always see/get/create the tokens from the GUI too:
Use the following command to create the session:
So i have seen some mixed luck with the next step, the best way to do this is to not put the API token into the payload, but instead as a query parameter. Expand the REST call and add the api_token into the parameter.
That’s all you need to enter for that. If all goes well, your response will be the username associated with that token ID.
Now you can run your REST calls for info:
So a standard call like:
Remember to change the radio selection to GET!
Or if you want to add parameters, expand the call and add query parameters. So if I want more space capacity information, using the call:
Add the capacity binary option into those query parameters.
Pretty straight forward! Lots of other REST clients of course, but this is a nice one because I spend so much time in Chrome anyways.
As always, you can find the REST API documentation in your FlashArray GUI!