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

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}’

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

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

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

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.