Deleting Data

There are three deletion options inside a delete mutation.

  • <uid> <edge> <uid>/"value" . Delete a single triple
  • <uid> <edge> * . Delete all triples for a given edge
  • <uid> * * . Delete all triples for a given node

The examples given here are not complete. Uids assigned on your instance would be unique. Try something out; you’re not going to hurt anyone, just delete their friends.

You can do the same example using JSON format. You’re able to do that through our clients, cURL or Ratel UI.

See in JSON:

Delete all triples for a given node

 {
        "delete": [
            {
                "uid": "0xa"
            }
        ]
    }

Delete all triples for a given edge

 {
        "delete": [
            {
                "uid": "0xa",
                "friends": null
            }
        ]
    }

This don’t delete their child’s, means in that case, will not erase the “friends”. Only the relation.

Deleting relations and then their childs

 {
        "delete": [
            {
                "uid": "0x2", # Answer UID.
                "comment": {
                   "uid": "0x3" # Comment.
            }
            },
            {
                "uid": "0x3" #Comment final delation, cleaning the Answer's child.
            }
        ]
    }
Tip

The JSON example may end up helping you better understand the format in RDF.

Endpoint: /mutate
Response