List Policies Compliance
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Returns compliance information about entities matching the filter Compliance.FilterSpec. Entities without storage policy association are not returned.
Request
URLURL
https://{api_host}/rest/vcenter/storage/policies/entities/compliance
Query Parameters
Query Parameters
filter
Required
compliance status of matching entities for which information should be returned.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Response
Response
Response BodyResponse Body
200 OK returns
StoragePoliciesComplianceListResponseBody
of type application/json
compliance information about entities matching the filter Compliance.FilterSpec.
{
"value": [
{
"disks": "enum",
"vm": "string",
"vm_home": "enum"
}
]
}
array of
StoragePoliciesComplianceSummary
value
Optional
compliance information about entities matching the filter Compliance.FilterSpec.
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/rest/vcenter/storage/policies/entities/compliance?filter=string
Errors
404
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request.
503
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
400
com.vmware.vapi.std.errors.invalid_argument : if the Compliance.FilterSpec.status field contains a value that is not supported by the server.
401
com.vmware.vapi.std.errors.unauthenticated : if the user can not be authenticated. | com.vmware.vapi.std.errors.unauthorized : if the user doesn't have the required privileges.