Device Events
curl --request POST \
--url https://api.your-blindsight.com/api/runtime-security/agent/device-events \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"kind": "<string>",
"type": "lifecycle",
"detail": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.your-blindsight.com/api/runtime-security/agent/device-events"
payload = { "events": [
{
"kind": "<string>",
"type": "lifecycle",
"detail": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
kind: '<string>',
type: 'lifecycle',
detail: '<string>',
occurred_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.your-blindsight.com/api/runtime-security/agent/device-events', 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.your-blindsight.com/api/runtime-security/agent/device-events",
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([
'events' => [
[
'kind' => '<string>',
'type' => 'lifecycle',
'detail' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z'
]
]
]),
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.your-blindsight.com/api/runtime-security/agent/device-events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"kind\": \"<string>\",\n \"type\": \"lifecycle\",\n \"detail\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.your-blindsight.com/api/runtime-security/agent/device-events")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"kind\": \"<string>\",\n \"type\": \"lifecycle\",\n \"detail\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.your-blindsight.com/api/runtime-security/agent/device-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"kind\": \"<string>\",\n \"type\": \"lifecycle\",\n \"detail\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}runtime-security-agent
Device Events
Generic device-telemetry sink for the desktop agent: lifecycle (app_started / app_stopped / crashed), usage, and tamper.
Persisted as audit records keyed to the device so the admin can see who is
running the agent, who closed it, and who tampered with it (see
docs/DEVICE_PROTECTION_AND_TELEMETRY_PLAN.md, Part B). This complements the
dedicated /tamper-events endpoint, which the durable tamper drainer keeps
using; an unknown type is recorded as lifecycle so a newer agent
never has its telemetry silently dropped by an older server.
POST
/
api
/
runtime-security
/
agent
/
device-events
Device Events
curl --request POST \
--url https://api.your-blindsight.com/api/runtime-security/agent/device-events \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"kind": "<string>",
"type": "lifecycle",
"detail": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
]
}
'import requests
url = "https://api.your-blindsight.com/api/runtime-security/agent/device-events"
payload = { "events": [
{
"kind": "<string>",
"type": "lifecycle",
"detail": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
kind: '<string>',
type: 'lifecycle',
detail: '<string>',
occurred_at: '2023-11-07T05:31:56Z'
}
]
})
};
fetch('https://api.your-blindsight.com/api/runtime-security/agent/device-events', 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.your-blindsight.com/api/runtime-security/agent/device-events",
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([
'events' => [
[
'kind' => '<string>',
'type' => 'lifecycle',
'detail' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z'
]
]
]),
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.your-blindsight.com/api/runtime-security/agent/device-events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"kind\": \"<string>\",\n \"type\": \"lifecycle\",\n \"detail\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.your-blindsight.com/api/runtime-security/agent/device-events")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"kind\": \"<string>\",\n \"type\": \"lifecycle\",\n \"detail\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.your-blindsight.com/api/runtime-security/agent/device-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"kind\": \"<string>\",\n \"type\": \"lifecycle\",\n \"detail\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
