Hey @touhidur,
I am helping developing a plugin for OJS 3.5.x and have the same need for a custom API endpoint with sub-endpoints. So in short we would like to have something like api/v1/ourPlugin/someSubRoute/. As far as I understand it here, a very own custom API endpoint like this is not possible to achieve in the current version of OJS 3.5.x. Only something like e.g. api/v1/users/ourPlugin/someSubRoute/ or api/v1/submission/ourPlugin/someSubRoute/.
Before I got to know that this works, I developed a workaround to have our very own API route with a LoadHandler that displays different JSON data on a page, based on what route it was called on. Therefore we are able to have our own API routes like e.g. .../index.php/ourPlugin-api/someSubRoute/. The problem with this workaround is that while it works, we are unsure if we are allowed to use it as it e.g. doesn’t restrict access to specific API routes to specific Roles.
Now for our question. We understand, that having an own API endpoint is not really possible in OJS 3.5.x but we would prefer it over having something like users/ourRoute or submission/ourRoute. We however don’t want to have our plugin criticised in later stages of development for using our own custom API workaround. That’s why we want to decide on which approach we use as soon as possible, as we are still in the early stages of development. Therefore I would like to know if it is good to continue with our own workaround for our own API endpoint or if we should switch to the way it is described in this forum topic and thus use something like users/ourRoute or submission/ourRoute?