vcenter datacenter: list
Returns information about at most 1000 visible (subject to permission checks) datacenters in vCenter matching the vcenter.datacenter.filter_spec.
Request:
HTTP request
GET https://{server}/rest/vcenter/datacenter
?filter.datacenters.1=obj-103
&filter.datacenters.2=obj-103
&filter.names.1=string
&filter.names.2=string
&filter.folders.1=obj-103
&filter.folders.2=obj-103
?filter.datacenters.1=obj-103
&filter.datacenters.2=obj-103
&filter.names.1=string
&filter.names.2=string
&filter.folders.1=obj-103
&filter.folders.2=obj-103
Request Query Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
filter | filter_spec | Optional. Specification of matching datacenters for which information should be returned. |
filter.datacenters | string[] | Identifiers of datacenters that can match the filter. Optional. If unset or empty, datacenters with any identifier match the filter.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 . |
filter.names | string[] | Names that datacenters must have to match the filter (see vcenter.datacenter.info.name). Optional. If unset or empty, datacenters with any name match the filter. |
filter.folders | string[] | Folders that must contain the datacenters for the datacenter to match the filter. Optional. If unset or empty, datacenters in any folder match the filter.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 . |
Response:
HTTP Status Code: 200
Representation:
{
"value" : [
{
"name" : "string",
"datacenter" : "obj-103"
},
{
"name" : "string",
"datacenter" : "obj-103"
}
]
}
"value" : [
{
"name" : "string",
"datacenter" : "obj-103"
},
{
"name" : "string",
"datacenter" : "obj-103"
}
]
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | summary[] | Commonly used information about the datacenters matching the vcenter.datacenter.filter_spec. |
value[].datacenter | string | Identifier of the datacenter. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Datacenter . When operations return a value of this structure as a result, the field will be an identifier for the resource type: Datacenter . |
value[].name | string | Name of the datacenter. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | unable_to_allocate_resource | if more than 1000 datacenters match the vcenter.datacenter.filter_spec. |
503 | service_unavailable | if the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user doesn't have the required privileges. |