# API to reset download counter

**URL:** <https://forum.pydio.com/t/api-to-reset-download-counter/295>\
**Category:** Development\
**Created:** [December 12, 2017, 5:29am UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295 "2017-12-12T05:29:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BurnZer0](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/burnzer0/32/68_2.png) [@BurnZer0](https://forum.pydio.com/u/BurnZer0)\
**Post date:** [December 12, 2017, 5:29am UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295/1 "2017-12-12T05:29:08Z")

</div>

Hi,

Could you please provide an example on how to reset the download counter of a shared folder or file? I tried to view the example at [https://pydio.com/en/docs/developer-guide-v8/filesystem-api-v1](https://pydio.com/en/docs/developer-guide-v8/filesystem-api-v1) but when I click the details, the page gives me error. Infact we cannot view any example for API’s.

Thank you.

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [December 12, 2017, 2:58pm UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295/2 "2017-12-12T14:58:35Z")

</div>

hi, yep, there are deadlinks here it seems, see [https://pydio.com/en/pydio-api-v1](https://pydio.com/en/pydio-api-v1)

---

<div class="post-metadata">

**Author:** ![BurnZer0](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/burnzer0/32/68_2.png) [@BurnZer0](https://forum.pydio.com/u/BurnZer0)\
**Post date:** [December 14, 2017, 6:26am UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295/3 "2017-12-14T06:26:16Z")

</div>

Hi Charles,

Thank you for the link. I tried as per the example, however it didn’t work.

Here’s my script:

```
curl -u "$USERNAME:$PASSWORD" -X POST "$PYDIO_HOST/api/$PYDIO_REPOSITORY/reset_counter/file+?file=linux_debian_brand_logo_spiral_93908_1280x1024.jpg"

```

The script will just execute and nothing will happen. I cannot reset the download counter for that shared file.

Help is appreciated.

Thank you again.

Regards,  
BurnZer0

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [December 14, 2017, 2:46pm UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295/4 "2017-12-14T14:46:40Z")

</div>

hi can you try this? (assuming your image is located at the root of the repo)

```
curl -u "$USERNAME:$PASSWORD" -X POST "$PYDIO_HOST/api/$PYDIO_REPOSITORY/reset_counter/linux_debian_brand_logo_spiral_93908_1280x1024.jpg"
```

---

<div class="post-metadata">

**Author:** ![BurnZer0](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/burnzer0/32/68_2.png) [@BurnZer0](https://forum.pydio.com/u/BurnZer0)\
**Post date:** [December 15, 2017, 5:16am UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295/5 "2017-12-15T05:16:45Z")

</div>

Thank you Charles. That works. By the way, is it possible to do this as admin user ? Or we need to only login to the particular user and do it?

---

<div class="post-metadata">

**Author:** ![charles](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/charles/32/3_2.png) [@charles](https://forum.pydio.com/u/charles)\
**Post date:** [December 15, 2017, 3:25pm UTC](https://forum.pydio.com/t/api-to-reset-download-counter/295/6 "2017-12-15T15:25:46Z")

</div>

hi, no currently you would have to use the user login, as the share is referenced to this user. Not very handy I admit.
