5
votes

I'm using Titan 1.0 Version and Gremlin Server with REST Api for creating and updating Vertex details. How can I delete the vertex using vertexId?

2

2 Answers

14
votes

you can use drop property to delete a vertex like :

g.V(vertexId).drop()

you will find more details about drop property on following link :

TinkerPop3 Documentation

3
votes

You can use :

 g.V().hasId(vertexId).drop()

In the hasId method pass the id of the vertex you want to delete