Get fileid from a folder


I’m new on Nextcloud and I don’t find how to get the fileid from a folder.

I want to generate an URL to direcly redirect into a specific folder with an href.

Ex : … … /apps/files/?dir=/1016617&fileid=2351

I can’t find any solutions for this, can you help / guide me to an idea ?

Thank you in advance for all answers