Create Shared Folder

Create Shared Folder

Mounts a new shared folder in the VM

Request
URI
POST
https://{api_host}/api/vms/{id}/sharedfolders
COPY
Path Parameters
string
id
Required

ID of VM


Request Body

Parameters of the shared folder to mount

SharedFolder of type(s) application/vnd.vmware.vmw.rest-v1+json
Required
{
    "folder_id": "string",
    "host_path": "string",
    "flags": 0
}
string
folder_id
Required

ID of folder which be mounted to the host

string
host_path
Required

Path of the host shared folder

integer
flags
Required

The flags property specifies how the folder will be accessed by the VM. There is only one flag supported which is "4" and means read/write access.

Authentication
This operation uses the following authentication methods.
Responses
201

Shared folders mounted in the VM

Returns Array of SharedFolder of type(s) application/vnd.vmware.vmw.rest-v1+json
[
    {
        "folder_id": "string",
        "host_path": "string",
        "flags": 0
    }
]

400

Invalid parameters

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


401

Authentication failed

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


403

Permission denied

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


404

No such resource

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


406

Content type was not supported

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


409

Resource state conflicts

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


500

Server error

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message


default

Unexpected error

Returns ErrorModel of type(s) application/vnd.vmware.vmw.rest-v1+json
{
    "code": 0,
    "message": "string"
}
integer As int32 As int32
code
Required

code

string
message
Required

message