api.yml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. openapi: 3.0.3
  2. info:
  3. title: User Management API
  4. description: API that provides management functionality for Retro AIM Server operators.
  5. version: 1.0.0
  6. paths:
  7. /user:
  8. get:
  9. summary: Get all users
  10. description: Retrieve a list of all user accounts without passwords.
  11. responses:
  12. '200':
  13. description: Successful response containing a list of users without passwords.
  14. content:
  15. application/json:
  16. schema:
  17. type: array
  18. items:
  19. type: object
  20. properties:
  21. id:
  22. type: string
  23. description: User's unique identifier.
  24. screen_name:
  25. type: string
  26. description: User's AIM screen name or ICQ UIN.
  27. is_icq:
  28. type: boolean
  29. description: If true, indicates an ICQ user instead of an AIM user.
  30. post:
  31. summary: Create a new user
  32. description: Create a new AIM or ICQ user account.
  33. requestBody:
  34. required: true
  35. content:
  36. application/json:
  37. schema:
  38. type: object
  39. required:
  40. - screen_name
  41. - password
  42. properties:
  43. screen_name:
  44. type: string
  45. description: The user's AIM screen name or ICQ UIN.
  46. password:
  47. type: string
  48. description: The user's password for account creation.
  49. responses:
  50. '201':
  51. description: User account created successfully.
  52. '400':
  53. description: Bad request. Invalid input data.
  54. '409':
  55. description: Conflict. A user with the specified screen name or ICQ UIN already exists.
  56. delete:
  57. summary: Delete a user
  58. description: Delete a user account specified by their screen name.
  59. requestBody:
  60. required: true
  61. content:
  62. application/json:
  63. schema:
  64. type: object
  65. properties:
  66. screen_name:
  67. type: string
  68. description: The screen name of the user to delete.
  69. responses:
  70. '204':
  71. description: User deleted successfully.
  72. '404':
  73. description: User not found.
  74. /session:
  75. get:
  76. summary: Get active sessions
  77. description: Retrieve a list of active sessions of logged in users.
  78. responses:
  79. '200':
  80. description: Successful response containing a list of active sessions.
  81. content:
  82. application/json:
  83. schema:
  84. type: object
  85. properties:
  86. count:
  87. type: integer
  88. description: The number of active sessions.
  89. sessions:
  90. type: array
  91. items:
  92. type: object
  93. properties:
  94. id:
  95. type: string
  96. description: User's unique identifier.
  97. screen_name:
  98. type: string
  99. description: User's AIM screen name or ICQ UIN.
  100. is_icq:
  101. type: boolean
  102. description: If true, indicates an ICQ user instead of an AIM user.
  103. /user/password:
  104. put:
  105. summary: Set a user's password
  106. description: Update the password for a user specified by their screen name or ICQ UIN.
  107. requestBody:
  108. required: true
  109. content:
  110. application/json:
  111. schema:
  112. type: object
  113. required:
  114. - screen_name
  115. - password
  116. properties:
  117. screen_name:
  118. type: string
  119. description: The AIM screen name or ICQ UIN of the user whose password is to be updated.
  120. password:
  121. type: string
  122. description: The new password for the user.
  123. responses:
  124. '204':
  125. description: Password updated successfully.
  126. '400':
  127. description: Bad request. Invalid input data.
  128. '404':
  129. description: User not found.
  130. /chat/room/public:
  131. get:
  132. summary: List all public AIM chat rooms
  133. description: Retrieve a list of all public AIM chat rooms in exchange 5.
  134. responses:
  135. '200':
  136. description: Successful response containing a list of chat rooms.
  137. content:
  138. application/json:
  139. schema:
  140. type: array
  141. items:
  142. type: object
  143. properties:
  144. name:
  145. type: string
  146. description: Name of the chat room.
  147. create_time:
  148. type: string
  149. format: date-time
  150. description: The timestamp when the chat room was created.
  151. participants:
  152. type: array
  153. description: List of participants in the chat room.
  154. items:
  155. type: object
  156. properties:
  157. id:
  158. type: string
  159. description: User's unique identifier.
  160. screen_name:
  161. type: string
  162. description: User's AIM screen name.
  163. post:
  164. summary: Create a new public chat room
  165. description: Create a new public chat room in exchange 5.
  166. requestBody:
  167. required: true
  168. content:
  169. application/json:
  170. schema:
  171. type: object
  172. properties:
  173. name:
  174. type: string
  175. description: Name of the chat room.
  176. responses:
  177. '201':
  178. description: Chat room created successfully.
  179. '400':
  180. description: Bad request. Invalid input data.
  181. '409':
  182. description: Chat room already exists.
  183. /chat/room/private:
  184. get:
  185. summary: List all private AIM chat rooms
  186. description: Retrieve a list of all private AIM chat rooms in exchange 4.
  187. responses:
  188. '200':
  189. description: Successful response containing a list of chat rooms.
  190. content:
  191. application/json:
  192. schema:
  193. type: array
  194. items:
  195. type: object
  196. properties:
  197. name:
  198. type: string
  199. description: Name of the chat room.
  200. create_time:
  201. type: string
  202. format: date-time
  203. description: The timestamp when the chat room was created.
  204. creator_id:
  205. type: string
  206. description: The chat room creator user ID.
  207. participants:
  208. type: array
  209. description: List of participants in the chat room.
  210. items:
  211. type: object
  212. properties:
  213. id:
  214. type: string
  215. description: User's unique identifier.
  216. screen_name:
  217. type: string
  218. description: User's AIM screen name.
  219. /instant-message:
  220. post:
  221. summary: Send an instant message
  222. 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.
  223. requestBody:
  224. required: true
  225. content:
  226. application/json:
  227. schema:
  228. type: object
  229. properties:
  230. from:
  231. type: string
  232. description: The AIM screen name or ICQ UIN of the sender.
  233. to:
  234. type: string
  235. description: The AIM screen name or ICQ UIN of the recipient.
  236. text:
  237. type: string
  238. description: The text content of the message.
  239. responses:
  240. '200':
  241. description: Message sent successfully.
  242. '400':
  243. description: Bad request. Invalid input data.