Skip to content

How to create a new ChRIS store user account through the ChRIS store API

Rudolph Pienaar edited this page Oct 13, 2020 · 3 revisions

Create a new ChRIS store user account

Just make an unauthenticated POST request to the /api/v1/users/ ChRIS store API end-point with the required username, password and email descriptors

For instance, using the httpie client and assuming that the ChRIS store service is running at localhost:8010:

http POST http://localhost:8010/api/v1/users/     \
     Content-Type:application/vnd.collection+json \
     Accept:application/vnd.collection+json       \
     template:='
{
    "data": [
       {"name":"email","value":"[email protected]"}, 
       {"name":"password","value":"newstoreuser1234"}, 
       {"name":"username","value":"newstoreuser"}
         ]
}
'