API documentation
  • Getting started
  • Assets
    • Querying Assets
    • Upserting Assets
    • Deleting Assets
  • DSEs
    • Querying DSEs
    • Upserting DSEs
    • Deleting DSEs
  • Relations
    • Creating relations
    • Deleting relations
    • Supported node and relation types
  • API reference
Powered by GitBook
On this page
  1. Relations

Deleting relations

PreviousCreating relationsNextSupported node and relation types

Last updated 11 months ago

This page shows some examples on how to use the dScribe API to delete relations.

Example: delete a relation between two assets

const url = "https://{your_tenant}.dscribedata.com/api/relations";
const authToken = "yholmghj8§hbfg...";

fetch(url, {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${authToken}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify([
    {
      "from_node_type": "ASSET",
      "from_node_id": "id1",
      "to_node_type": "ASSET",
      "to_node_id": "id2",
      "relation_type": "is_related"
    }
  ]),
});

Supported node and relation types
  • DELETEDelete multiple relations
  • Example: delete a relation between two assets

Delete multiple relations

delete

Delete one or more relations

Authorizations
Body
from_node_typestringRequired
from_node_idstringRequired
to_node_typestringRequired
to_node_idstringRequired
relation_typestringRequired
Responses
200
Successful operation
400
One of the values passed to the API is wrong
500
Internal server error
delete
DELETE /api/relations HTTP/1.1
Host: __tenant__.dscribedata.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 114

[
  {
    "from_node_type": "text",
    "from_node_id": "text",
    "to_node_type": "text",
    "to_node_id": "text",
    "relation_type": "text"
  }
]

No content