How to restore version or trashed files with Nextcloud

I’m currently developing a Nextcloud app and I need to restore an old version of a file in my code. I know how to get a file or folder with the OCP public API but didn’t find any tips to restore a version ?

In the WebDav part of the documentation, they said to move the file version to the “restore folder” but there is no restore folder. Versions — Nextcloud latest Developer Manual latest documentation

But I didn’t want to use WebDAV, I want to use the OCP API.

Thanks for your help, Donovan