Im no devver but did you read the API-README:
https://github.com/ckolivas/cgminer/blob/master/API-READMEIt has all the API calls that are supported and [correct me if Im wrong] bfgminer should have the same API calls.
Also in the cgminer repo there is a few api-example.X to get you going.
rgdz,
bhai