A-F posture grades for the organization, its groups and its worst assets
curl --request GET \
--url https://app.trustivan.com/api/v1/stats/grades \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/stats/grades"
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/grades', 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/grades"
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))
}{
"model": "<string>",
"organization": {
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
},
"by_kind": [
{
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
}
],
"by_environment": [
{
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
}
],
"by_owner": [
{
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
}
],
"worst": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"environment": "<string>",
"grade": {
"model": "grade-v1",
"graded": true,
"grade": "A",
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
]
},
"owner": "<string>"
}
],
"trend": [
{
"day": "2023-12-25",
"grade": "A",
"model": "<string>",
"distribution": {}
}
],
"generated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Posture grades for the organization and its assets
Posture grades under grade-v1, computed from the open findings at
request time: the organization, each asset kind, environment and owner
(assets with no owner are grouped as unowned; the owner label is the
team), the ten worst graded assets, and the organization’s grade for
each of the last 30 UTC days a snapshot was recorded.
A group’s grade is the WORST grade of its graded members, never an
average, so one F is never hidden by many A. Archived assets, cloud
resources and Kubernetes workloads are left out (cloud and Kubernetes
findings are graded on the account and cluster). Same permission as
/stats (assets:read).
GET
/
stats
/
grades
A-F posture grades for the organization, its groups and its worst assets
curl --request GET \
--url https://app.trustivan.com/api/v1/stats/grades \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/stats/grades"
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/grades', 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/grades"
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))
}{
"model": "<string>",
"organization": {
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
},
"by_kind": [
{
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
}
],
"by_environment": [
{
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
}
],
"by_owner": [
{
"model": "<string>",
"graded": true,
"grade": "A",
"assets": 123,
"distribution": {},
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
],
"key": "<string>"
}
],
"worst": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"kind": "<string>",
"environment": "<string>",
"grade": {
"model": "grade-v1",
"graded": true,
"grade": "A",
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
]
},
"owner": "<string>"
}
],
"trend": [
{
"day": "2023-12-25",
"grade": "A",
"model": "<string>",
"distribution": {}
}
],
"generated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
The grades.
GET /stats/grades.