OWA rest end point

Hi everyone, I’m trying to retrieve the details of a specific installed OWA. To retrieve the details of all installed OWAs /owa/applist has been used. I can’t seem to find any documentation on the /owa/ endpoints. Can anyone shed light on this? Thanks

CC: @dkayiwa

Did you finally figure this out?

No I did not get the end point. The workaround I plan to use is to retrieve all the owas with owa/applist and then filter it in the front end to get the details of the specific OWA I need CC: @dkayiwa

cc @reubenv

@mkiterian Can you please elaborate your issue? As far as I know, AddOns doesn’t have any rest end point that looks like owa/ . BTW you might want to check out

https://addons-stg.openmrs.org/api/v1/addon?&modulePackage=org.openmrs.module.atlas

This will give you the complete details of a module( if that’s what is needed)

Thanks @reubenv for getting back to me. When I need to access the details for an already installed module, I use the endpoint:

http://localhost:8081/openmrs-standalone/ws/rest/v1/module/[uuid]?v=ref

What is the equilvant url for an OWA?

cc: @dkayiwa

Adding in @suthagar23 :slight_smile:

Hmm, these rest apis do not look familiar at all. I get a feeling that the rest end points for two different applications are being here. Just to confirm, are you talking about OpenMRS Addons? (I am of help only if OpenMRS Addons is the application being discussed :sweat_smile:)

@reubenv, it’s not the OpenMRS Addons. It’s from the server: standalone/refapp. This is after we’ve downloaded the OWA from OpenMRS Addons and have installed it in the server. For example, to get details for all installed OWAs on the refapp the request goes to :

https://modules-refapp.openmrs.org/openmrs/ws/rest/owa/applist

What I’m looking for is one that returns details for a specific installed OWA, rather than all of them.

cc: @dkayiwa, @suthagar23

@dkayiwa I will look into this :slight_smile:

This will be handled by the REST API at the JAVA level. So we need to look at the Java Code to get more familiar information about this REST API. I think, this REST API implemented inside the OWA module. Can you please point me to the REST API Java Code?

@mkiterian can you create a ticket, and then a pull request to add that method to this class? https://github.com/openmrs/openmrs-module-owa/blob/master/omod/src/main/java/org/openmrs/module/owa/web/controller/OwaRestController.java

@dkayiwa Ok, will do.

@mkiterian

At this point, we haven’t implemented any feature to get info about one OWA. So we need to improve this REST endpoint to achieve your target.

@RequestMapping(value = "/rest/owa/applist", method = RequestMethod.GET)
		@ResponseBody
		public List<App> getAppList() {
			List<App> appList = new ArrayList<>();
	        if(Context.hasPrivilege("Manage OWA")){
	        	appManager.reloadApps();
	        	appList = appManager.getApps();
	        }
	        return appList;
		} 

I think We want to improve this method to return all the list of OWAs, or return only one OWA which was requested using some parameters. Please create a ticket on this problem to improve this feature.

@dkayiwa, under which project do I create the ticket?

Open Web Apps.