- Index
- Consts
- Get All TeamMembers By TeamID
- Get Team User By TeamID userID
- Change TeamMembers Role
- Config Invite Link
- Change TeamMembers Permission
- Remove TeamMembers
- USER_ROLE_OWNER = 1
- USER_ROLE_ADMIN = 2
- USER_ROLE_EDITOR = 3
- USER_ROLE_VIEWER = 4
- STATUS_OK = 1
- STATUS_PENDING = 2
Gets information about all members of the user team. The return structure couples the user table and the team_members table's user-related displayable fields. This includes the user's role in the team (userRole) and invited status (userStatus).
GET /api/v1/teams/:teamID/members
none
[
{
"userID": "1",
"nickname": "your_nickname",
"email": "[email protected]",
"avatar": "https://cdn.illacloud.com/team/1/user/12/avatar.png",
"userRole": 1, // The role of the user in the team
"userStatus": 1, // The status of the user in the team
"permission": { // Reserved field for the user's permission in this team.
"reserved": ""
},
"createdAt": "ISO-8601 timestamp",
"updatedAt": "ISO-8601 timestamp",
},
{
"userID": "2",
"nickname": "your_nickname",
"email": "[email protected]",
"avatar": "https://cdn.illacloud.com/team/1/user/12/avatar.png",
"userRole": 2,
"userStatus": 2,
"permission": {
"reserved": ""
},
"createdAt": "ISO-8601 timestamp",
"updatedAt": "ISO-8601 timestamp",
},
...
]
The user gets information about the user's permissions in the team. The return structure couples the user-related displayable fields of the user and team_members tables.
GET /api/v1/teams/:teamID/users/:targetUserID
none
[
{
"userID": "1",
"uid": "uuidxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"nickname": "your_nickname",
"email": "[email protected]",
"avatar": "https://cdn.illacloud.com/team/1/user/12/avatar.png",
"language": "en-US",
"isSubscribed": false,
"userRole": 1,
"userStatus": 1,
"permission": {
"reserved": ""
},
"createdAt": "ISO-8601 timestamp",
"updatedAt": "ISO-8601 timestamp",
}
]
Note that if the current user is the owner, setting another user as the owner will cause you to lose your owner privileges. The client should prompt you accordingly. That is, this interface can be used as a transfer owner. Of course, this interface has attribute detection, so you can't override the role.
PATCH /api/v1/teams/:teamID/users/:targetUserID/role
{
"userRole": 2
}
none
Configure whether team can invite users using links
PATCH /api/v1/teams/:teamID/configInviteLink
{
"inviteLinkEnabled": true
}
// HTTP 200
// or
// HTTP 400
PATCH /api/v1/teams/:teamID/users/:userID/permission
{
"permission": {
"reserved"
}
}
// HTTP 200
// or
// HTTP 400
Remove Team Members Can also be used to leave the team yourself
DELETE /api/v1/teams/:teamID/users/:userID
none
none