跳到主要内容

团队

方法与权限​

APIGETPOSTPUTPATCHDELETE
团队列表管理员管理员---
团队详情管理员--管理员管理员

获取团队列表​

端点: /organizations/team/list/{level}/{sid}/{serializer}/

参数: level (路径, 字符串)​

organization

参数: sid (路径, 字符串)​

organization sid

参数: serializer (路径, 字符串)​

参数: token (头部, 字符串)​

响应: 200​

# serializer = name
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 1,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "xxx"
}
]
}

# serializer = list
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 1,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "xxx",
"description": "Admin group to manage the Labii account.",
"is_archived": false,
"change_permission": true
}
]
}

# serializer = detail
{
"page_size": 10,
"page_number": 1,
"page_count": 1,
"count": 1,
"next": null,
"previous": null,
"add_permission": true,
"results": [
{
"sid": "xxx",
"name": "xxx",
"description": "Admin group to manage the Labii account.",
"members": [
{
"sid": "xxx",
"name": "xxx"
},
],
"is_archived": false,
"change_permission": true
}
]
}

创建团队列表​

端点: /organizations/team/list/{level}/{sid}/{serializer}/

参数: level (路径, 字符串)​

organization

参数: sid (路径, 字符串)​

organization sid

参数: serializer (路径, 字符串)​

参数: token (头部, 字符串)​

参数: name (正文, 字符串)​

参数: description (正文, 字符串)​

参数: is_archived (正文, 字符串)​

参数: members (正文, 数组)​

组织人员 sid 数组

响应: 201​

{
"sid": "xxx",
"name": "xxx",
"description": "Admin group to manage the Labii account.",
"members": [
{
"sid": "xxx",
"name": "xxx"
},
],
"is_archived": false,
"change_permission": true
}

获取团队详情​

端点: /organizations/team/detail/{sid}/

参数: sid (路径, 字符串)​

参数: token (头部, 字符串)​

响应: 200​

{
"sid": "xxx",
"name": "xxx",
"description": "Admin group to manage the Labii account.",
"members": [
{
"sid": "xxx",
"name": "xxx"
},
],
"is_archived": false,
"change_permission": true
}

修补团队详情​

端点: /organizations/team/detail/{sid}/

参数: sid (路径, 字符串)​

参数: token (头部, 字符串)​

参数: name (正文, 字符串)​

参数: description (正文, 字符串)​

参数: members (正文, 数组)​

参数: is_archived (正文, 布尔值)​

响应: 200​

{
"sid": "xxx",
"name": "xxx",
"description": "Admin group to manage the Labii account.",
"members": [
{
"sid": "xxx",
"name": "xxx"
},
],
"is_archived": false,
"change_permission": true
}

删除团队详情​

端点: /organizations/team/detail/{sid}/

参数: sid (路径, 字符串)​

参数: token (头部, 字符串)​

响应: 204​

{}