Contributor
Contributor

how to fetch a particular port group using REST API

how to fetch a particular port group using REST API

for example i just want to fetch portgroup "dvPortGroup" from the entire result shown below--

<QueryResultRecords total="4" pageSize="25" page="1" name="portgroup" type="application/vnd.vmware.vcloud.query.records+xml" href= "https://10.109.0.64/api/query?type=portgroup&page=1&pageSize=25&format=records" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://10.109.0.64/api/v1.5/schema/master.xsd">

<Link rel="alternate" type="application/vnd.vmware.vcloud.query.idrecords+xml" href= "https://10.109.0.64/api/query?type=portgroup&page=1&pageSize=25&format=idrecords" />

<PortgroupRecord vcName="vc.vcloud.local" vc="https://10.109.0.64/api/admin/extension/vimServer/613b0810-963f-4a2b-9bcd-617c046d53c8" scopeType="-1" portgroupType="DV_PORTGROUP" networkName="--" name="dvPortGroup" moref="dvportgroup-148" isVCEnabled="true"/>

<PortgroupRecord vcName="vc.vcloud.local" vc="https://10.109.0.64/api/admin/extension/vimServer/613b0810-963f-4a2b-9bcd-617c046d53c8" scopeType="-1" portgroupType="DV_PORTGROUP" networkName="--" name="dvPortGroup2" moref="dvportgroup-149" isVCEnabled="true"/>

<PortgroupRecord vcName="vc.vcloud.local" vc="https://10.109.0.64/api/admin/extension/vimServer/613b0810-963f-4a2b-9bcd-617c046d53c8" scopeType="-1" portgroupType="DV_PORTGROUP" networkName="--" name="dvPortGroup3" moref="dvportgroup-150" isVCEnabled="true"/>

<PortgroupRecord vcName="vc.vcloud.local" vc="https://10.109.0.64/api/admin/extension/vimServer/613b0810-963f-4a2b-9bcd-617c046d53c8" scopeType="1" portgroupType="NETWORK" networkName="vCloudExternalNetwork" network="https://10.109.0.64/api/network/2b4c8058-4cae-4564-bfda-f9ab7b991da5" name="VM Network" moref="network-42" isVCEnabled="true"/>

</QueryResultRecords>



Tags (1)
0 Kudos
1 Reply
Contributor
Contributor

0 Kudos