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 tasks = await client.devices.tasks.list('deviceId');
console.log(tasks.items);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
)
tasks = client.devices.tasks.list(
device_id="deviceId",
)
print(tasks.items)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"),
)
tasks, err := client.Devices.Tasks.List(
context.TODO(),
"deviceId",
mobileruncloud.DeviceTaskListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tasks.Items)
}
mobilerun-cloud devices:tasks list \
--api-key 'My API Key' \
--device-id deviceIdcurl --request GET \
--url https://api.mobilerun.ai/devices/{deviceId}/tasks \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/devices/{deviceId}/tasks",
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}/tasks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/devices/{deviceId}/tasks")
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{
"items": [
{
"createdAt": "2023-11-07T05:31:56Z",
"taskId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"hasNext": true,
"hasPrev": true,
"page": 123,
"pageSize": 123,
"pages": 123,
"total": 123
},
"$schema": "<string>"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Devices
List tasks for a device
Returns a paginated list of tasks that have run on the device, along with pagination metadata.
GET
/
devices
/
{deviceId}
/
tasks
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 tasks = await client.devices.tasks.list('deviceId');
console.log(tasks.items);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
)
tasks = client.devices.tasks.list(
device_id="deviceId",
)
print(tasks.items)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"),
)
tasks, err := client.Devices.Tasks.List(
context.TODO(),
"deviceId",
mobileruncloud.DeviceTaskListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tasks.Items)
}
mobilerun-cloud devices:tasks list \
--api-key 'My API Key' \
--device-id deviceIdcurl --request GET \
--url https://api.mobilerun.ai/devices/{deviceId}/tasks \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/devices/{deviceId}/tasks",
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}/tasks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/devices/{deviceId}/tasks")
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{
"items": [
{
"createdAt": "2023-11-07T05:31:56Z",
"taskId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"hasNext": true,
"hasPrev": true,
"page": 123,
"pageSize": 123,
"pages": 123,
"total": 123
},
"$schema": "<string>"
}{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Authorizations
Bearer token via Authorization header
Path Parameters
Query Parameters
Available options:
id, createdAt, updatedAt, assignedAt Available options:
asc, desc Was this page helpful?
⌘I