Thanks Vishwas for that observation. Unfortunately, it still doesn't work.
I have tried with this url

https://localhost:8443/fineract-provider/api/v1/heathCheck?tenantIdentifier=default

Since that's the one I actually coded accidentally and it still returns
404. The parameter tenantIdentifier is only present because I just copied
that link from other resources and changed the resource to heathCheck. But
my implementation does not actually expect a parameter. When I delete the
parameter from the string and make a request with
https://localhost:8443/fineract-provider/api/v1/heathCheck, I now get a 400
error complaining of the missing parameter.

Is there a guide that documents the steps needed to add a new resource?

Let outline again the steps I took, maybe my code changes are not even
reflected in the deployment.

1) I added a class HealthCheckResource as already explained above.
2) Build application with ./gradlew build
3) Run application with ./gradlew tomcatRunWar

Let me know if I'm doing something wrong.

Thanks,
Larry

On Wed, Mar 13, 2019 at 3:43 PM Vishwas Babu <
[email protected]> wrote:

> Larry,
>
> There is a typo in the path parameter of your resource class, i.e
> heathCheck instead
> of healthCheck
>
> Regards,
> Vishwas
>
>
> On Wed, Mar 13, 2019 at 5:08 AM ivange larry <[email protected]>
> wrote:
>
> > Hi all,
> >
> > I'm trying to add a new endpoint /healthCheck which will always respond
> > with 200 to confirm that the server is reachable. I have implemented a
> > HealthCheckResource.java in org.apache.fineract.system.api. I created the
> > package system.api. Here's my resource class
> >
> > https://gist.github.com/ivange94/3b67a80c6d9f90adeceddf052c6026d5
> >
> > I keep getting a 404 when I try to access the endpoint at
> >
> >
> https://localhost:8443/fineract-provider/api/v1/healthCheck?tenantIdentifier=default
> > .
> >
> > Is there anything I'm missing?
> >
> > Thanks,
> > Larry
> >
>


-- 
GSoC 2016 @OpenMRS
GSoC 2017 @LibreHealth
GCI 2016 Mentor @OpenMRS
GCI Org Admin @OpenMRS

Reply via email to