JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const files = await client.devices.files.list('deviceId', { path: 'path' });
console.log(files.files);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
files = client.devices.files.list(
device_id="deviceId",
path="path",
)
print(files.files)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
files, err := client.Devices.Files.List(
context.TODO(),
"deviceId",
mobileruncloud.DeviceFileListParams{
Path: "path",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", files.Files)
}
mobilerun-cloud devices:files list \
--api-key 'My API Key' \
--device-id deviceId \
--path pathcurl --request GET \
--url https://api.mobilerun.ai/devices/{deviceId}/files \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/devices/{deviceId}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.mobilerun.ai/devices/{deviceId}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/devices/{deviceId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"files": [
{
"extendedAttributes": true,
"group": "<string>",
"hardLinks": 123,
"modifiedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"owner": "<string>",
"permissions": {
"group": {
"execute": true,
"read": true,
"write": true
},
"others": {
"execute": true,
"read": true,
"write": true
},
"owner": {
"execute": true,
"read": true,
"write": true
},
"special": {
"setGid": true,
"setUid": true,
"sticky": true
}
},
"size": 123,
"type": "<string>",
"symlinkTarget": "<string>"
}
],
"path": "<string>",
"total": 123,
"$schema": "https://example.com/schemas/FileListBody.json"
}{
"$schema": "https://example.com/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Files
List files
Lists the files at the directory path given in the path query parameter, returning each entry’s metadata along with the path and total count.
GET
/
devices
/
{deviceId}
/
files
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const files = await client.devices.files.list('deviceId', { path: 'path' });
console.log(files.files);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
files = client.devices.files.list(
device_id="deviceId",
path="path",
)
print(files.files)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
files, err := client.Devices.Files.List(
context.TODO(),
"deviceId",
mobileruncloud.DeviceFileListParams{
Path: "path",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", files.Files)
}
mobilerun-cloud devices:files list \
--api-key 'My API Key' \
--device-id deviceId \
--path pathcurl --request GET \
--url https://api.mobilerun.ai/devices/{deviceId}/files \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/devices/{deviceId}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.mobilerun.ai/devices/{deviceId}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/devices/{deviceId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"files": [
{
"extendedAttributes": true,
"group": "<string>",
"hardLinks": 123,
"modifiedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"owner": "<string>",
"permissions": {
"group": {
"execute": true,
"read": true,
"write": true
},
"others": {
"execute": true,
"read": true,
"write": true
},
"owner": {
"execute": true,
"read": true,
"write": true
},
"special": {
"setGid": true,
"setUid": true,
"sticky": true
}
},
"size": 123,
"type": "<string>",
"symlinkTarget": "<string>"
}
],
"path": "<string>",
"total": 123,
"$schema": "https://example.com/schemas/FileListBody.json"
}{
"$schema": "https://example.com/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}path must be an absolute directory path on the device, e.g. /sdcard/Download. The response contains the directory’s direct entries only — it does not recurse into subdirectories.
File access is available on Android devices only; file requests against an iOS device fail with 400.
Depending on the device type, some entry metadata (
owner, group, permissions, hardLinks) may be zeroed rather than reflect real values.Authorizations
Bearer token via Authorization header
Headers
Required range:
x >= 0Path Parameters
Query Parameters
Was this page helpful?
⌘I