This seems rather specific to be within the generic api_controller.