创建用户列表
根据给定的输入列表批量创建用户列表。
POST https://petstore3.swagger.io/api/v3/user/createWithList
示例
- API Key
- OAuth 2.0
cURL
POST "https://petstore3.swagger.io/api/v3/user/createWithList" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "api_key: <YOUR_API_KEY>" \
-d \
[
{
"id": 0,
"username": "字符串",
"firstName": "字符串",
"lastName": "字符串",
"email": "字符串",
"password": "字符串",
"phone": "字符串",
"userStatus": 0
}
]
cURL
POST "https://petstore3.swagger.io/api/v3/user/createWithList" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>" \
-d \
[
{
"id": 0,
"username": "字符串",
"firstName": "字符串",
"lastName": "字符串",
"email": "字符串",
"password": "字符串",
"phone": "字符串",
"userStatus": 0
}
]
响应
| 状态码 | 描述 |
|---|---|
| 200 | 操作成功 |
| default | 操作成功 |
响应示例
200: 操作成功
Response
{
"id": 0,
"username": "字符串",
"firstName": "字符串",
"lastName": "字符串",
"email": "字符串",
"password": "字符串",
"phone": "字符串",
"userStatus": 0
}
参数
请求正文
| 参数名 | 类型 | 描述 |
|---|---|---|
body | Array of User 对象s | 必填。 待创建的 User 对象列表。 |