This API has a deprecated equivalent from v7.0U1.
List Folder
DescriptionReturns information about at most 1000 visible (subject to permission checks) folders in vCenter matching the Folder.FilterSpec.
Request
URLURL
https://{api_host}/api/vcenter/folder
Query Parameters
Query Parameters
filter
Optional
Specification of matching folders for which information should be returned.
If unset, the behavior is equivalent to a Folder.FilterSpec with all fields unset which means all folders match the filter.
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Response
Response
Response BodyResponse Body
200 OK returns
array
of
FolderSummary of type application/json
Commonly used information about the folders matching the Folder.FilterSpec.
{
"folder": "string",
"name": "string",
"type": "enum"
}
string
folder
Required
Identifier of the folder. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder. When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder.
string
name
Required
Name of the vCenter Server folder.
type
Required
Type (Type) of the vCenter Server folder.
Possible values are: DATACENTER , DATASTORE , HOST , NETWORK , VIRTUAL_MACHINE
cURL Command
curl -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" https://{api_host}/api/vcenter/folder
Errors
400
com.vmware.vapi.std.errors.invalid_argument : if the Folder.FilterSpec.type field contains a value that is not supported by the server.
403
com.vmware.vapi.std.errors.unauthorized : if the user doesn't have the required privileges.
500
com.vmware.vapi.std.errors.unable_to_allocate_resource : if more than 1000 folders match the Folder.FilterSpec.
503
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
Availability
Added in 7.0U2