vcenter vm guest filesystem files: get
Returns information about a file or directory in the guest. . Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.
Request:
HTTP request
POST https://{server}/api/vcenter/vm/{vm}/guest/filesystem/files/{path}
?action=get
?action=get
{
"credentials" : {
"password" : "secret string",
"user_name" : "string",
"saml_token" : "secret string",
"type" : "USERNAME_PASSWORD",
"interactive_session" : true
}
}
"credentials" : {
"password" : "secret string",
"user_name" : "string",
"saml_token" : "secret string",
"type" : "USERNAME_PASSWORD",
"interactive_session" : true
}
}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
vm | string | Virtual Machine to perform the operation on. |
path | string | The complete path to the file. |
Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
-.credentials | credentials | The guest authentication data. |
-.credentials.interactive_session | boolean | If set, the operation will interact with the logged-in desktop session in the guest. This requires that the logged-on user matches the user specified by the vcenter.vm.guest.credentials. This is currently only supported for USERNAME_PASSWORD. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.credentials.type | string | The guest credentials type. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Types of guest credentials. Warning: This enumeration is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Value is one of: USERNAME_PASSWORD: USERNAME_PASSWORD credentials contains the information necessary to authenticate within a guest using a username and password. This method of authentication is stateless. To use USERNAME_PASSWORD, populate userName and password with the appropriate login information. Once populated, you can use USERNAME_PASSWORD in any guest operations function call. . Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.SAML_BEARER_TOKEN: SAML_BEARER_TOKEN contains the information necessary to authenticate within a guest using a SAML token. SAML Bearer token credentials relies on a guest alias that associates a guest account with the subject and certificate encoded in a SAML Bearer token obtained from the VMware SSO Server. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.credentials.user_name | string | For SAML_BEARER_TOKEN, this is the guest user to be associated with the credentials. For USERNAME_PASSWORD this is the guest username. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when type has value [USERNAME_PASSWORD, SAML_BEARER_TOKEN]. If no user is specified for SAML_BEARER_TOKEN, a guest dependent mapping will decide what guest user account is applied. |
-.credentials.password | secret | password. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when type has value USERNAME_PASSWORD. This field is optional and it is only relevant when the value of type is USERNAME_PASSWORD. |
-.credentials.saml_token | secret | SAML Bearer Token. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when type has value SAML_BEARER_TOKEN. This field is optional and it is only relevant when the value of type is SAML_BEARER_TOKEN. |
Response:
HTTP Status Code: 200
Response Body Structure:
{
"size" : 1,
"attributes" : {
"last_accessed" : "2015-01-01T22:13:05.651Z",
"posix_attributes" : {
"owner" : 1,
"permissions" : "string",
"group" : 1
},
"filesystem_family" : "WINDOWS",
"last_modified" : "2015-01-01T22:13:05.651Z",
"win_attributes" : {
"hidden" : true,
"read_only" : true,
"created" : "2015-01-01T22:13:05.651Z"
},
"symlink_target" : "string"
},
"type" : "FILE"
}
"size" : 1,
"attributes" : {
"last_accessed" : "2015-01-01T22:13:05.651Z",
"posix_attributes" : {
"owner" : 1,
"permissions" : "string",
"group" : 1
},
"filesystem_family" : "WINDOWS",
"last_modified" : "2015-01-01T22:13:05.651Z",
"win_attributes" : {
"hidden" : true,
"read_only" : true,
"created" : "2015-01-01T22:13:05.651Z"
},
"symlink_target" : "string"
},
"type" : "FILE"
}
Headers:
NoneType:
Name | Type | Description |
---|---|---|
bold = required | ||
- | info | vcenter.vm.guest.filesystem.files.info object containing information for the file. |
-.type | string | The type of file. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Defines the valid types of files. Warning: This enumeration is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Value is one of: FILE: normal file. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. DIRECTORY: directory. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. SYMLINK: symbolic link. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.size | long | The file size in bytes. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes | file_attributes_info | Attributes of a file. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.last_modified | date_time | The date and time the file was last modified. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.last_accessed | date_time | The date and time the file was last accessed. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.symlink_target | string | The target for the file if it's a symbolic link. This is currently only set for Posix guest operating systems, but may be supported in the future on Windows guest operating systems that support symbolic links. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. Set if the file is a symbolic link. |
-.attributes.filesystem_family | string | The type of guest filesystem. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Defines the types of guest operating fllesystem. Warning: This enumeration is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Value is one of: WINDOWS: The guest OS is a Windows variant. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. POSIX: Linux, Solaris, etc. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.win_attributes | windows_file_attributes_info | Windows-specific file information. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when filesystem_family has value WINDOWS. This field is optional and it is only relevant when the value of filesystem_family is WINDOWS. |
-.attributes.win_attributes.hidden | boolean | The file is hidden. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.win_attributes.read_only | boolean | The file is read-only. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.win_attributes.created | date_time | The date and time the file was created. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.posix_attributes | posix_file_attributes_info | Posix-specific file information. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when filesystem_family has value POSIX. This field is optional and it is only relevant when the value of filesystem_family is POSIX. |
-.attributes.posix_attributes.owner | long | The owner ID. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.posix_attributes.group | long | The group ID. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.attributes.posix_attributes.permissions | string | The file permissions in chmod(2) format. This field is presented as octal. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
400 | invalid_argument | if path is too long. XXX standard enhanced error link XXX |
400 | not_allowed_in_current_state | if the virtual machine is not running. |
404 | not_found | if the virtual machine is not found. |
500 | resource_busy | if the virtual machine is busy. |
503 | service_unavailable | if the VMware Tools is not running. |
401 | unauthenticated | if the credentials object was not valid. |
403 | unauthorized | if path cannot be accessed. |
400 | unsupported | if the operation is not supported by the VMware Tools in the guest operating system. |