-
Notifications
You must be signed in to change notification settings - Fork 0
Protocol Group
magnlar edited this page Mar 6, 2018
·
24 revisions
##################################################
########## GET ALL GROUP(S) (DEV) ##########
##################################################
GET localhost:8080/api/group/
input: -
output: json [{
//"ownerid":"123", // id of owner - currently there can be 0 to n owners
"id":"123", // id of group
"name":"abc", // name of group
"status":"0", // Membership status, 0: owner, 1: active member, 2: invited
"time":timestamp // timestamp
}, ...]
status: 200 OK
##################################################
##################################################
########## GET GROUP(S) (RELEASE) V3.0 ##########
##################################################
GET localhost:8080/api/group/get/
input: json '{
"userid":"123", // userid must be valid user and member - 401 Not Implemented
"ownerid":"123", // ownerid of group must match completely - 401 Not Implemented
"id":"123", // id of group - 401 Not Implemented
"name":"xgroup", // name of group contains - 401 Not Implemented
"before":timestamp}, // get groups before - 401 Not Implemented
"after":timestamp}, // get groups after - 401 Not Implemented
"count":"10" // Max amount to get - 401 Not Implemented
}'
output: json [{
//"ownerid":"123", // id of owner - currently there can be 0 to n owners
"id":"123", // id of group
"name":"abc", // name of group
"status":"0", // Membership status, 0: owner, 1: active member, 2: invited
"time":timestamp // timestamp
}, ...]
status: 200 OK
##################################################
##################################################
########## PUT GROUP (RELEASE) V3.0 ##########
##################################################
PUT localhost:8080/api/group/put/
input: json '{
"userid":"123", // userid must be valid user and admin - 401 Not Implemented
"id":"123", // id of group - 401 Not Implemented
"name":"xgroup", // new name of group - 401 Not Implemented
}'
output: json '{
//"ownerid":"123", // id of owner - currently there can be 0 to n owners
"id":"123", // id of group
"name":"xgroup", // name of group
"time":timestamp // timestamp
}'
status: 200 OK
##################################################
##################################################
########## POST GROUP (RELEASE) V3.0 ##########
##################################################
POST localhost:8080/api/group/post/
input: json '{
"userid":"123", // userid must be valid user - 401 Not Implemented
"name":"xgroup", // name of group - 401 Not Implemented
}'
output: json '{
//"ownerid":"123", // id of owner - currently there can be 0 to n owners
"id":"123", // id of group
"name":"xgroup", // name of group
"time":timestamp // timestamp
}'
status: 200 OK
##################################################
##################################################
########## JOIN GROUP (RELEASE) V3.1 ##########
##################################################
POST localhost:8080/api/group/join/
input: json '{
"userid":"123", // id of user - 401 Not Implemented
"id":"123", // id of group - 401 Not Implemented
}'
output: json '{
"userid":"123", // id of user
"id":"123", // id of group
}'
status: 200 OK
##################################################
##################################################
########## LEAVE GROUP (RELEASE) V3.0 ##########
##################################################
POST localhost:8080/api/group/leave/
input: json '{
"userid":"123", // id of user who requests the membership termination - 401 Not Implemented
"leaveid":"123", // id of user - 401 Not Implemented
"id":"123", // id of group - 401 Not Implemented
}'
output: json '{
"userid":"123", // id of user
"id":"123", // id of group
}'
status: 200 OK
##################################################
##################################################
########## INVITE GROUP (RELEASE) V3.1 ##########
##################################################
POST localhost:8080/api/group/invite/
input: json '{
"userid":"123", // userid must be valid user and admin - 401 Not Implemented
"inviteid":"123", // id of invited user - 401 Not Implemented
"id":"123", // id of group - 401 Not Implemented
}'
output: json '{
"inviteid":"123", // id of invited user
"id":"123", // id of group
}'
status: 200 OK
##################################################