| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- openapi: 3.0.3
- info:
- title: User Management API
- description: API to manage user accounts with screen names and passwords
- version: 1.0.0
- paths:
- /user:
- get:
- summary: Get all users
- description: Retrieve a list of all user accounts without passwords.
- responses:
- '200':
- description: Successful response containing a list of users without passwords.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- screen_name:
- type: string
- description: The user's screen name.
- post:
- summary: Create a new user
- description: Create a new user account with a screen name and password.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- screen_name:
- type: string
- description: The user's screen name.
- password:
- type: string
- description: The user's password for account creation.
- responses:
- '201':
- description: User account created successfully.
- '400':
- description: Bad request. Invalid input data.
- '409':
- description: Conflict. A user with the specified screen name already exists.
- /session:
- get:
- summary: Get active sessions
- description: Retrieve a list of active sessions of logged in users.
- responses:
- '200':
- description: Successful response containing a list of active sessions.
- content:
- application/json:
- schema:
- type: object
- properties:
- count:
- type: integer
- description: The number of active sessions.
- sessions:
- type: array
- items:
- type: object
- properties:
- screen_name:
- type: string
- description: The screen name associated with the session.
- /user/password:
- put:
- summary: Set a user's password
- description: Update the password for a user specified by their screen name.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- screen_name:
- type: string
- description: The screen name of the user whose password is to be updated.
- password:
- type: string
- description: The new password for the user.
- responses:
- '204':
- description: Password updated successfully.
- '400':
- description: Bad request. Invalid input data.
- '404':
- description: User not found.
|