Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Tech Tip: Using the RESTful Control API with Python - listpools
The following code uses Stingray's RESTful API to list all the pools defined on a cluster. The code is written in Python. This example has more extensive comments then the following examples and most of these are applicable to all the examples. This program does a single GET request for the list of pools and then loops through that list, each element of which is a dictionary, and then outputs the pool name.
#! /usr/bin/env python
import requests # The REST Client
import json # For serializing and deserializing JSON