-
Notifications
You must be signed in to change notification settings - Fork 0
Protocol Account
zoizer edited this page Mar 10, 2018
·
13 revisions
##################################################
########## GET ALL ACCOUNTS(S) (DEV) ##########
##################################################
GET localhost:8080/api/user/
input: -
output: json [{
"id":"123", // id of account
"email":"a@b.c", // email of account
"nick":"abc", // nick of account
"password":"abc", // password of account
}, ...]
status: 200 OK
##################################################
##################################################
########## GET ACCOUNT(S)(RELEASE) V3.0 ##########
##################################################
POST localhost:8080/api/account/get/
input: json '{
"userid":"123", // userid must be valid user
"groupid":"123", // user must be in group
"id":"123", // id of account must match
"email":"a@b.c", // email of account must contain
"nick":"abc", // nick of account must contain
"count":"10" // Max amount to get
}'
output: json [{
"id":"123", // id of user
"nick":"abc" // nick of user
"email":"a@b.c" // email of user
}, ...]
status: 200 OK
##################################################
##################################################
########## LOGIN ACCOUNT (RELEASE) V3.0 ##########
##################################################
POST localhost:8080/api/account/login/
input: json '{
"email":"a@b.c", // user email
"password":"123" // user password
}'
output: json [{
"id":"123", // id of account
"nick":"abc", // nick of account
}]
status: 200 OK
##################################################
##################################################
########## PUT ACCOUNT (RELEASE) V3.1 ##########
##################################################
PUT localhost:8080/api/account/put/
input: json '{
"userid":"123", // userid of editor
"id":"123", // id of account
"email":"a@b.c", // new email of account
"nick":"abc", // new nick of account
"password":"123" // new password of account
}'
output: json '{
"id":"123", // id of account
"nick":"abc", // nick of account
}'
status: 200 OK
##################################################
##################################################
######### REGISTER ACCOUNT(RELEASE) V3.0 #########
##################################################
POST localhost:8080/api/account/register/
input: json '{
"email":"a@b.c", // email of account
"nick":"abc", // nick of account
"password":"123" // password of account
}'
output: json '{
"id":"123", // id of account
"nick":"abc", // nick of account
}'
status: 200 OK
##################################################