curl --request GET \
--url https://app.trustivan.com/api/v1/stats/posture \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/stats/posture"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/stats/posture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/stats/posture"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"window_days": 123,
"trend": [
{
"date": "2023-12-25",
"opened": 123,
"resolved": 123
}
],
"kind_counts": {},
"known_exploited_open": 123,
"fixable_open": 123,
"resolved_in_window": 123,
"mttr_hours": 123,
"assets_by_kind": {},
"assets_scanned_7d": 123,
"top_assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"open": 123,
"critical": 123,
"high": 123,
"medium": 123,
"low": 123,
"known_exploited": 123
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}The tenant's posture over time, by kind, and by asset
The overview’s direction rather than its size: thirty UTC calendar days of findings opened and resolved, the open backlog by kind, how much of it is known-exploited or has a fixed version, time to resolve, and the five assets with the most severe open findings.
Same permission as /stats (assets:read), and a separate route
because it is a heavier read than /stats, which a client may poll.
Every figure is the caller’s own tenant’s. Every number is present and
non-null; mttr_hours is the one exception and is null when nothing
was resolved in the window, because 0 would claim instant fixes.
curl --request GET \
--url https://app.trustivan.com/api/v1/stats/posture \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/stats/posture"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/stats/posture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/stats/posture"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"window_days": 123,
"trend": [
{
"date": "2023-12-25",
"opened": 123,
"resolved": 123
}
],
"kind_counts": {},
"known_exploited_open": 123,
"fixable_open": 123,
"resolved_in_window": 123,
"mttr_hours": 123,
"assets_by_kind": {},
"assets_scanned_7d": 123,
"top_assets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"open": 123,
"critical": 123,
"high": 123,
"medium": 123,
"low": 123,
"known_exploited": 123
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
The posture.
GET /stats/posture. "Open" means open, triaged or reopened, the same
predicate as /stats, so the two never disagree about the backlog.
Archived assets are excluded from the asset figures and the ranking.