API
API: clients and reports
For agencies and hosters: list clients with their state and fetch monthly reports with your logo automatically.
GET /customers
List clients · Read
Clients from the client assignment of the servers, with number of servers, open critical and high alerts and last report.
Example request
cURL
curl -sSf "https://app.tyrosec.com/api/v1/customers" \
-H "Authorization: Bearer $TYROSEC_TOKEN" \
-H "Accept: application/json"Python
import os
import requests
resp = requests.request(
"GET",
"https://app.tyrosec.com/api/v1/customers",
headers={"Authorization": f"Bearer {os.environ['TYROSEC_TOKEN']}", "Accept": "application/json"},
timeout=30,
)
resp.raise_for_status()
print(resp.json())PHP
<?php
$ch = curl_init('https://app.tyrosec.com/api/v1/customers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TYROSEC_TOKEN'), 'Accept: application/json'],
]);
$out = curl_exec($ch);
if ($out === false) { throw new RuntimeException(curl_error($ch)); }
print_r(json_decode($out, true));JavaScript
const res = await fetch("https://app.tyrosec.com/api/v1/customers", {
headers: {
Authorization: `Bearer ${process.env.TYROSEC_TOKEN}`,
Accept: "application/json",
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());Example response HTTP 200
{
"data": [
{
"name": "Beispiel-Shop GmbH",
"servers": 2,
"open_alerts": {
"critical": 4,
"high": 4
},
"last_seen": "2026-11-18T15:27:47+00:00"
},
{
"name": "Kanzlei Muster",
"servers": 1,
"open_alerts": {
"critical": 2,
"high": 1
},
"last_seen": "2026-11-18T15:27:47+00:00"
}
]
}GET /customers/{name}/report.pdf
Monthly report of a client (PDF) · Read
The monthly report as a PDF, with your agency’s name and logo. Without month the current month; 404 if the client has no servers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | client name (URL-encoded) |
month | query | YYYY-MM | no | month, e.g. 2026-10 |
Example request
cURL
curl -sSf "https://app.tyrosec.com/api/v1/customers/Beispiel-Shop%20GmbH/report.pdf?month=2026-10" \
-H "Authorization: Bearer $TYROSEC_TOKEN" \
-o report.pdfPython
import os
import requests
resp = requests.request(
"GET",
"https://app.tyrosec.com/api/v1/customers/Beispiel-Shop%20GmbH/report.pdf",
headers={"Authorization": f"Bearer {os.environ['TYROSEC_TOKEN']}", "Accept": "application/json"},
params={"month": "2026-10"},
timeout=30,
)
resp.raise_for_status()
with open("report.pdf", "wb") as f:
f.write(resp.content)PHP
<?php
$ch = curl_init('https://app.tyrosec.com/api/v1/customers/Beispiel-Shop%20GmbH/report.pdf?month=2026-10');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FAILONERROR => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('TYROSEC_TOKEN'), 'Accept: application/json'],
]);
$out = curl_exec($ch);
if ($out === false) { throw new RuntimeException(curl_error($ch)); }
file_put_contents('report.pdf', $out);JavaScript
import { writeFile } from "node:fs/promises";
const res = await fetch("https://app.tyrosec.com/api/v1/customers/Beispiel-Shop%20GmbH/report.pdf?month=2026-10", {
headers: {
Authorization: `Bearer ${process.env.TYROSEC_TOKEN}`,
Accept: "application/json",
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await writeFile("report.pdf", Buffer.from(await res.arrayBuffer()));Example response HTTP 200
Response: a PDF file (Content-Type application/pdf).
See what’s happening on your server in two minutes.
Install the agent with a one-liner, wait for the initial scan, done. 14 days free, up to 3 servers, no credit card required.