Search Index Find By Inventory Path

Search Index Find By Inventory Path

Finds a managed entity based on its location in the inventory.

The path is separated by slashes ('/'). For example, a path should be of the form "My Folder/My Datacenter/vm/Discovered VM/VM1". A leading slash or trailing slash is ignored. Thus, the following paths all represents the same object: "a/b", "/a/b", "a/b/", and '/a/b/'. Slashes in names must be represented using %2f, following the standard URL syntax. Any object in the inventory can be retrieved using this method, including resource pools and hosts.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/SearchIndex/{moId}/FindByInventoryPath
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 SearchIndex/{moId}.

string
release
Required

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


Request Body
FindByInventoryPathRequestType of type(s) application/json
Required
{
    "inventoryPath": "string"
}
string
inventoryPath
Required

The path to the entity.

Authentication
This operation uses the following authentication methods.
Responses
200

The managed entity that is found. If no match is found, null is returned.

Returns MoRefManagedEntity of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}