Search Index Query Next

Search Index Query Next
API to fetch the next page during pagination.

API to fetch the next page during pagination.

The marker for the SearchIndexIterationSpec is provided by the SearchIndexResultSet from the initial query request.

Since: vSphere API Release 9.1.0.0

Required privileges: System.View

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


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

Show optional properties

{
    "iterationSpec": {}
}
{
    "iterationSpec": {
        "_typeName": "string",
        "marker": "string",
        "limit": 0
    }
}
iterationSpec
Required

Marker of the place to continiue iteration from. It recalculates the result again to return the rest of result.

Authentication
This operation uses the following authentication methods.
Responses
200

Result set with data retrieved for the provided query.

Returns SearchIndexResultSet of type(s) application/json
This response body class contains all of the following: DataObject
{
    "_typeName": "string",
    "properties": [
        "string"
    ],
    "items": [
        {
            "_typeName": "string",
            "propertyValues": [
                {
                    "_typeName": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ]
        }
    ],
    "totalCount": 0,
    "marker": "string"
}
array of string
properties
Optional

The names of the resource model properties returned for each resource item in the result set.

The position (index) of each model property in this list corresponds to the position of the model property value in each resource item's values list. In other words, the name of each model property in the SearchIndexResourceItem.propertyValues list is given by the string with the same index (position) in this list.

array of object
items
Optional

The list of result items.

Each item corresponds to a particular resource that matched the conditions in the specified SearchIndexQuerySpec instance and containing the property data retrieved for that resource.

integer As int32 As int32
totalCount
Optional

The total number of resources that matched the query, regardless of the actual number that is returned in SearchIndexResultSet.items.

This value is set only if it has been explicitly requested in the query, i.e. if the SearchIndexQuerySpec.returnTotalCount flag has been set to true. The totalCount can change as new records are added or removed between requests. This means the count is recalculated on each subsequent request to reflect the most up-to-date results. The usecase of this property is for requesting only the items matching certain query without any further properties for the resource model. For example: find the number of all vms that are powered on.

string
marker
Optional

Used for continuation of result paging.

If paging used this one will be filled with the place where the next page should continue from. It should be passed to SearchIndexIterationSpec.marker, so the paging can be continued.


500

InvalidArgument: if SearchIndexIterationSpec is not specified correctly

Returns InvalidArgument of type(s) application/json
This response body class contains all of the following: RuntimeFault
{
    "_typeName": "string",
    "faultCause": {
        "_typeName": "string",
        "faultCause": "MethodFault Object",
        "faultMessage": [
            {
                "_typeName": "string",
                "key": "string",
                "arg": [
                    {
                        "_typeName": "string",
                        "key": "string",
                        "value": {
                            "_typeName": "string"
                        }
                    }
                ],
                "message": "string"
            }
        ]
    },
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ],
    "invalidProperty": "string"
}
string
invalidProperty
Optional

Optional name of the invalid property.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"iterationSpec":"{}"}' https://{api_host}/sdk/vim25/{release}/SearchIndex/{moId}/QueryNext