POST
/
windows
/
files
/
upload
/
{instance_id}
Python (SDK)
import os
from skylight_sdk import Skylight


with Skylight(
    apikey=os.getenv("SKYLIGHT_APIKEY", ""),
) as skylight:

    res = skylight.files.upload(instance_id="<id>", s3_url="https://needy-mallard.info/", file_name="example.file")

    # Handle response
    print(res)
{
  "file_path": "C:\\Users\\Public\\Downloads\\file.pdf",
  "message": "File uploaded successfully",
  "status": "success"
}

Authorizations

X-API-Key
string
header
required

API key authentication

Path Parameters

instance_id
string
required

Body

application/json
s3_url
string
required

The S3 URL of the file to upload

file_name
string
required

Original name of the file

file_type
string

MIME type of the file

target_path
string

Target path on the VM (defaults to Users/Administrator/Desktop/{file_name})

Response

File uploaded successfully to VM

Response when a file is successfully uploaded to a VM

status
string
required

Status of the operation

Example:

"success"

message
string
required

Human-readable status message

Example:

"File uploaded successfully"

file_path
string
required

Path where the file was saved on the VM

Example:

"C:\\Users\\Public\\Downloads\\file.pdf"