Network/user/tutorials/firstrun

= User Service = Installation
 * Follow the general web service installation procedures with the following configuration:
 * Database schema: user_service
 * JNDI Name: jdbc/usersDS

Testing the API

There are no users at first so we need to create a user. Take a note of the username and password used.

Download RESTClient and start it. Configure a request accordingly: URL: http://localhost:8080/user-service-rest/rest/users Method: POST Body Header: application/json;charset=UTF-8 (You *must* set this either in the body pane, or by setting a content-type header to application/json)

Body: { "password" : "pwd", "user" : { "userName" : "RaoulDuke", "operatorId" : "1", "userInformation" : { "billingAddress" : "Kungsgatan 1", "city" : "Stockholm", "country" : "Sweden" } } }

The service should reply with something like: { "status" : "OK", "user" : { "attributes" : null, "operatorId" : "1", "status" : "ENABLED", "userId" : "6", "userInformation" : { "billingAddress" : "Kungsgatan 1", "city" : "Stockholm", "country" : "Sweden", "id" : "11" },   "userName" : "RaoulDuke" } }

Now you can GET the user by inspecting the resource at: http://localhost:8080/user-service-rest/rest/user/id/1

That's it! You can now play around with it, I strongly recommend reading the documentation for the User Service and trying the different API methods.

Example screenshot of RestClient: