api.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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.
  11. responses:
  12. '200':
  13. description: Successful response containing a list of users.
  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. /user/{screenname}/account:
  75. get:
  76. summary: Get account details for a specific screen name.
  77. description: Retrieve account details for a specific screen name.
  78. parameters:
  79. - name: screenname
  80. in: path
  81. description: User's AIM screen name or ICQ UIN.
  82. required: true
  83. type: string
  84. responses:
  85. '200':
  86. description: Successful response containing account details
  87. content:
  88. application/json:
  89. schema:
  90. type: object
  91. properties:
  92. id:
  93. type: string
  94. description: User's unique identifier.
  95. screen_name:
  96. type: string
  97. description: User's AIM screen name or ICQ UIN.
  98. profile:
  99. type: string
  100. description: User's AIM profile HTML.
  101. email_address:
  102. type: string
  103. description: User's email address
  104. confirmed:
  105. type: bool
  106. description: User's account confirmation status
  107. is_icq:
  108. type: boolean
  109. description: If true, indicates an ICQ user instead of an AIM user.
  110. '404':
  111. description: User not found.
  112. /user/{screenname}/icon:
  113. get:
  114. summary: Get AIM buddy icon for a screen name
  115. description: Retrieve account buddy icon for a specific screen name.
  116. parameters:
  117. - name: screenname
  118. in: path
  119. description: User's AIM screen name or ICQ UIN.
  120. required: true
  121. type: string
  122. responses:
  123. '200':
  124. description: Successful response containing buddy icon bytes
  125. content:
  126. image/gif:
  127. schema:
  128. type: string
  129. format: binary
  130. '404':
  131. description: User not found, or user has no buddy icon
  132. /session:
  133. get:
  134. summary: Get active sessions
  135. description: Retrieve a list of active sessions of logged in users.
  136. responses:
  137. '200':
  138. description: Successful response containing a list of active sessions.
  139. content:
  140. application/json:
  141. schema:
  142. type: object
  143. properties:
  144. count:
  145. type: integer
  146. description: The number of active sessions.
  147. sessions:
  148. type: array
  149. items:
  150. type: object
  151. properties:
  152. id:
  153. type: string
  154. description: User's unique identifier.
  155. screen_name:
  156. type: string
  157. description: User's AIM screen name or ICQ UIN.
  158. online_seconds:
  159. type: float
  160. description: Number of seconds this user session has been online.
  161. away_message:
  162. type: string
  163. description: User's AIM away message HTML. Empty if the user is not away.
  164. idle_seconds:
  165. type: float
  166. description: Number of seconds this user session has been idle. 0 if not idle.
  167. is_icq:
  168. type: boolean
  169. description: If true, indicates an ICQ user instead of an AIM user.
  170. /session/{screenname}:
  171. get:
  172. summary: Get active sessions for a given screen name or UIN.
  173. description: Retrieve a list of active sessions of a specific logged in user.
  174. parameters:
  175. - name: screenname
  176. in: path
  177. description: User's AIM screen name or ICQ UIN.
  178. required: true
  179. type: string
  180. responses:
  181. '200':
  182. description: Successful response containing a list of active sessions for the given screen name
  183. content:
  184. application/json:
  185. schema:
  186. type: object
  187. properties:
  188. count:
  189. type: integer
  190. description: The number of active sessions.
  191. sessions:
  192. type: array
  193. items:
  194. type: object
  195. properties:
  196. id:
  197. type: string
  198. description: User's unique identifier.
  199. screen_name:
  200. type: string
  201. description: User's AIM screen name or ICQ UIN.
  202. online_seconds:
  203. type: float
  204. description: Number of seconds this user session has been online.
  205. away_message:
  206. type: string
  207. description: User's AIM away message HTML. Empty if the user is not away.
  208. idle_seconds:
  209. type: float
  210. description: Number of seconds this user session has been idle. 0 if not idle.
  211. is_icq:
  212. type: boolean
  213. description: If true, indicates an ICQ user instead of an AIM user.
  214. '404':
  215. description: User not found.
  216. /user/password:
  217. put:
  218. summary: Set a user's password
  219. description: Update the password for a user specified by their screen name or ICQ UIN.
  220. requestBody:
  221. required: true
  222. content:
  223. application/json:
  224. schema:
  225. type: object
  226. required:
  227. - screen_name
  228. - password
  229. properties:
  230. screen_name:
  231. type: string
  232. description: The AIM screen name or ICQ UIN of the user whose password is to be updated.
  233. password:
  234. type: string
  235. description: The new password for the user.
  236. responses:
  237. '204':
  238. description: Password updated successfully.
  239. '400':
  240. description: Bad request. Invalid input data.
  241. '404':
  242. description: User not found.
  243. /chat/room/public:
  244. get:
  245. summary: List all public AIM chat rooms
  246. description: Retrieve a list of all public AIM chat rooms in exchange 5.
  247. responses:
  248. '200':
  249. description: Successful response containing a list of chat rooms.
  250. content:
  251. application/json:
  252. schema:
  253. type: array
  254. items:
  255. type: object
  256. properties:
  257. name:
  258. type: string
  259. description: Name of the chat room.
  260. create_time:
  261. type: string
  262. format: date-time
  263. description: The timestamp when the chat room was created.
  264. participants:
  265. type: array
  266. description: List of participants in the chat room.
  267. items:
  268. type: object
  269. properties:
  270. id:
  271. type: string
  272. description: User's unique identifier.
  273. screen_name:
  274. type: string
  275. description: User's AIM screen name.
  276. post:
  277. summary: Create a new public chat room
  278. description: Create a new public chat room in exchange 5.
  279. requestBody:
  280. required: true
  281. content:
  282. application/json:
  283. schema:
  284. type: object
  285. properties:
  286. name:
  287. type: string
  288. description: Name of the chat room.
  289. responses:
  290. '201':
  291. description: Chat room created successfully.
  292. '400':
  293. description: Bad request. Invalid input data.
  294. '409':
  295. description: Chat room already exists.
  296. /chat/room/private:
  297. get:
  298. summary: List all private AIM chat rooms
  299. description: Retrieve a list of all private AIM chat rooms in exchange 4.
  300. responses:
  301. '200':
  302. description: Successful response containing a list of chat rooms.
  303. content:
  304. application/json:
  305. schema:
  306. type: array
  307. items:
  308. type: object
  309. properties:
  310. name:
  311. type: string
  312. description: Name of the chat room.
  313. create_time:
  314. type: string
  315. format: date-time
  316. description: The timestamp when the chat room was created.
  317. creator_id:
  318. type: string
  319. description: The chat room creator user ID.
  320. participants:
  321. type: array
  322. description: List of participants in the chat room.
  323. items:
  324. type: object
  325. properties:
  326. id:
  327. type: string
  328. description: User's unique identifier.
  329. screen_name:
  330. type: string
  331. description: User's AIM screen name.
  332. /instant-message:
  333. post:
  334. summary: Send an instant message
  335. 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.
  336. requestBody:
  337. required: true
  338. content:
  339. application/json:
  340. schema:
  341. type: object
  342. properties:
  343. from:
  344. type: string
  345. description: The AIM screen name or ICQ UIN of the sender.
  346. to:
  347. type: string
  348. description: The AIM screen name or ICQ UIN of the recipient.
  349. text:
  350. type: string
  351. description: The text content of the message.
  352. responses:
  353. '200':
  354. description: Message sent successfully.
  355. '400':
  356. description: Bad request. Invalid input data.