| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717 |
- openapi: 3.0.3
- info:
- title: User Management API
- description: API that provides management functionality for Retro AIM Server operators.
- version: 1.0.0
- paths:
- /user:
- get:
- summary: Get all users
- description: Retrieve a list of all user accounts.
- responses:
- '200':
- description: Successful response containing a list of users.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- description: User's unique identifier.
- screen_name:
- type: string
- description: User's AIM screen name or ICQ UIN.
- is_icq:
- type: boolean
- description: If true, indicates an ICQ user instead of an AIM user.
- suspended_status:
- type: string
- description: User's suspended status
- post:
- summary: Create a new user
- description: Create a new AIM or ICQ user account.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - screen_name
- - password
- properties:
- screen_name:
- type: string
- description: The user's AIM screen name or ICQ UIN.
- 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 or ICQ UIN already exists.
- delete:
- summary: Delete a user
- description: Delete a user account 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 to delete.
- responses:
- '204':
- description: User deleted successfully.
- '404':
- description: User not found.
- /user/{screenname}/account:
- get:
- summary: Get account details for a specific screen name.
- description: Retrieve account details for a specific screen name.
- parameters:
- - in: path
- name: screenname
- schema:
- type: string
- description: User's AIM screen name or ICQ UIN.
- required: true
- responses:
- '200':
- description: Successful response containing account details
- content:
- application/json:
- schema:
- type: object
- properties:
- id:
- type: string
- description: User's unique identifier.
- screen_name:
- type: string
- description: User's AIM screen name or ICQ UIN.
- profile:
- type: string
- description: User's AIM profile HTML.
- email_address:
- type: string
- description: User's email address
- confirmed:
- type: boolean
- description: User's account confirmation status
- is_icq:
- type: boolean
- description: If true, indicates an ICQ user instead of an AIM user.
- suspended_status:
- type: string
- description: User's suspended status
- '404':
- description: User not found.
- patch:
- summary: Update a user account
- description: Update attributes for a user account
- parameters:
- - in: path
- name: screenname
- schema:
- type: string
- description: User's AIM screen name or ICQ UIN.
- required: true
- responses:
- '204':
- description: Successfully updated user account
- '304':
- description: Did not modify user account
- '400':
- description: Bad request when modifying user account
- '404':
- description: User not found
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- suspended_status:
- type: string
- nullable: true
- enum: [deleted, expired, suspended, suspended_age]
- description: The suspended status of the account
- /user/{screenname}/icon:
- get:
- summary: Get AIM buddy icon for a screen name
- description: Retrieve account buddy icon for a specific screen name.
- parameters:
- - in: path
- name: screenname
- schema:
- type: string
- description: User's AIM screen name or ICQ UIN.
- required: true
- responses:
- '200':
- description: Successful response containing buddy icon bytes
- content:
- image/gif:
- schema:
- type: string
- format: binary
- image/jpeg:
- schema:
- type: string
- format: binary
- image/png:
- schema:
- type: string
- format: binary
- application/octet-stream:
- schema:
- type: string
- format: binary
- '404':
- description: User not found, or user has no buddy icon
- /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:
- id:
- type: string
- description: User's unique identifier.
- screen_name:
- type: string
- description: User's AIM screen name or ICQ UIN.
- online_seconds:
- type: number
- description: Number of seconds this user session has been online.
- away_message:
- type: string
- description: User's AIM away message HTML. Empty if the user is not away.
- idle_seconds:
- type: number
- description: Number of seconds this user session has been idle. 0 if not idle.
- is_icq:
- type: boolean
- description: If true, indicates an ICQ user instead of an AIM user.
- remote_addr:
- type: string
- description: Remote IP address of the user's connection to BOS or TOC
- remote_port:
- type: integer
- description: Remote port number of the user's connection to BOS or TOC
- /session/{screenname}:
- get:
- summary: Get active sessions for a given screen name or UIN.
- description: Retrieve a list of active sessions of a specific logged in user.
- parameters:
- - in: path
- name: screenname
- schema:
- type: string
- description: User's AIM screen name or ICQ UIN.
- required: true
- responses:
- '200':
- description: Successful response containing a list of active sessions for the given screen name
- content:
- application/json:
- schema:
- type: object
- properties:
- count:
- type: integer
- description: The number of active sessions.
- sessions:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- description: User's unique identifier.
- screen_name:
- type: string
- description: User's AIM screen name or ICQ UIN.
- online_seconds:
- type: number
- description: Number of seconds this user session has been online.
- away_message:
- type: string
- description: User's AIM away message HTML. Empty if the user is not away.
- idle_seconds:
- type: number
- description: Number of seconds this user session has been idle. 0 if not idle.
- is_icq:
- type: boolean
- description: If true, indicates an ICQ user instead of an AIM user.
- remote_addr:
- type: string
- description: Remote IP address of the user's connection to BOS or TOC
- remote_port:
- type: integer
- description: Remote port number of the user's connection to BOS or TOC
- '404':
- description: User not found.
- delete:
- summary: Delete active sessions for a given screen name or UIN.
- description: Disconnect any active sessions of a specific logged in user.
- parameters:
- - in: path
- name: screenname
- schema:
- type: string
- description: User's AIM screen name or ICQ UIN.
- required: true
- responses:
- '204':
- description: Session deleted successfully
- '404':
- description: Session not found
- /user/password:
- put:
- summary: Set a user's password
- description: Update the password for a user specified by their screen name or ICQ UIN.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - screen_name
- - password
- properties:
- screen_name:
- type: string
- description: The AIM screen name or ICQ UIN 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.
- /chat/room/public:
- get:
- summary: List all public AIM chat rooms
- description: Retrieve a list of all public AIM chat rooms in exchange 5.
- responses:
- '200':
- description: Successful response containing a list of chat rooms.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- description: Name of the chat room.
- create_time:
- type: string
- format: date-time
- description: The timestamp when the chat room was created.
- participants:
- type: array
- description: List of participants in the chat room.
- items:
- type: object
- properties:
- id:
- type: string
- description: User's unique identifier.
- screen_name:
- type: string
- description: User's AIM screen name.
- post:
- summary: Create a new public chat room
- description: Create a new public chat room in exchange 5.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- description: Name of the chat room.
- responses:
- '201':
- description: Chat room created successfully.
- '400':
- description: Bad request. Invalid input data.
- '409':
- description: Chat room already exists.
- /chat/room/private:
- get:
- summary: List all private AIM chat rooms
- description: Retrieve a list of all private AIM chat rooms in exchange 4.
- responses:
- '200':
- description: Successful response containing a list of chat rooms.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- description: Name of the chat room.
- create_time:
- type: string
- format: date-time
- description: The timestamp when the chat room was created.
- creator_id:
- type: string
- description: The chat room creator user ID.
- participants:
- type: array
- description: List of participants in the chat room.
- items:
- type: object
- properties:
- id:
- type: string
- description: User's unique identifier.
- screen_name:
- type: string
- description: User's AIM screen name.
- /instant-message:
- post:
- summary: Send an instant message
- description: Send an instant message from one user to another. No error is raised if the recipient does not exist or the user is offline. The sender screen name does not need to exist.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- from:
- type: string
- description: The AIM screen name or ICQ UIN of the sender.
- to:
- type: string
- description: The AIM screen name or ICQ UIN of the recipient.
- text:
- type: string
- description: The text content of the message.
- responses:
- '200':
- description: Message sent successfully.
- '400':
- description: Bad request. Invalid input data.
- /version:
- get:
- summary: Get build information of RAS.
- description: Retrieve the build version, git commit, and build date of the running RAS binary.
- responses:
- '200':
- description: Successful response containing the build information.
- content:
- application/json:
- schema:
- type: object
- properties:
- version:
- type: string
- description: The release version number.
- commit:
- type: string
- description: The latest git commit hash in this build.
- date:
- type: string
- description: The build date and timestamp in RFC3339 format.
- /directory/category:
- get:
- summary: Get all keyword categories
- description: Retrieve a list of all keyword categories.
- responses:
- '200':
- description: Successful response containing a list of keyword categories.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- id:
- type: integer
- description: The unique identifier of the keyword category.
- name:
- type: string
- description: The name of the keyword category.
- post:
- summary: Create a new keyword category
- description: Create a new keyword category.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - name
- properties:
- name:
- type: string
- description: The name of the keyword category.
- responses:
- '201':
- description: Keyword category created successfully.
- content:
- application/json:
- schema:
- type: object
- properties:
- id:
- type: integer
- description: The ID keyword category.
- name:
- type: string
- description: The name of the keyword category.
- '400':
- description: Malformed input body.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '409':
- description: A category with the specified name already exists.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- /directory/category/{id}:
- delete:
- summary: Delete a keyword category
- description: Delete a keyword category specified by its ID.
- parameters:
- - name: id
- in: path
- description: The ID of the keyword category.
- required: true
- schema:
- type: integer
- responses:
- '204':
- description: Keyword category deleted successfully.
- '400':
- description: Invalid category ID.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '404':
- description: Keyword category not found.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '409':
- description: The keyword category is currently in use and cannot be deleted.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- /directory/category/{id}/keyword:
- get:
- summary: Get all keywords in a category
- description: Retrieve a list of all keywords in the specified category.
- parameters:
- - name: id
- in: path
- description: The ID of the keyword category.
- required: true
- schema:
- type: integer
- responses:
- '200':
- description: Successful response containing a list of keywords.
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- properties:
- id:
- type: integer
- description: The unique identifier of the keyword.
- name:
- type: string
- description: The name of the keyword.
- '400':
- description: Invalid category ID.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '404':
- description: Keyword category not found.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- /directory/keyword:
- post:
- summary: Create a new keyword.
- description: Create a new keyword in a category.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required:
- - category_id
- - name
- properties:
- category_id:
- type: integer
- description: The ID of the parent keyword category.
- name:
- type: string
- description: The name of the keyword.
- responses:
- '201':
- description: Keyword created successfully.
- content:
- application/json:
- schema:
- type: object
- properties:
- id:
- type: integer
- description: The keyword ID.
- name:
- type: string
- description: The name of the keyword.
- '400':
- description: Malformed input body.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '404':
- description: Parent keyword category not found.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '409':
- description: A keyword with the specified name already exists.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- /directory/keyword/{id}:
- delete:
- summary: Delete a keyword
- description: Delete a keyword specified by its ID.
- parameters:
- - name: id
- in: path
- description: The ID of the keyword.
- required: true
- schema:
- type: integer
- responses:
- '204':
- description: Keyword deleted successfully.
- '404':
- description: Keyword not found.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
- '409':
- description: Conflict. The keyword is currently in use and cannot be deleted.
- content:
- application/json:
- schema:
- type: object
- properties:
- message:
- type: string
|