REST API - get

vcenter folder: get

Retrieves information about the folder corresponding to folder. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Request:

HTTP request

GET https://{server}/rest/vcenter/folder/{folder}

Path Parameters

Name Type Description
Required
folder string Identifier of the folder.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "datacenters"[
            "obj-103",
            "obj-103"
        ],
        "folders"[
            "obj-103",
            "obj-103"
        ],
        "hosts"[
            "obj-103",
            "obj-103"
        ],
        "name""string",
        "datastores"[
            "obj-103",
            "obj-103"
        ],
        "type""DATACENTER",
        "networks"[
            "obj-103",
            "obj-103"
        ],
        "clusters"[
            "obj-103",
            "obj-103"
        ],
        "virtual_machines"[
            "obj-103",
            "obj-103"
        ]
    }
}

Response Type:

Name Type Description
bold = required
value info Information about the folder associated with folder.
value.name string Name of the vCenter Server folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

value.type string Type (DATACENTER, DATASTORE, HOST, NETWORK, VIRTUAL_MACHINE) of the vCenter Server folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Defines the type of a vCenter Server folder. The type of a folder determines what what kinds of children can be contained in the folder. Value is one of:
DATACENTER: A folder that can contain datacenters.
DATASTORE: A folder that can contain datastores.
HOST: A folder that can contain compute resources (hosts and clusters).
NETWORK: A folder that can contain networkds.
VIRTUAL_MACHINE: A folder that can contain virtual machines.

value.datacenters string[] Identifiers of the datacenters contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value DATACENTER. This field is optional and it is only relevant when the value of type is DATACENTER.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datacenter. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datacenter.

value.datastores string[] Identifiers of the datastores contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value DATASTORE. This field is optional and it is only relevant when the value of type is DATASTORE.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Datastore. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Datastore.

value.hosts string[] Identifiers of the hosts contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value HOST. This field is optional and it is only relevant when the value of type is HOST.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem.

value.clusters string[] Identifiers of the clusters contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value HOST. This field is optional and it is only relevant when the value of type is HOST.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: ClusterComputeResource. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: ClusterComputeResource.

value.networks string[] Identifiers of the networks contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value NETWORK. This field is optional and it is only relevant when the value of type is NETWORK.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Network. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Network.

value.virtual_machines string[] Identifiers of the virtual machines contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. It is only relevant when type has value VIRTUAL_MACHINE. This field is optional and it is only relevant when the value of type is VIRTUAL_MACHINE.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: VirtualMachine.

value.folders string[] Identifiers of the child folders contained in this folder. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: Folder. When operations return a value of this structure as a result, the field will contain identifiers for the resource type: Folder.

Errors:

HTTP Status Code Type Description
404 not_found if there is no folder associated with folder in the system.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the session id is missing from the request or the corresponding session object cannot be found.
403 unauthorized if the user doesn't have the required privileges.