Read one asset's place in the estate graph
curl --request GET \
--url https://app.trustivan.com/api/v1/assets/{id}/relationships \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}/relationships"
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}/relationships', 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}/relationships"
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))
}{
"parents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"child_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship": "contains",
"source": "scan",
"attributes": {},
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z"
}
],
"children": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"child_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship": "contains",
"source": "scan",
"attributes": {},
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_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"
}Read one asset's place in the estate graph
Both directions in one response. “What runs this image?” reads the parents and “what does this account contain?” reads the children, and a caller does not know which direction holds its answer until it looks.
GET
/
assets
/
{id}
/
relationships
Read one asset's place in the estate graph
curl --request GET \
--url https://app.trustivan.com/api/v1/assets/{id}/relationships \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/assets/{id}/relationships"
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}/relationships', 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}/relationships"
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))
}{
"parents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"child_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship": "contains",
"source": "scan",
"attributes": {},
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z"
}
],
"children": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"child_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"relationship": "contains",
"source": "scan",
"attributes": {},
"first_seen_at": "2023-11-07T05:31:56Z",
"last_seen_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"
}