In my previous post I had worked with a version of Runecast and provided an initial look at the awesome app that helps keep your vSphere environment running at peak operational configuration.
As part of my feedback I suggested they start looking at a REST API, as it turns out the smart guys at Runecast were already way ahead of me and on June 13th released a new version with a great REST API and API Explorer to work with it, within a couple of clicks I updated my Runecast deployment to the latest version (super easy) and it gave me the latest and greatest features to work with including the API which can be found under the settings page and API Access token and then clicking the “Runecast API” link at the top, this brings up a swagger based API Explorer as seen below:
You can use the API live here or through any other REST based client, personally I like to try postman and start to understand the API a little more by creating a collection, this is exactly what I did and have made available via a github repo for you to download, use against your environment and also contribute back to with more samples in the collection.
Getting started with the Runecast Postman collection
Getting started couldn’t be easier just follow the below steps to use the collection against your Runecast server:
- Ensure you have Runecast 18.104.22.168 or above as this has the API
- Download and install Postman if you don’t have it already from https://www.getpostman.com/
- Download or clone my Runecast Postman Collection from my github repo from here
- You should now have 2 files from that repo, the first is the collection of REST calls and the second is an environment, the environment is used to specify 2 key pieces of information so we don’t have to keep retying these and also makes the collection portable.
- Open postman and click the import button at the top left, import the two files from the github repo and close the import button.
- You will now see the collection in the left hand pane and the environment will be available for you to adjust on the right hand side as seen below:
7. Next you will need to edit the environment and change the information to match your setup, firstly change the IP to the hostname or IP of your Runecast server.
8. Secondly change the APIKey to an APIKey that you have generated from the Runecast app, to do this go to Settings -> API Access tokens and select “Generate API access token“. Provide a description so you know what it is used for and once you click on “Generate“, your access token will be ready. Make sure to copy it, as you’ll not be able to see the same token again and we will need it in Postman. Paste the APIKey into the postman environment replacing the one in there at the moment and close the environment.
9. If all was done correctly above you should now be able to click on the collections and use the SEND button to call the API and see the results, note that some of these APIs require an ID which you will need to customize in the URL in postman as at the moment it has my IDs for things like my VC.
An example of me using postman to call the Runecast API is below:
Using the Runecast API either by the API Explorer built into the app or via a standard REST based tool from the internet is super easy to do and allows integration and access to the wealth of details in the Runecast App, I hope the guys from Runecast extend this API to include configuration items in the future to allow a zero touch deployment of the app for automated rollouts but this is a great start.
Stay tuned for my next post where I will show you how we can easily integrate this with PowerCLI and get interesting information using a combination of PowerShell functions I have written and PowerCLI.
Pingback: Runecast Analyzer VMware Best Practices new REST API Integration - Virtualization Howto
Same issue here. Our VMware rep hasn’t been of any help ether… Let me know if you find a fix!
Many thanks for your answer. I’ve just installed and tried with PowerCLI 6.5.1 but I have the exact same error. Value cannot be null, parameter name: key…
Can’t figure out what it’s talking about… :-/
I would try PowerCLI 6.5.1
I’m really sorry to bother you with a non-related comment on this post but I’ve not found any other way to contact you. Please feel free to answer to me via email and delete it if you’d rather not pollute this post.
Now to the core of it: I’ve tried to use some vSAN related cmdlets in a script to shut down properly an entire infrastructure but I’m struggling with the Get-VsanResyncingComponent because a script as simple as this just fails:
$cluster = Get-Cluster
Get-VsanResyncingComponents -Cluster $cluster
The errors is like this:
Get-VsanResyncingComponent : 21/07/2017 14:26:13 Get-VsanResyncingComponent
Value cannot be null.
Parameter name: key
At line:1 char:1
+ Get-VsanResyncingComponent -Cluster $cluster
+ CategoryInfo : NotSpecified: (:) [Get-VsanResyncingComponent],
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio
This is very strange and not like usual, I’ve found nothing useful anwhere on the internet so I’ve decided to just knock on your door 🙂
Please help me Alan Renouf, you are my only hope (imagine this message has been delivered by a droid-blog)
By the way, I run Powershell 5.0 with PowerCLI 6.5 R1 (and have been experiencing the same error on at least two different systems).
Many thanks in advance,
See you at the VMworld ! (who knows ?) 🙂