How to get the camera's external parameters and export it as a txt file

How do I get the external parameters of the cinema camera, such as focal length, aperture, etc., and export it as a file? Or how can I control the parameters through the UI, I really need your help, thank you very much!