How to programatically drop dgraph data by schema

OK I did a bit of reverse engineering because I couldn’t find the docs.

What you want to do is send a request to the /alter endpoint, not the /admin endpoint.

This is the request you send to the /alter endpoint:

{"drop_attr":"SCHEMA PREDICATE YOU WANT TO DROP"}

Request type is application/json, request verb is POST

1 Like