Changed1
[{"label":"Latest (2.0.0)","version":"latest"},{"version":"1.0.0"}]
srm-rest-api

Browse vCenter Compute Item

Description

Browse files and folders accessible to vCenter server’s compute object.

Request

Request

URL

URL


get
https://{api_host}//pairings/{pairing_id}/vcenters/{vcenter_id}/inventory/compute/{compute_id}/browser
Copy

Path Parameters

Path Parameters

string
pairing_id Required

The ID of a pairing between this Site Recovery Manager server and remote one.


string
vcenter_id Required

The ID of a vCenter server.


string
compute_id Required

The ID of a vCenter Server’s compute object.Supported types:

  • ClusterComputeResource
  • ComputeResource
  • HostSystem
  • ResourcePool


Query Parameters

Query Parameters

string
datastore_id Optional

Id of the datastore which you must browse.. Leave empty when browsing hosts and in addition add ‘/vmimages’ as value for path query param.


string
file_type Optional

Filter result items by file type.

Possible values are: VM_DISKFLOPPY_IMAGEISO_IMAGEVM_CONFIG_FILESALL_FILESFOLDERS


string
path Optional

The path on the given datastore to browse. Leave empty for root node. Use ‘/vmimages’ when browsing a host without datastore id passed as query param.


boolean
sub_folders Optional

Whether the datastore file system search should include the sub folders of the specified browse path.


Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns EnvironmentBrowserDataDrResponseList of type application/json

Browse information about vCenter server’s compute object.

{
	"_meta": {
		"errors": [
			{
				"code": "string",
				"field": "string",
				"message": "string"
			}
		],
		"limit": 0,
		"links": {
			"next": {
				"href": "string"
			},
			"previous": {
				"href": "string"
			},
			"self": {
				"href": "string"
			}
		},
		"offset": 0,
		"total": 0
	},
	"list": [
		{
			"datastore_id": "string",
			"datastore_name": "string",
			"modification": 0,
			"name": "string",
			"owner": "root",
			"path": "/datastore-name/testFolder/childFolder",
			"size": 0,
			"type": "FOLDER"
		}
	]
}
_meta Optional

List metadata


list Optional

The result of the browsing datastore request.

Errors

Errors

ResponseError
400

Bad request - the server could not understand the request due to invalid syntax or invalid request body content


401

Unauthorized - the client must authenticate itself to get the requested response


ResponseError
403

Forbidden - not sufficient access rights to fulfill the request


404

Not Found - server cannot find the requested in URL resource


ResponseError
500

Internal server error - unexpected condition prevents fulfilling the request

Code Samples

Code Samples

PowerCLI Client SDK Example

Invoke-SrmBrowseVcenterComputeItem -pairingId "MypairingId" -vcenterId "MyvcenterId" -computeId "MycomputeId" -path "Mypath" -fileType "VM_DISK" -datastoreId "MydatastoreId" -subFolders $true

cURL Command

curl https://{api_host}/pairings/{pairing_id}/vcenters/{vcenter_id}/inventory/compute/{compute_id}/browser


Feedback

Was this page helpful?