I am new here and i have been trying to make some API calls to test it, using curl. I am following the examples provided here https://wiki.openmrs.org/pages/viewpage.action?pageId=52625683, in particular this one:
}’ | curl -i -u admin:Admin123 -H “Content-type: application/json” -X POST -d @- https://demo.openmrs.org/openmrs/ws/rest/v1/patient
However I always get 404 not found. Is this the expected behaviour?
Check out the swagger
If you’re trying to learn first play with the get endpoint try to retrieve a patient and see the attributes then work on the post-call
Thank you both for the prompt reply!
I will follow your advice, thank you again.
I just tried out your page where I was able to generate a very simple command (copy pasted from there):
curl -X GET “https://qa-refapp.openmrs.org/openmrs/ws/rest/v1/patient” -H “accept:
However when I run it in my terminal I get a 500 - Internal error.
Is it working for you?
Hopefully you find the documentation at rest.openmrs.org helpful and, if not, you can help us improve it.
@rainbow & @ayesh, @magp is your customer. If they didn’t find your API docs easily/first, why not? If the documentation isn’t answering their questions, what’s missing?