Can you call /alter endpoint with something like dgo api.Operation_DATA


(J Czz) #1

Hi

This works with go dgo client:

err := c.Alter(context.Background(), &api.Operation{DropOp: api.Operation_DATA})

Can you do something similar with the /alter endpoint - like:

curl -X POST localhost:8080/alter -d ‘{“drop_all”: true}’

But just deleting data?
Tried this, so I expect not - but just in case:

curl -X POST localhost:8080/alter -d ‘{“drop_data”: true}’


(Michel Conrado) #2

As far I can tell there’s no support for this operation in dgraph’s api.


(Daniel Mai) #3

You can do this via curl to drop the data without the schema:

curl -X POST localhost:8080/alter -d '{"drop_op": "DATA"}'