-
Notifications
You must be signed in to change notification settings - Fork 0
Protocol Group
magnlar edited this page Mar 4, 2018
·
24 revisions
##################################################
########## GET ALL GROUP(S) (DEV) ##########
##################################################
GET localhost:8080/api/group/
input: -
output: json [{
"ownerid":"123", // id of owner
"id":"123", // id of group
"name":"abc", // name of group
"time":timestamp // timestamp
}, ...]
status: 200 OK
##################################################
##################################################
########## GET GROUP(S) (RELEASE) V1.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
"id":"123", // id of group
"name":"abc", // name of group
"time":timestamp // timestamp
}, ...]
status: 200 OK
##################################################
##################################################
########## PUT GROUP (RELEASE) V1.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
"id":"123", // id of group
"name":"xgroup", // name of group
"time":timestamp // timestamp
}'
status: 200 OK
##################################################
##################################################
########## POST GROUP (RELEASE) V1.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
"id":"123", // id of group
"name":"xgroup", // name of group
"time":timestamp // timestamp
}'
status: 200 OK
##################################################
##################################################
########## JOIN GROUP (RELEASE) V1.0 ##########
##################################################
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 '{
"memberid":"123", // id of join request / accepted
"status":"pending" // status of request
}'
status: 200 OK
##################################################
##################################################
########## INVITE GROUP (RELEASE) V1.0 ##########
##################################################
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 '{
"memberid":"123", // id of join request / accepted
"status":"pending" // status of request
}'
status: 200 OK
##################################################