openMRS API to create a patient

Hi ! 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, in particular this one:

echo '{




"location":"Unknown Location"},






}’ | curl -i -u admin:Admin123 -H “Content-type: application/json” -X POST -d @-

However I always get 404 not found. Is this the expected behaviour?

the demo server is down right now. try using

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 :slightly_smiling_face:

Thank you both for the prompt reply! I will follow your advice, thank you again.

EDIT: I just tried out your page where I was able to generate a very simple command (copy pasted from there): curl -X GET “” -H “accept: application/json”

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 helpful and, if not, you can help us improve it. :slight_smile:

@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?

1 Like

:smile: exactly. :100: