Why am I getting a REST error "Unknown resource v1/user"?

Tags: #<Tag:0x00007f79130ad870>

When I run the web service http://localhost:8080/openmrs/ws/rest/v1/user, I am facing the following error…

org.openmrs.api.APIException: Unknown resource: v1/user at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.getResourceByName(RestServiceImpl.java:391) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

Please report what version of the webservices.rest module and OpenMRS platform you used.

Is it the only resource that does not work? How about http://localhost:8080/openmrs/ws/rest/v1/session?

Hi Raff,

I had installed V 2.9.39bd19 of Webservices rest module and OpenMRS 1.9.0. when I run the URL stated by you it response with session ID. Still I am facing the same issue as mentioned previously. Looking forward for the support

Can you compile and use the latest snapshot version of the rest webservices module? GitHub - openmrs/openmrs-module-webservices.rest: Provides RESTful web services for OpenMRS

Hello @dkayiwa I have downloaded all the latest snapshot version of all modules and OpenMRS 2.5.0, I do get login page, and after giving credentials as I do login, I am getting UI Framework ErrorRoot Errororg.openmrs.module.webservices.rest.web.response - Pastebin.com . I have seen your response for this topics and I would like to let you know already that I have 2.30.0 of webservices.rest module. Looking forward to hear from you.

Thank you

If you compiled the latest snapshot version of the rest webservices module, the version should be 2.30.0-SNAPSHOT

Hi @dkayiwa I already had the latest snapshot version of rest webservices module, that is webservices.rest-2.30.0-SNAPSHOT, but still I am getting the same issue.

Go to the admin screen, system information, and the copy and paste the list of modules and their versions.