Fixed API error for get_fields function

Signed-off-by: Elliot Condon <e@elliotcondon.com>