-
Notifications
You must be signed in to change notification settings - Fork 6
user controller
Yasemin Alpay edited this page Oct 31, 2017
·
6 revisions
Request:
POST /api/v1/users/ HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"username": "yasemin",
"password": "password1234*.!",
"email": "yase@mase.com",
"accountStatus": "ACTIVE",
"accountType": "STANDARD"
}
Restrictions:
- username is unique
- password will be stored in a secured way
- e-mail is unique and valid
- accountStatus is Enum: CREATED, ACTIVE, LOCKED, DEACTIVATED
- accountType is Enum: STANDARD, ADMIN
- unique id will be created when saving - UUID is recommended
Response:
HTTP/1.1 201 CREATED
{
"id": "4c088c96-bcb0-11e7-abc4-cec278b6b50a",
"username": "ayse",
"password": "password1234*.!",
"email": "yase@mase.com",
"accountStatus": "CREATED",
"accountType": "STANDARD"
}
Request:
GET /api/v1/users/{username}
Response:
{
"username": "yasemin",
"password": "password1234*.!",
"email": "yase@mase.com",
"accountStatus": "ACTIVE",
"accountType": "STANDARD"
}