[Solved] Custom new api

hi all,
May i create new api and access the DB (item, channel etc) ?
About the api doc, it has not indicate.

Thanks for help

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.

thanks reply,
i am sorry, i have not provide more info.
i learn a few days the openHAB on the raspberry pi platform.
Just curious, when i look the api doc, i whether can create new api because i have no find the way in api doc or google search.

To do what? Everything that can be done in OH is already exposed through it’s current API. Perhaps we just need to help you figure out how to do what you are after without needing to modify OH to add some new and likely redundant API endpoint.