curl --request GET \
--url https://app.trustivan.com/api/v1/assets/{id}/grade \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}/grade"
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/assets/{id}/grade', 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/assets/{id}/grade"
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))
}{
"grade": {
"model": "grade-v1",
"graded": true,
"grade": "A",
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
]
},
"history": [
{
"day": "2023-12-25",
"grade": "A",
"model": "<string>",
"distribution": {}
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}An asset's posture grade, reasons and history
The asset’s grade under grade-v1 (see the PostureGrade schema): the
worst grade any of its open findings triggers, and the rules at that
grade with how many findings set each. An asset nothing has scanned or
collected is not graded (graded: false), never A. Archived assets,
cloud resources and Kubernetes workloads are not graded; their reason
says why. history is one entry per UTC day a snapshot was recorded,
oldest first; a day with no snapshot is absent. Requires assets:read.
curl --request GET \
--url https://app.trustivan.com/api/v1/assets/{id}/grade \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}/grade"
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/assets/{id}/grade', 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/assets/{id}/grade"
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))
}{
"grade": {
"model": "grade-v1",
"graded": true,
"grade": "A",
"reasons": [
{
"rule": "<string>",
"grade": "A",
"count": 123,
"text": "<string>"
}
]
},
"history": [
{
"day": "2023-12-25",
"grade": "A",
"model": "<string>",
"distribution": {}
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
The grade and its history.
grade-v1. Every open (open, triaged, reopened) finding is checked against these rules and the asset takes the worst grade any triggers. F: a critical past its remediation SLA, a critical on a build running on an internet-exposed workload, or a risk score of 80 or more. D: an open critical, a high past its SLA, a high on a running exposed build, or a risk score of 60 or more. C: an open high, any other finding past its SLA, or a risk score of 40 or more. B: an open medium or unrated finding. A: none of these. Not graded: nothing has scanned or collected the asset and it has no open finding.
Show child attributes
Show child attributes