删除用户
删除用户账户。
DELETE https://petstore3.swagger.io/api/v3/user/{username}
示例
- API Key
- OAuth 2.0
cURL
curl -X DELETE "https://petstore3.swagger.io/api/v3/user/user1" \
-H "api_key: <YOUR_API_KEY>"
cURL
curl -X DELETE "https://petstore3.swagger.io/api/v3/user/user1" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>"
响应
| 状态码 | 描述 |
|---|---|
| 200 | 用户已删除 |
| 400 | 提供的用户名无效 |
| 404 | 未找到该用户 |
| default | 意外错误 |
响应正文
删除成功时,服务器返回 200 状态码,且不返回响应正文。
参数
路径参数
| 参数名 | 类型 | 描述 |
|---|---|---|
username | 字符串 | 要删除的用户的用户名 |