跳转到内容

团队

查询或修改团队

查询团队

GET /teams
Terminal window
curl --request GET \
--url https://api.yundict.com/teams \
--header "X-Api-Token: {token}" \
{
"data": [
{
"name": "My Team"
}
]
}

创建团队

POST /teams

必选参数

  • Name
    name
    Type
    string
    Description
    团队标识
  • Name
    displayName
    Type
    string
    Description
    团队名称
Terminal window
curl --request POST \
--url https://api.yundict.com/teams \
--header "X-Api-Token: {token}" \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-team"
"displayName": "My Team"
}
'
{
"success": true
}

更新团队

PATCH /teams/{teamName}

路径参数

  • Name
    teamName
    Type
    string
    Description

    团队标识,在团队设置页中可以查看

可选参数

  • Name
    teamName
    Type
    string
    Description

    团队标识,将团队标识更新为新的值

  • Name
    displayName
    Type
    string
    Description

    团队名称

Terminal window
curl --request PATCH \
--url https://api.yundict.com/teams/{teamName} \
--header "X-Api-Token: {token}" \
--header 'Content-Type: application/json' \
--data '
{
"name": "my-team"
"displayName": "My Team"
}
'
{
"success": true
}

删除团队

DELETE /teams/{teamName}

路径参数

  • Name
    teamName
    Type
    string
    Description

    团队唯一标识符

Terminal window
curl --request DELETE \
--url https://api.yundict.com/teams/{teamName} \
--header 'X-Api-Token: {token}'
{
"success": true
}