You’ll need to provide a lot more detail to even begin to answer this question. First of all, everything in the JSONDB as well as the persistence DB is already available through the existing REST API. So it’s not clear what you think isn’t available that you want to access.
Ultimately, openHAB is an open source program. You can fork it and make any changes you want to it. If it’s useful we’d likely welcome a PR to submit your changes back so it can be merged with the baseline. But there is no way to create your own API through mere configuration. You’ll have to make changes to the openHAB itself.
Note though, even that previous paragraph is making a ton of assumptions because you’ve provided no details about what you are really trying to accomplish.