Device File Management

Push a file to the device

Uploads a file to the specified destination path on the device storage. Format: Multipart Form Data.

post/sessions/{sessionId}/device/pushFile

Request

Path parameters

sessionIdstring required

The id of the device session

Request body multipart/form-data

destinationPathstring required

The absolute path on the device where the file should be saved (e.g., /Download/image.png).

bundleIdstring

The iOS app bundle identifier (e.g., com.example.app). Required for iOS devices, not needed for Android. On iOS, each app runs in its own sandbox — an isolated file system container that restricts access to only that app's data. This means you must specify which app's sandbox to operate on by providing its bundle ID. You can find the bundle ID in Xcode, in the app's Info.plist, or via the Sauce Labs app management API. See Apple's File System documentation for more details.

filestring binary required

The binary content of the file to upload.

Example request

{
  "destinationPath": "/Download/test-image.png",
  "bundleId": "com.example.app"
}

Response

File uploaded successfully

Changes

No recorded changes to this operation across all 1 revision of this API.