跳到主要内容

创建用户列表

使用一个请求创建用户列表。

POST https://petstore3.swagger.io/api/v3/user/createWithList

示例​

cURL
curl -X 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": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"password": "string",
"phone": "string",
"userStatus": 0
}
]

响应​

状态码描述
200操作成功
default意外错误

响应示例​

200: Successful operation

响应
{
"id": 1,
"username": "user1",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"phone": "12345",
"userStatus": 1
}

参数​

请求正文​

参数名类型描述
bodyUser 对象数组必填。 要创建的 User 对象列表。