The security graph around one asset
curl --request GET \
--url https://app.trustivan.com/api/v1/assets/{id}/security-graph \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}/security-graph"
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}/security-graph', 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}/security-graph"
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))
}{
"nodes": [
{
"key": "<string>",
"kind": "internet",
"label": "<string>",
"attributes": {},
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"kind": "exposes",
"attributes": {
"traversal": 123,
"why": "<string>",
"finding_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
],
"depth": 123,
"truncated": true
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}The security graph around one asset
The graph nodes this asset is (a workload, an image, a cluster’s
cluster-admin or host node, a cloud account’s administrator), every
node within depth edges of them in either direction, and the edges
among those nodes. At most 200 nodes; truncated says when the walk
stopped there. An asset the graph does not contain returns no nodes.
Requires findings:read.
GET
/
assets
/
{id}
/
security-graph
The security graph around one asset
curl --request GET \
--url https://app.trustivan.com/api/v1/assets/{id}/security-graph \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}/security-graph"
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}/security-graph', 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}/security-graph"
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))
}{
"nodes": [
{
"key": "<string>",
"kind": "internet",
"label": "<string>",
"attributes": {},
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>",
"kind": "exposes",
"attributes": {
"traversal": 123,
"why": "<string>",
"finding_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
],
"depth": 123,
"truncated": true
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}