Search Index Find By Ip

Search Index Find By Ip

Finds a virtual machine or host by IP address, where the IP address is in dot-decimal notation.

For example, 10.17.12.12. The IP address for a virtual machine is the one returned from VMware tools, ipAddress.

Required privileges: System.View

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


Request Body
FindByIpRequestType of type(s) application/json
Required

Show optional properties

{
    "ip": "string",
    "vmSearch": false
}
{
    "datacenter": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "ip": "string",
    "vmSearch": false
}
datacenter
Optional

Reference to an instance of the Datacenter managed object.

string
ip
Required

The dot-decimal notation formatted IP address to find.

boolean
vmSearch
Required

if true, search for virtual machines, otherwise search for hosts.

Authentication
This operation uses the following authentication methods.
Responses
200

The virtual machine or host managed entity that is found. If no managed entities are found, null is returned. Only a single entity is returned, even if there are multiple matches. If called directly on an ESX server with vmSearch set to false, returns the host managed entity if the address matches any of the Console OS IP addresses.

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