curl --request POST \
--url https://api.apsio.io/v1/projects/{projectId}/live/commands \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tester_id": "<string>",
"install": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/projects/{projectId}/live/commands"
payload = {
"tester_id": "<string>",
"install": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tester_id: '<string>', install: '<string>'})
};
fetch('https://api.apsio.io/v1/projects/{projectId}/live/commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apsio.io/v1/projects/{projectId}/live/commands",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tester_id' => '<string>',
'install' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apsio.io/v1/projects/{projectId}/live/commands"
payload := strings.NewReader("{\n \"tester_id\": \"<string>\",\n \"install\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apsio.io/v1/projects/{projectId}/live/commands")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tester_id\": \"<string>\",\n \"install\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/projects/{projectId}/live/commands")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tester_id\": \"<string>\",\n \"install\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0192f3a4-0000-7000-8000-0000000c0001",
"delivered": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}Send a command to an internal tester's device
Sends one of spec 16.6’s commands (screenshot, diagnostics, raise_log_level) to one device of a current internal tester, during its live session. The device answers within 2 minutes; the result (a screenshot, diagnostics) goes to the open live views only and is never stored, and its outcome (done, failed, refused) is audited as device_command.result, or not_live when the device had no live session. No outcome after 2 minutes means it expired. Owners and admins. For a person: the console session or the CLI signed in as you (apsio login); never a project token or an agent (person_required, spec 16.7). Audited as device_command.send before it is sent; at most 10 a minute per person in a project (429 with Retry-After). Send Content-Type: application/json.
curl --request POST \
--url https://api.apsio.io/v1/projects/{projectId}/live/commands \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tester_id": "<string>",
"install": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/projects/{projectId}/live/commands"
payload = {
"tester_id": "<string>",
"install": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tester_id: '<string>', install: '<string>'})
};
fetch('https://api.apsio.io/v1/projects/{projectId}/live/commands', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.apsio.io/v1/projects/{projectId}/live/commands",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tester_id' => '<string>',
'install' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.apsio.io/v1/projects/{projectId}/live/commands"
payload := strings.NewReader("{\n \"tester_id\": \"<string>\",\n \"install\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.apsio.io/v1/projects/{projectId}/live/commands")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tester_id\": \"<string>\",\n \"install\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/projects/{projectId}/live/commands")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tester_id\": \"<string>\",\n \"install\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0192f3a4-0000-7000-8000-0000000c0001",
"delivered": true
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"subject": "organization"
}
}