Resource Center/Resource Pool/VM Instance Operations
POSTVM Instance OperationsSince 5.2.0SynchronousAuth Required
UploadFileToVm
UploadFileToVm
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
vmInstanceUuidsListRequiredThe VM instances that the files are uploaded to.
fileContentStringRequiredThe file content which is encoded using Base64.
remotePathStringRequiredThe absolute path that the files are uploaded to. The path contains the file name.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/upload-file
/zstack/v1/upload-file
Request Example
curl -X POST 'http://{host}/zstack/v1/upload-file' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"vmInstanceUuids":["<vmInstanceUuids>"],"fileContent":"<fileContent>","remotePath":"<remotePath>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{}Change History
This API has no change history records yet.
