How to create new api?

I am trying to create new api for asset but unable to figure out how to do it and what will be the url of that api? Please help.

Please clarify what you are looking for.

Do you want to fetch the data of an asset using the HTTP API?
Or are you looking for building a custom endpoint on top of the existing API?

You can always look at the Swagger documentation to view what the current HTTP API is capable of:
https://demo.openremote.app/swagger/

Yes looking for building custom endpoint on top of existing API