# Proper Interface for Files Activity WebHooks

**URL:** <https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198>\
**Category:** 💻 Development\
**Tags:** app-development\
**Created:** [December 28, 2017, 4:05pm UTC](https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198 "2017-12-28T16:05:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibr](https://help.nextcloud.com/letter_avatar/ibr/32/5_5575768a8748004e209b776fc1b2916d.png) [@ibr](https://help.nextcloud.com/u/ibr)\
**Post date:** [December 28, 2017, 4:06pm UTC](https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198/1 "2017-12-28T16:06:00Z")

</div>

Hi,

I’m trying to follow the example in the [link](https://docs.nextcloud.com/server/11/developer_manual/app/hooks.html) but for getting “Filesystem Root” but the questions are:

- what interface I should use instead of `IUserManager` in the line `use OCP\IUserManager;`
- which one of these functions `getRootFolder(), getUserFolder(), getAppFolder().` I should use instead of `getUserManager() `
- is there anything else I should change?
- can I split the three code blocks in the example into three PHP scripts? (I’m still new at PHP)

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Rello](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rello/32/166_2.png) [@Rello](https://help.nextcloud.com/u/Rello)\
**Post date:** [December 28, 2017, 7:58pm UTC](https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198/2 "2017-12-28T19:58:26Z")

</div>

hey,  
what exactly do you want to do?  
which hook?

perhaps my stuff helps you in any kind

> <https://github.com/Rello/audioplayer/blob/master/lib/Hooks/FileHooks.php>

---

<div class="post-metadata">

**Author:** ![ibr](https://help.nextcloud.com/letter_avatar/ibr/32/5_5575768a8748004e209b776fc1b2916d.png) [@ibr](https://help.nextcloud.com/u/ibr)\
**Post date:** [January 2, 2018, 8:42am UTC](https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198/3 "2018-01-02T08:42:38Z")

</div>

Thanks for the reply 🙂  
actually something similar for what you have done, but not to get the information of a file but to get what changes were made to that file (such as, deleting file, creating file or renaming file)  
you can say to make a listener to the activities that are made by the server

---

<div class="post-metadata">

**Author:** ![ibr](https://help.nextcloud.com/letter_avatar/ibr/32/5_5575768a8748004e209b776fc1b2916d.png) [@ibr](https://help.nextcloud.com/u/ibr)\
**Post date:** [January 2, 2018, 2:29pm UTC](https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198/4 "2018-01-02T14:29:11Z")

</div>

since we are in the subject, for an app that listens to the NextCloud server, do you know how to create a hooks at administrative level, to monitor all activities done to the files, for all users all the time whether they are signed in or not?

there is an app called activity it listens to the server and return all the activities that are made to the files by that user, but only for the logged in user, I didn’t find in the documentations any hint to when I need.

Tanks a lot

---

<div class="post-metadata">

**Author:** ![ibr](https://help.nextcloud.com/letter_avatar/ibr/32/5_5575768a8748004e209b776fc1b2916d.png) [@ibr](https://help.nextcloud.com/u/ibr)\
**Post date:** [March 4, 2018, 2:40pm UTC](https://help.nextcloud.com/t/proper-interface-for-files-activity-webhooks/25198/6 "2018-03-04T14:40:54Z")

</div>

the answer at this [topic](https://help.nextcloud.com/t/nextcloud-server-listener/25109)
