Help with API - Port on Device

Hi, I need help with the API, I have looked at the documentation but I have not been able to find this information. When you enter a device, in the ports, the last data in a row of the table is Port on Switch (As in the image), I would like to know if this data can be obtained through the API and if so, how to do it. Thank you.

image