This page shows some examples on how to use the dScribe API to create relations.
Example: create a relation between two assets
const url = "https://{your_tenant}.dscribedata.com/api/relations";
const authToken = "yholmghj8§hbfg...";
fetch(url, {
method: "POST",
headers: {
Authorization: `Bearer ${authToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
relations: [
{
"from_node_type": "ASSET",
"from_node_id": "id1",
"to_node_type": "ASSET",
"to_node_id": "id2",
"relation_type": "is_related"
}
]
}),
});