curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop"
payload = { "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({reason: '<string>'})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop', 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}/layers/{layerId}/stop",
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([
'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}/layers/{layerId}/stop"
payload := strings.NewReader("{\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}/layers/{layerId}/stop")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop")
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 \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"when": {
"app_version": [
"<string>"
],
"os_name": [
"<string>"
],
"os_version_min": "<string>",
"os_version_max": "<string>",
"device_model": [
"<string>"
]
},
"hints": {
"installs": [
"<string>"
],
"users": [
"<string>"
]
},
"rollout": {
"percent": 50,
"holdback_percent": 25
},
"expires_at": "<string>",
"changes": {
"capture": {},
"instrumentation": {
"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
}
}
},
"replay": {},
"masking": {}
},
"guardrails": {
"crash_free_drop_points": 99,
"ingest_increase_pct": 123,
"min_sessions": 500025
},
"state": "active",
"stopped_reason": "<string>",
"stopped_at": "<string>",
"updated_by": "<string>",
"updated_at": "<string>"
}Stop a policy layer
Stops an active layer now, with the reason its history keeps: the next policy leaves it out, and devices drop it at their next fetch. A layer no longer active is 409 layer_stopped. Owners and admins; audited as instrumentation.layer_stop.
curl --request POST \
--url https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop \
--header 'Content-Type: application/json' \
--cookie apsio_session= \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop"
payload = { "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({reason: '<string>'})
};
fetch('https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop', 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}/layers/{layerId}/stop",
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([
'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}/layers/{layerId}/stop"
payload := strings.NewReader("{\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}/layers/{layerId}/stop")
.header("cookie", "apsio_session=")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.apsio.io/v1/orgs/{orgId}/projects/{projectId}/apps/{appId}/layers/{layerId}/stop")
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 \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"when": {
"app_version": [
"<string>"
],
"os_name": [
"<string>"
],
"os_version_min": "<string>",
"os_version_max": "<string>",
"device_model": [
"<string>"
]
},
"hints": {
"installs": [
"<string>"
],
"users": [
"<string>"
]
},
"rollout": {
"percent": 50,
"holdback_percent": 25
},
"expires_at": "<string>",
"changes": {
"capture": {},
"instrumentation": {
"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
}
}
},
"replay": {},
"masking": {}
},
"guardrails": {
"crash_free_drop_points": 99,
"ingest_increase_pct": 123,
"min_sessions": 500025
},
"state": "active",
"stopped_reason": "<string>",
"stopped_at": "<string>",
"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"
^[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
1 - 500Response
The stopped layer
What a layer targets besides installs and app users (spec 12.4). Sent back as read, it changes nothing; the targeted installs and users are in the layer's hints.
Show child attributes
Show child attributes
The last four characters of each install and app user the layer targets: read only. Leave when.installs and when.users out of a PUT to keep them; send them only to target new ones.
Show child attributes
Show child attributes
A staged rollout (spec 12.4), with at most two decimals: percent of the targeted installs take the layer, holdback_percent are kept out of it to compare against; together at most 100.
Show child attributes
Show child attributes
What the layer changes, as the policy's own keys (spec 12.2): capture only narrows, masking and replay only tighten, and in instrumentation only the families: a family is replaced whole, and may list only the app's rules.
Show child attributes
Show child attributes
The bounds the backend watches (spec 12.4): past one, it publishes the policy without the layer and marks it rolled_back. A guardrail needs a holdback.
Show child attributes
Show child attributes
active: published. stopped: a person stopped it (stopped_reason says why). rolled_back: a guardrail did (stopped_reason says which bound). removed: left out of the list. expired: past expires_at.
active, stopped, rolled_back, removed, expired