# How can we implement or update server-side code locally for testing?

**URL:** <https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314>\
**Category:** 💻 Development\
**Tags:** app\_api, code, serverinfo, api\
**Created:** [September 1, 2025, 7:27am UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314 "2025-09-01T07:27:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hardik\_Patel](https://help.nextcloud.com/letter_avatar/hardik_patel/32/6_22734026db12803ebb3e059622ac3534.png) [@Hardik\_Patel](https://help.nextcloud.com/u/Hardik_Patel)\
**Post date:** [September 1, 2025, 7:27am UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314/1 "2025-09-01T07:27:48Z")

</div>

I’m working on the Custom Properties app and need to test some APIs. However, I’m not able to test them directly from my code. I believe this might need to be done from the server side. Can anyone guide me on how to set this up or test it properly?

---

<div class="post-metadata">

**Author:** ![christianlupus](https://help.nextcloud.com/user_avatar/help.nextcloud.com/christianlupus/32/22699_2.png) [@christianlupus](https://help.nextcloud.com/u/christianlupus)\
**Post date:** [September 1, 2025, 11:41am UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314/2 "2025-09-01T11:41:10Z")

</div>

Hello @Hardik_Patel,

what is it that you want to do exactly?

If you want to _test_ something, you mean to manually debug stuff or use automatic testing? If automatic, E2E or just backend? Why would that need to be _done from the sever side_?

I will try to help you but unfortunately, I am not clear what I can help you and what you have in mind.

Chris

---

<div class="post-metadata">

**Author:** ![Hardik\_Patel](https://help.nextcloud.com/letter_avatar/hardik_patel/32/6_22734026db12803ebb3e059622ac3534.png) [@Hardik\_Patel](https://help.nextcloud.com/u/Hardik_Patel)\
**Post date:** [September 1, 2025, 12:34pm UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314/3 "2025-09-01T12:34:08Z")

</div>

Hello @christianlupus,

I want to update the API that is used to modify properties in Nextcloud. I tried making the changes directly in the code but was not successful. Based on my research, it seems this can be done from the server side. That’s why I would like to understand how I can update the code properly and test my requirements. I hope this clarifies my point.

---

<div class="post-metadata">

**Author:** ![christianlupus](https://help.nextcloud.com/user_avatar/help.nextcloud.com/christianlupus/32/22699_2.png) [@christianlupus](https://help.nextcloud.com/u/christianlupus)\
**Post date:** [September 1, 2025, 12:46pm UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314/4 "2025-09-01T12:46:03Z")

</div>

I remember your [other post](https://help.nextcloud.com/t/unable-to-locate-or-modify-backend-apis-for-the-custom-properties-app/230969) as well, so I supected this is some sort of follows-up.

Now we are no longer in the testing but the development and analysis phase. So, sorry, it did not clean the isses (at least for me) completely.

What API are we talking about? Can you give a link/example/documentation/… of the API you have in mind?

---

<div class="post-metadata">

**Author:** ![Hardik\_Patel](https://help.nextcloud.com/letter_avatar/hardik_patel/32/6_22734026db12803ebb3e059622ac3534.png) [@Hardik\_Patel](https://help.nextcloud.com/u/Hardik_Patel)\
**Post date:** [September 2, 2025, 1:55pm UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314/5 "2025-09-02T13:55:40Z")

</div>

I’m working with an app that creates custom properties with the same name, and it works fine in general. However, the main issue arises when a file is copied to another location the custom property values are not carried over to the destination.

From my research, I found that the file copy process uses WebDAV. Now, I want to trigger my function (which stores the custom properties into an array or object in the code) either once the copy process is complete or during the copy itself.

Does you or anyone have an idea of how this can be achieved, or how I can hook into the WebDAV copy process?

---

<div class="post-metadata">

**Author:** ![christianlupus](https://help.nextcloud.com/user_avatar/help.nextcloud.com/christianlupus/32/22699_2.png) [@christianlupus](https://help.nextcloud.com/u/christianlupus)\
**Post date:** [September 2, 2025, 3:25pm UTC](https://help.nextcloud.com/t/how-can-we-implement-or-update-server-side-code-locally-for-testing/231314/6 "2025-09-02T15:25:47Z")

</div>

> [@Hardik\_Patel](#):
>
> copy process uses WebDAV

The interaction of the server with the web frontend and the sync client is WebDAV, that is true. I have no clue, if the WebDAV supports the properties or if they should be copied over by specification.

> [@Hardik\_Patel](#):
>
> Now, I want to trigger my function (which stores the custom properties into an array or object in the code) either once the copy process is complete or during the copy itself.

Now, this is much more precise in what you might be able to achieve.

There is the [`OCP\Files\Events\Node\NodeCopiedEvent`](https://docs.nextcloud.com/server/latest/developer_manual/basics/events.html#ocp-files-events-node-nodecopiedevent) that might allow you to react on copying of files and folders. You will have to register a listener (a function/class method or yours) that is invoked upon copying of a node. Then, you can copy the parameters over as you see fit.

Does this solve your issue?
