# dropData endpoint missing on dgraph (not on slash)

**URL:** <https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494>\
**Category:** Dgraph\
**Created:** [September 6, 2021, 5:02pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494 "2021-09-06T17:02:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![martaver](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/martaver/32/8682_2.png) [@martaver](https://discuss.dgraph.io/u/martaver)\
**Post date:** [September 6, 2021, 5:02pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/1 "2021-09-06T17:02:02Z")

</div>

## Report a Dgraph Bug

### What version of Dgraph are you using?

> **Dgraph Version**
>
> ```auto
> $ dgraph version
>  
> Dgraph version : v21.03.1
> Dgraph codename : rocket-1
> Dgraph SHA-256 : a00b73d583a720aa787171e43b4cb4dbbf75b38e522f66c9943ab2f0263007fe
> Commit SHA-1 : ea1cb5f35
> Commit timestamp : 2021-06-17 20:38:11 +0530
> Branch : HEAD
> Go version : go1.16.2
> jemalloc enabled : true
> 
> For Dgraph official documentation, visit https://dgraph.io/docs.
> For discussions about Dgraph , visit http://discuss.hypermode.com.
> For fully-managed Dgraph Cloud , visit https://dgraph.io/cloud.
> 
> Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
> Copyright 2015-2021 Dgraph Labs, Inc.
> 
> ```

### Have you tried reproducing the issue with the latest release?

Yes

### What is the hardware spec (RAM, OS)?

MacOS 16GB RAM

### Steps to reproduce the issue (command/config used to run Dgraph).

Run this against the /admin API on dgraph/standalone:

```auto
mutation { 
  dropData(allDataAndSchema: true) {
    response { 
      code 
      message 
    } 
  } 
}

```

### Expected behaviour and actual result.

I’d like to use the `dropData(allDataAndSchema: true)` mutation to programmatically truncate the data in my local test instance of dgraph after I push a new schema, however this endpoint seems to only exist in slash graphql.

Being able to do this programmatically would be a nice boost to local productivity.

---

<div class="post-metadata">

**Author:** ![jdgamble555](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jdgamble555/32/7503_2.png) [@jdgamble555](https://discuss.dgraph.io/u/jdgamble555)\
**Post date:** [September 6, 2021, 7:27pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/2 "2021-09-06T19:27:14Z")

</div>

Did you try both:

`https://cerebro.cloud.dgraph.io/graphql`

and

`https://${DEPLOYMENT_URL}.cloud.dgraph.io/admin`

(Login to Dgraph Cloud → GraphQL → GraphQL Endpoint → Admin)

DGraph renamed **Slash Dgraph** to **Cloud Dgraph** and didn’t update all the docs, so I suspect one of those two should work instead.

* * *

@MichelDiz

### Docs that need to be updated:

- [https://dgraph.io/docs/cloud/cloud-api/backend/](https://dgraph.io/docs/cloud/cloud-api/backend/)
- [https://dgraph.io/docs/cloud/admin/drop-data/](https://dgraph.io/docs/cloud/admin/drop-data/)

J

---

<div class="post-metadata">

**Author:** ![martaver](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/martaver/32/8682_2.png) [@martaver](https://discuss.dgraph.io/u/martaver)\
**Post date:** [September 6, 2021, 7:29pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/3 "2021-09-06T19:29:56Z")

</div>

No, sorry, I meant on a local instance of dgraph, not on a Cloud Dgraph instance.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [September 6, 2021, 11:52pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/4 "2021-09-06T23:52:44Z")

</div>

Check the Schema. If you use any GraphQL client you should be able to see the Admin Schema and find out if that version supports this. If not, that means you may need to upgrade or the function was moved somewhere. The schema could clarify that.

---

<div class="post-metadata">

**Author:** ![martaver](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/martaver/32/8682_2.png) [@martaver](https://discuss.dgraph.io/u/martaver)\
**Post date:** [September 7, 2021, 12:28pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/5 "2021-09-07T12:28:41Z")

</div>

Mmm yeah so I introspected the admin API’s graphql endpoint, and there’s no sign of ‘dropX’ in there…

Is there no way to do this in a local instance?

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [September 7, 2021, 2:10pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/6 "2021-09-07T14:10:37Z")

</div>

Go to Ratel, then go to Schema, then “Bulk edit” and then “drop data”.

But this is quite weird, it should have been in the community edition. @dmai do you have any idea why it seems to not have it?

---

<div class="post-metadata">

**Author:** ![martaver](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/martaver/32/8682_2.png) [@martaver](https://discuss.dgraph.io/u/martaver)\
**Post date:** [September 7, 2021, 6:29pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/7 "2021-09-07T18:29:01Z")

</div>

Okay great, but yeah it would be ideal to be able to do this programmatically. At least in a standalone instance for testing purposes!

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [September 7, 2021, 6:33pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/8 "2021-09-07T18:33:40Z")

</div>

You can send a cURL command.

```auto
curl -s localhost:8080/alter -d '{ "drop_all": true }'

```

[https://dgraph.io/docs/deploy/dgraph-administration/#secure-alter-operations](https://dgraph.io/docs/deploy/dgraph-administration/#secure-alter-operations)

---

<div class="post-metadata">

**Author:** ![jdgamble555](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jdgamble555/32/7503_2.png) [@jdgamble555](https://discuss.dgraph.io/u/jdgamble555)\
**Post date:** [September 7, 2021, 6:37pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/9 "2021-09-07T18:37:40Z")

</div>

Nice. It looks like you guys updated the docs. There are still a few broken references (search slash in the docs and you can see what is left to change).

Thanks for getting this updated!

J

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [September 7, 2021, 6:39pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/10 "2021-09-07T18:39:21Z")

</div>

> [@jdgamble555](#):
>
> Thanks for getting this updated!

What exactly do you think was updated? That last doc ref is pretty old. BTW, this method will be discontinued in the future.

---

<div class="post-metadata">

**Author:** ![jdgamble555](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jdgamble555/32/7503_2.png) [@jdgamble555](https://discuss.dgraph.io/u/jdgamble555)\
**Post date:** [September 7, 2021, 6:47pm UTC](https://discuss.dgraph.io/t/dropdata-endpoint-missing-on-dgraph-not-on-slash/15494/11 "2021-09-07T18:47:29Z")

</div>

Nm. There are still references to Slash Dgraph. I didn’t know if that should be updated or not in the docs (from the two links above and if you search “slash” in the docs).

J
