{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
POST
/userCreate user.
Request Body
Request Example
curl -X POST "/user" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"id":10,"username":"theUser","firstName":"John","lastName":"James","email":"john@email.com","password":"12345","phone":"12345","userStatus":1}'
Response
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
POST
/user/createWithListCreates list of users with given input array.
Request Body
[
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
]
Request Example
curl -X POST "/user/createWithList" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '[{"id":10,"username":"theUser","firstName":"John","lastName":"James","email":"john@email.com","password":"12345","phone":"12345","userStatus":1}]'
Response
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
GET
/user/loginLogs user into the system.
Parameters
usernamestringqueryThe user name for login
passwordstringqueryThe password for login in clear text
Request Example
curl -X GET "/user/login?username=%3Cusername%3E&password=%3Cpassword%3E" \
-H "Accept: application/json"
Response
"string"
GET
/user/logoutLogs out current logged in user session.
Request Example
curl -X GET "/user/logout"
Response
GET
/user/{username}Get user by user name.
Request Example
curl -X GET "/user/{username}" \
-H "Accept: application/json"
Response
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
PUT
/user/{username}Update user resource.
Request Body
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
Request Example
curl -X PUT "/user/{username}" \
-H "Content-Type: application/json" \
-d '{"id":10,"username":"theUser","firstName":"John","lastName":"James","email":"john@email.com","password":"12345","phone":"12345","userStatus":1}'
Response
DELETE
/user/{username}Delete user resource.
Request Example
curl -X DELETE "/user/{username}"
Response
Was this page helpful?