Host Datastore Browser Search Datastore Task
Returns the information for the files that match the given search criteria as a SearchResults object.
Searches only the folder specified by the datastore path. The Datastore.Browse privilege must be held on the datastore identified by the datastore path.
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 HostDatastoreBrowser/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
Show optional properties
{
"datastorePath": "string"
}
{
"datastorePath": "string",
"searchSpec": {
"_typeName": "string",
"query": [
{
"_typeName": "string"
}
],
"details": {
"_typeName": "string",
"fileType": false,
"fileSize": false,
"modification": false,
"fileOwner": false
},
"searchCaseInsensitive": false,
"matchPattern": [
"string"
],
"sortFoldersFirst": false
}
}
datastorePath
The data object type describes a search for files in one or more datastores.
The properties do not include the starting datastore path because that path is a separate parameter to the search method.
A SearchSpec contains the query parameters and some global search modifiers.
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostDatastoreBrowserSearchResults upon success.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
InvalidDatastore: if the operation cannot be performed on the target datastores. The server can throw InvalidDatastorePath to indicate a malformed datastorePath, or InaccessibleDatastore to indicate inaccessibility of the datastore.
InvalidArgument: if the SearchSpec contains duplicate file types.
FileNotFound: if the file or folder specified by datastorePath is not found.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}