In work space build a sample reportlet capturing your desired metrics aligning to you API query as closely as possible. Then enable debug mode on widget(actual bug).
Then option click icon. choose sparkline as one option, it will present xml, output as well a cURL contents.
GLTU