API to reset download counter

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 but when I click the details, the page gives me error. Infact we cannot view any example for API’s.

Thank you.

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

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

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"

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?

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