
vShield API Programming Guide
98 VMware, Inc.
Get List of Virtual Machines Being Scanned
Youcanretrieveinformationaboutthevirtualmachinesbeingscannedbyascan.
Example 8-19. Get list of virtual machines being scanned
Request:
GET https://<vsm-ip>/api/2.0/dlp/scan/current/vms/<id>
?scanstatus=COMPLETED&pagesize=10&startindex=1
Response:
<?xml version="1.0" encoding="UTF-8"?>
<VmScanStatusDp>
<dataPage>
<pagingInfo>
<pageSize>10</pageSize>
<startIndex>1</startIndex>
<totalCount>2</totalCount>
<sortOrderAscending>false</sortOrderAscending>
</pagingInfo>
<VmScanStatus>
<startTime>1320803585000</startTime>
<endTime>1320803826000</endTime>
<vmMoId>vm-25</vmMoId>
<scanStatus>COMPLETED</scanStatus>
<violationCount>8</violationCount>
<vmName>jim-win2k8-32-mux</vmName>
<dcName>jack</dcName>
</VmScanStatus>
</dataPage>
</VmScanStatusDp>
Where
idisanoptionalparameterwhichlimitsthefilterresultsbytheVCMOIDofadatacenter,cluster,or
resourcepool.
scanstatusspecifiesthescanstatusofthevirtualmachinestoberetrieved.Possiblevaluesareall,
notstarted,started,andcompleted.Thislimitstheresultstovirtualmachinesthathavethespecified
scanstate.
pagesizelimitsthemaximumnumberofentriesreturnedbytheAPI.Thedefaultvalueforthis
parameteris256andthevalidrangeis1‐1024.
startindexspecifiesthestartingpointforretrievingthelogs.Ifthisparameterisnotspecified,logsare
retrievedfromthebeginning.
Get Number of Virtual Machines Being Scanned
Youcanretrievethenumberofvirtualmachinesbeingscanned.
Example 8-20. Get number of virtual machines being scanned
Request:
GET https://<vsm-ip>/api/2.0/dlp/scan/current/vms/count/<id>?scanstatus=COMPLETED
Where
scanstatusisanoptionalparameterthatspecifiesthescanstatusofthevirtualmachinestoberetrieved.
Possiblevaluesareall,notstarted,started,andcompleted.Thislimitstheresultstovirtual
machinesthathavethespecifiedscanstate.
Commentaires sur ces manuels