ユーザーを作成する
新しいユーザーアカウントを作成します。
POST https://petstore3.swagger.io/api/v3/user
例
- API Key
- OAuth 2.0
cURL
POST "https://petstore3.swagger.io/api/v3/user" \
-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" \
-H "accept: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"id": 0,
"username": "文字列",
"firstName": "文字列",
"lastName": "文字列",
"email": "文字列",
"password": "文字列",
"phone": "文字列",
"userStatus": 0
}'
レスポンス
| コード | 説明 |
|---|---|
| 200 | 操作成功 |
| default | 操作成功 |
レスポンス例
200: 操作成功
Response
{
"id": 10,
"username": "theUser",
"firstName": "John",
"lastName": "James",
"email": "john@email.com",
"password": "12345",
"phone": "12345",
"userStatus": 1
}
パラメータ
リクエスト本文
| 名前 | タイプ | 説明 |
|---|---|---|
body | User オブジェクト | 必須。 作成する User オブジェクト。 |