You need to send this command via the Web API.
http://127.0.0.1:8088/api/?It will return an XML response of all Inputs with Key, Number, Name, Type, State and other properties. Which input is in preview, output etc..
You will need to parse the XML response to get information you need.
Here is a sample with 2 inputs..
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<vmix>
<version>22.0.0.60</version>
<edition>Basic</edition>
<inputs>
<input key="4d5a8bff-08a7-4869-93c9-875ce80a3c39" number="1" type="GT" title="Title 0- The Classic Green.gtzip" state="Paused" position="0" duration="0" loop="False" selectedIndex="0">
Title 0- The Classic Green.gtzip
<text index="0" name="Headline.Text">HEADLINE</text>
<text index="1" name="Description.Text">DESCRIPTION</text>
</input>
<input key="06f05edd-3530-4d23-88a5-e26e89880c3f" number="2" type="Video" title="bear.mp4" state="Paused" position="0" duration="32880" loop="False" muted="True" volume="100" balance="0" solo="False" audiobusses="M" meterF1="0" meterF2="0">bear.mp4</input>
</inputs>
<overlays>
<overlay number="1"/>
<overlay number="2"/>
<overlay number="3"/>
<overlay number="4"/>
<overlay number="5"/>
<overlay number="6"/>
</overlays>
<preview>2</preview>
<active>1</active>
<fadeToBlack>False</fadeToBlack>
<transitions>
<transition number="1" effect="Fade" duration="500"/>
<transition number="2" effect="Merge" duration="1000"/>
<transition number="3" effect="Wipe" duration="1000"/>
<transition number="4" effect="CubeZoom" duration="1000"/>
</transitions>
<recording>False</recording>
<external>False</external>
<streaming>False</streaming>
<playList>False</playList>
<multiCorder>False</multiCorder>
<fullscreen>False</fullscreen>
<audio>
<master volume="100" muted="False" meterF1="0" meterF2="0" headphonesVolume="100"/>
<busB volume="100" muted="False" meterF1="0" meterF2="0"/>
</audio>
</vmix>