users
users API, 엔드포인트 6개 (자동 생성)
현재 사용자 프로필(/users/me): 조회 및 본인 정보 수정.
GET /users/me
GET/users/me
Users:Current User
인증된 사용자 본인의 프로필(id, email, 이름, 연락처, 상태 플래그)을 반환합니다. 활성 세션이 필요합니다.
응답
| 상태 | 설명 |
|---|---|
| 200 | Successful Response (UserRead) |
| 401 | Missing token or inactive user. |
PATCH /users/me
PATCH/users/me
본인 프로필 수정
인증된 사용자 본인의 이름과 연락처를 수정합니다.
요청 본문: application/json, ProfileUpdate
| 필드 | 형식 | 필수 | 설명 |
|---|---|---|---|
full_name | string? | Full Name | |
phone | string? | Phone |
응답
| 상태 | 설명 |
|---|---|
| 200 | Successful Response (UserRead) |
| 422 | Validation Error (HTTPValidationError) |
POST /users/me/password
POST/users/me/password
본인 비밀번호 변경
현재 비밀번호를 확인한 뒤 새 비밀번호로 교체합니다.
요청 본문: application/json, PasswordChange
| 필드 | 형식 | 필수 | 설명 |
|---|---|---|---|
current_password | string | ✓ | Current Password |
new_password | string | ✓ | New Password |
응답
| 상태 | 설명 |
|---|---|
| 204 | Successful Response |
| 422 | Validation Error (HTTPValidationError) |
GET /users/{id}
GET/users/{id}
Users:User
id로 임의 사용자의 프로필을 조회합니다. 전역 관리자 전용.
파라미터
| 이름 | 위치 | 형식 | 필수 | 설명 |
|---|---|---|---|---|
id | path | string | ✓ |
응답
| 상태 | 설명 |
|---|---|
| 200 | Successful Response (UserRead) |
| 401 | Missing token or inactive user. |
| 403 | Not a superuser. |
| 404 | The user does not exist. |
| 422 | Validation Error (HTTPValidationError) |
PATCH /users/{id}
PATCH/users/{id}
Users:Patch User
id로 임의 사용자의 프로필과 플래그를 수정합니다. 전역 관리자 전용.
파라미터
| 이름 | 위치 | 형식 | 필수 | 설명 |
|---|---|---|---|---|
id | path | string | ✓ |
요청 본문: application/json, UserUpdate
| 필드 | 형식 | 필수 | 설명 |
|---|---|---|---|
password | string? | Password | |
email | string (email)? | ||
is_active | boolean? | Is Active | |
is_superuser | boolean? | Is Superuser | |
is_verified | boolean? | Is Verified | |
full_name | string? | Full Name | |
phone | string? | Phone |
응답
| 상태 | 설명 |
|---|---|
| 200 | Successful Response (UserRead) |
| 400 | Bad Request (ErrorModel) |
| 401 | Missing token or inactive user. |
| 403 | Not a superuser. |
| 404 | The user does not exist. |
| 422 | Validation Error (HTTPValidationError) |
DELETE /users/{id}
DELETE/users/{id}
Users:Delete User
id로 사용자를 영구 삭제합니다. 전역 관리자 전용.
파라미터
| 이름 | 위치 | 형식 | 필수 | 설명 |
|---|---|---|---|---|
id | path | string | ✓ |
응답
| 상태 | 설명 |
|---|---|
| 204 | Successful Response |
| 401 | Missing token or inactive user. |
| 403 | Not a superuser. |
| 404 | The user does not exist. |
| 422 | Validation Error (HTTPValidationError) |