curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"on": true,
"reason": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch"
payload = {
"on": True,
"reason": "<string>"
}
headers = {
"cookie": "apsio_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'apsio_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({on: true, reason: '<string>'})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch', 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/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch",
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([
'on' => true,
'reason' => '<string>'
]),
CURLOPT_COOKIE => "apsio_session=",
CURLOPT_HTTPHEADER => [
"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/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch"
payload := strings.NewReader("{\n \"on\": true,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "apsio_session=")
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/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"on\": true,\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'apsio_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"on\": true,\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "<string>",
"families": {
"summary": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"errors": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"logs": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"spans": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"network": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"metrics": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"replay": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"resources": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
}
},
"retention_hours": 123,
"cap_bytes": 123,
"replay_cap_bytes": 123,
"rules": [
{
"id": "checkout_5xx",
"on": "network",
"name": "<string>",
"updated_by": "<string>",
"updated_at": "<string>",
"where": [
{
"attr": "<string>",
"op": "eq",
"value": "<string>"
}
]
}
],
"kill_switch": {
"on": true,
"reason": "<string>",
"updated_by": "<string>",
"updated_at": "<string>",
"by_apsio": true
},
"updated_by": "<string>",
"updated_at": "<string>"
}Stop or restart an app's SDK
The app’s own kill switch (spec 12.3): on, its SDKs stop collecting, drop what they hold and send nothing until it is off; devices take it at their next fetch. A reason is required to turn it on. It never lifts Apsio’s switch or a suspension (by_apsio). Owners and admins; audited as instrumentation.kill_switch_on or instrumentation.kill_switch_off.
curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"on": true,
"reason": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch"
payload = {
"on": True,
"reason": "<string>"
}
headers = {
"cookie": "apsio_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'apsio_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({on: true, reason: '<string>'})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch', 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/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch",
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([
'on' => true,
'reason' => '<string>'
]),
CURLOPT_COOKIE => "apsio_session=",
CURLOPT_HTTPHEADER => [
"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/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch"
payload := strings.NewReader("{\n \"on\": true,\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "apsio_session=")
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/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"on\": true,\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/kill-switch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'apsio_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"on\": true,\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "<string>",
"families": {
"summary": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"errors": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"logs": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"spans": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"network": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"metrics": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"replay": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
},
"resources": {
"mode": "always",
"rate": 0.5,
"triggers": [
"<string>"
],
"window_minutes": 30,
"retention_hours": 84,
"cap_bytes": 10518528
}
},
"retention_hours": 123,
"cap_bytes": 123,
"replay_cap_bytes": 123,
"rules": [
{
"id": "checkout_5xx",
"on": "network",
"name": "<string>",
"updated_by": "<string>",
"updated_at": "<string>",
"where": [
{
"attr": "<string>",
"op": "eq",
"value": "<string>"
}
]
}
],
"kill_switch": {
"on": true,
"reason": "<string>",
"updated_by": "<string>",
"updated_at": "<string>",
"by_apsio": true
},
"updated_by": "<string>",
"updated_at": "<string>"
}Authorizations
The console session, set by /v1/auth/callback (__Host-apsio_session when host-only).
Path Parameters
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"0192f3a4-0000-7000-8000-00000000a001"
Body
Response
The instrumentation, with the switch as published
A family left out is in always mode, except resources, which is in never mode (D113).
Show child attributes
Show child attributes
How long held records stay on the device: 1 to 168 hours.
The store's cap: at most 20 MiB.
Replay's share of it: at most 10 MiB.
At most 50; families list them as rule:.
Show child attributes
Show child attributes
The app's own kill switch (spec 12.3): its SDKs stop collecting, drop what they hold and send nothing until it is off.
Show child attributes
Show child attributes
Null: the profile's defaults.