Vsan Object System Vsan Query Object Identities

Vsan Object System Vsan Query Object Identities

Map from vSAN object UUIDs to their identities.

The results contain the identities of all objects that could be resolved. The identity includes things like the object type, references to the VM the object belongs to and such. If called against a host with MOID 'vsan-object-system', the cluster argument is ignored and, only those objects are resolved which can be resolved by that host. For VM related objects a host can only resolve the objects if the VM they belong to is registered on that host. If called against a host with MOID 'vsan-cluster-object-system', the cluster argument is ignored and cluster wide object identities would be returned except template VM, and in identities, the VM property would be left unset. If called against vCenter, all connected hosts will be contacted for this information and the results will be aggregated. Any VMs registered with hosts which are disconnected will hence not be resolved. It's not recommended to use this API to get all of vSAN object identities at once to avoid potential performance issue due to large response in large scale cluster. Instead, we should limit the output by specifying various filter parameters like the objects UUID, object type, only including health or identity result etc.

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/vsan/VsanObjectSystem/{moId}/VsanQueryObjectIdentities
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case VsanObjectSystem/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.


Request Body
VsanQueryObjectIdentitiesRequestType of type(s) application/json
Required
"VsanQueryObjectIdentitiesRequestType Object"
cluster
Optional

vSAN cluster. Ignored if called against host.

Required privileges: System.Read

array of string
objUuids
Optional

The vSAN object UUIDs for querying. Unset to query all of vSAN objects

array of string
objTypes
Optional

Querying the vSAN objects with given types, only the object whose type in this list will be returned. All of available object types include 'vmswap', 'vdisk', 'namespace', 'vmem', 'stats', 'other', 'iscsiHome', 'iscsiLun', 'iscsiTarget' and 'fileShare'. Unset to query all of vSAN objects with any type

boolean
includeHealth
Optional

If the result includes the object health status. Default is False

boolean
includeObjIdentity
Optional

If the result includes all of the object identity. Default is True if it's unset

boolean
includeSpaceSummary
Optional

If the result includes the vSAN space consumption summarizing by object type. Currently, it's not supported to include both of space summary and object identity in the result. Default is false.

extraQuerySpec
Optional

This parameter only takes effect for host level API. The vSAN object identity query spec to specify detailed query specification like remote vSAN or VMFS datastores. If no extraQquerySpec is specified, the original logic to return all identities of local vSAN datastores will be applied. Note for any nonlocal vsan datastores provided, all the specified filter like objUuids, objTypes, include* won't take affect.

Authentication
This operation uses the following authentication methods.
Responses
200

Object information structure

This response body class contains all of the following: VsanObjectIdentityAndHealth
{
    "0": "V",
    "1": "s",
    "2": "a",
    "3": "n",
    "4": "O",
    "5": "b",
    "6": "j",
    "7": "e",
    "8": "c",
    "9": "t",
    "10": "I",
    "11": "d",
    "12": "e",
    "13": "n",
    "14": "t",
    "15": "i",
    "16": "t",
    "17": "y",
    "18": "A",
    "19": "n",
    "20": "d",
    "21": "H",
    "22": "e",
    "23": "a",
    "24": "l",
    "25": "t",
    "26": "h",
    "27": " ",
    "28": "O",
    "29": "b",
    "30": "j",
    "31": "e",
    "32": "c",
    "33": "t"
}

500

Failure

Returns MethodFault of type(s) application/json
This response body class contains all of the following: InlineMethodFault0
"MethodFault Object"
faultCause
Optional

Fault which is the cause of this fault.

array of object
faultMessage
Optional

Message which has details about the error Message can also contain a key to message catalog which can be used to generate better localized messages.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/vsan/VsanObjectSystem/{moId}/VsanQueryObjectIdentities