Resource does not exist. Please check documentation for implemented resources and their paths [Unknown resource: v1/patient-migration]

I have added the controller https://pastebin.com/7iLPQMJF

and while testing using postman I am getting following error https://pastebin.com/AWwJfsHW

But the tests written to check the functionality works in my controller test class. https://pastebin.com/ETJenVeS

Any help is Appreciated. Thanks All

Did you take a look at this? https://wiki.openmrs.org/display/docs/Adding+a+Web+Service+Step+by+Step+Guide+for+Module+Developers

Yes, I have followed and it. I have no Idea about the error Same code I have build a new server and deployed on it then it worked latter stopped the server and running it again fails.

But it works on one of my server perfectly well.

Try reinstall the module using the exact same omod on both servers and try again.

@vankineenitawrun , you are using the old rest Framework API to create resources it has alot of limitations , we already have new Rest Framework API which has alot of features

take a look at Migration from REST 1.x to 2.x - Documentation - OpenMRS Wiki

1 Like

@mozzy I don’t use any model for my rest services, so i don’t think i need any resources.

I want to create an end point to migrate List of patients to a Location. so its of changing personLocationAttributeType value.

can you please help how to design it.? currently only having a controller in org/openmrs/moduleid/web/controller.

Hi @vankineenitawrun , you mean designing a model ??

not the model but about the controller and resource ?

I cant really figure whether I need a model for changing configurations.

I want to create an end point to migrate List of patients to a Location. so its of changing personLocationAttributeType value.

purpose of the rest service. I am trying to add it in my module.

True you dont need a resource. A controller should be ok with. You seem to have already written a controller above , you still have issues with getting it to work ?? I think we can focus on debugging what you have written to get it work

Hey can you mention what part in the code has to changed .?

I am running mvn clean install openmrs-sdk:run from my root directory of my project. and latter I choose my server. So its the same omod on both server I guess.