This question cropped up on our discussion forum: Re: How to use RESTful Control API with Python? - enable, disable, or drain node: How can I list the nodes that are draining in a Stingray configuration, much like the 'Draining' page in the UI.
You can get the list of nodes that are draining per-pool from /api/tm/1.0/config/active/pools/poolname; look at the properties->basic->draining value. There's no single action to get a list of all of the nodes that are draining in all pools. The UI reads each pool one at a time and merges the 'draining' lists from each; you will need to do the same.
The following Python code illustrates how you could do this: