How to use NVAPI to obtain relevant information on NVIDIA control panel

On the system layout interface of the NVIDIA control panel, relevant information such as the number, name, and whether the display port of the current graphics card is connected to the display will be displayed. What can I do to use NVAPI to obtain the corresponding information? Is there a corresponding function interface?