restAPIFunctions.py script in the repo defines a number of useful functions that I have collected over time.
Run restAPIFunctions.py
The same example presented above can now be implemented with a single line call to get CLUSTER_NAME, CLUSTER_VERSION and CLUSTER_INFO using getClusterVersionAndName() function: