- 入门指南
- 身份验证
- 作用域和权限
- 平台管理 API
删除用户
用于在私有 Test Cloud 中删除用户的 API 参考,包括端点、请求字段和响应。
Deletes multiple users from an organization, based on the users IDs. Supports both local and directory users.
This endpoint deletes both local and directory users; deleting a directory user also frees the license allocated to that user. For a local user that is linked to a directory account, the first delete request removes the local account but keeps the directory link: the user becomes a directory user and keeps its group memberships. A second delete request deletes the user. Use the category field returned by Get users to tell the two cases apart.
API 端点
DELETE https://{yourDomain}/{organizationName}/identity_/api/User
作用域
需要以下作用域:
- PM.User
- PM.User.Write
请求标头
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
To obtain the {access_token}, make sure to authenticate through one of the methods described here.
路径参数
| 路径参数 | 数据类型 | 描述 |
|---|---|---|
partitionGlobalId (必填) | 字符串 | 要检索其机器人帐户的组织 ID。 |
请求正文
请求正文包含要从组织中批量删除的用户 ID 列表。
{
"partitionGlobalId": "string",
"userIds": [
"string"
]
}
{
"partitionGlobalId": "string",
"userIds": [
"string"
]
}
响应
204 Success
系统会从组织中删除指定的机器人帐户。
请求示例
假设您收集了构建 API 调用所需的所有信息。
- Your
{baseURL}is: https://{yourDomain}/{organizationName}/identity_ - 您的
{access_token}为:1234(出于长度考虑)。 {partitionGlobalId}为:3fa85f64-5717-4562-b3fc-2c963f66afa6- 要删除的用户具有以下 ID:
- Dolores Umbridge:
dol-2908 - Quirinus Quirrell:
qui-2609
- Dolores Umbridge:
调用应类似于以下示例 (cURL):
curl --location --request DELETE 'https://{yourDomain}/{organizationName}/identity_/api/User' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
"partitionGlobalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"userIds": [
"dol-2908", "qui-2609"
]
}'
curl --location --request DELETE 'https://{yourDomain}/{organizationName}/identity_/api/User' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
"partitionGlobalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"userIds": [
"dol-2908", "qui-2609"
]
}'