Get all patients endpoint

Hey All, I am working on the openmrs-owa-obsadmin module and i wish to make an API call and get all patients. without having to search or by use of any custom attributes. The /rest/v1/person & /rest/v1/patient endpoint are giving me this error

Can anyone unblock me with this?

Thanks, Cecilia

@dkayiwa what say you?

As indicated in the error message, the patient resource doesn’t allow you to fetch all patients, you need to perform a search instead with a request similar to this openmrs/ws/rest/v1/patient?q=searchPhrase

@wyclif Thanks. Also on managing a visit, can i edit the patients name? I have tried using the uuid, patient identifier and name as well and the error message i get is

You can only edit the patient’s name through the person resource and not the visit resource.

When doing what?

@wyclif I was trying to edit a visit by changing the patients name

If you are editing a visit, you should only edit fields on a visit and not those on associated objects, if you want to edit a patient’s name do it via the person resource.