api.yml 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639
  1. openapi: 3.0.3
  2. info:
  3. title: User Management API
  4. description: API that provides management functionality for Open OSCAR 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. suspended_status:
  31. type: string
  32. description: User's suspended status
  33. is_bot:
  34. type: boolean
  35. nullable: true
  36. description: Indicates whether the user is a bot.
  37. post:
  38. summary: Create a new user
  39. description: Create a new AIM or ICQ user account.
  40. requestBody:
  41. required: true
  42. content:
  43. application/json:
  44. schema:
  45. type: object
  46. required:
  47. - screen_name
  48. - password
  49. properties:
  50. screen_name:
  51. type: string
  52. description: The user's AIM screen name or ICQ UIN.
  53. password:
  54. type: string
  55. description: The user's password for account creation.
  56. responses:
  57. '201':
  58. description: User account created successfully.
  59. '400':
  60. description: Bad request. Invalid input data.
  61. '409':
  62. description: Conflict. A user with the specified screen name or ICQ UIN already exists.
  63. delete:
  64. summary: Delete a user
  65. description: Delete a user account specified by their screen name.
  66. requestBody:
  67. required: true
  68. content:
  69. application/json:
  70. schema:
  71. type: object
  72. properties:
  73. screen_name:
  74. type: string
  75. description: The screen name of the user to delete.
  76. responses:
  77. '204':
  78. description: User deleted successfully.
  79. '404':
  80. description: User not found.
  81. /user/{screenname}/account:
  82. get:
  83. summary: Get account details for a specific screen name.
  84. description: Retrieve account details for a specific screen name.
  85. parameters:
  86. - in: path
  87. name: screenname
  88. schema:
  89. type: string
  90. description: User's AIM screen name or ICQ UIN.
  91. required: true
  92. responses:
  93. '200':
  94. description: Successful response containing account details
  95. content:
  96. application/json:
  97. schema:
  98. type: object
  99. properties:
  100. id:
  101. type: string
  102. description: User's unique identifier.
  103. screen_name:
  104. type: string
  105. description: User's AIM screen name or ICQ UIN.
  106. profile:
  107. type: string
  108. description: User's AIM profile HTML.
  109. email_address:
  110. type: string
  111. description: User's email address
  112. confirmed:
  113. type: boolean
  114. description: User's account confirmation status
  115. is_icq:
  116. type: boolean
  117. description: If true, indicates an ICQ user instead of an AIM user.
  118. suspended_status:
  119. type: string
  120. description: User's suspended status
  121. is_bot:
  122. type: boolean
  123. nullable: true
  124. description: Indicates whether the user is a bot.
  125. '404':
  126. description: User not found.
  127. patch:
  128. summary: Update a user account
  129. description: Update attributes for a user account
  130. parameters:
  131. - in: path
  132. name: screenname
  133. schema:
  134. type: string
  135. description: User's AIM screen name or ICQ UIN.
  136. required: true
  137. requestBody:
  138. required: true
  139. content:
  140. application/json:
  141. schema:
  142. type: object
  143. properties:
  144. suspended_status:
  145. type: string
  146. nullable: true
  147. enum: [ deleted, expired, suspended, suspended_age ]
  148. description: The suspended status of the account
  149. is_bot:
  150. type: boolean
  151. nullable: true
  152. description: >
  153. Indicates whether the account is for a bot. Bots are exempt from rate limiting... make sure you
  154. trust the bot and bot owner before enabling this flag.
  155. responses:
  156. '204':
  157. description: Successfully updated user account
  158. '304':
  159. description: Did not modify user account
  160. '400':
  161. description: Bad request when modifying user account
  162. '404':
  163. description: User not found
  164. /user/{screenname}/icon:
  165. get:
  166. summary: Get AIM buddy icon for a screen name
  167. description: Retrieve account buddy icon for a specific screen name.
  168. parameters:
  169. - in: path
  170. name: screenname
  171. schema:
  172. type: string
  173. description: User's AIM screen name or ICQ UIN.
  174. required: true
  175. responses:
  176. '200':
  177. description: Successful response containing buddy icon bytes
  178. content:
  179. image/gif:
  180. schema:
  181. type: string
  182. format: binary
  183. image/jpeg:
  184. schema:
  185. type: string
  186. format: binary
  187. image/png:
  188. schema:
  189. type: string
  190. format: binary
  191. application/octet-stream:
  192. schema:
  193. type: string
  194. format: binary
  195. '404':
  196. description: User not found, or user has no buddy icon
  197. /session:
  198. get:
  199. summary: Get active sessions
  200. description: Retrieve a list of active sessions of logged in users.
  201. responses:
  202. '200':
  203. description: Successful response containing a list of active sessions.
  204. content:
  205. application/json:
  206. schema:
  207. type: object
  208. properties:
  209. count:
  210. type: integer
  211. description: The number of active sessions.
  212. sessions:
  213. type: array
  214. items:
  215. type: object
  216. properties:
  217. id:
  218. type: string
  219. description: User's unique identifier.
  220. screen_name:
  221. type: string
  222. description: User's AIM screen name or ICQ UIN.
  223. online_seconds:
  224. type: integer
  225. description: Number of seconds this user session has been online.
  226. is_away:
  227. type: boolean
  228. description: If true, indicates the user is away.
  229. away_message:
  230. type: string
  231. description: User's AIM away message HTML.
  232. idle_seconds:
  233. type: integer
  234. description: Number of seconds this user session has been idle. 0 if not idle.
  235. is_invisible:
  236. type: boolean
  237. description: If true, indicates the user is invisible.
  238. is_icq:
  239. type: boolean
  240. description: If true, indicates an ICQ user instead of an AIM user.
  241. instance_count:
  242. type: integer
  243. description: Number of concurrent clients signed in for this user.
  244. instances:
  245. type: array
  246. description: Array of session instances for this user.
  247. items:
  248. type: object
  249. properties:
  250. num:
  251. type: integer
  252. description: Instance number for this session instance.
  253. idle_seconds:
  254. type: integer
  255. description: Number of seconds this instance has been idle. 0 if not idle.
  256. is_away:
  257. type: boolean
  258. description: If true, indicates this instance is away.
  259. away_message:
  260. type: string
  261. description: This instance's AIM away message HTML.
  262. is_invisible:
  263. type: boolean
  264. description: If true, indicates this instance is invisible.
  265. remote_addr:
  266. type: string
  267. description: Remote IP address of the user's connection to BOS or TOC.
  268. remote_port:
  269. type: integer
  270. description: Remote port number of the user's connection to BOS or TOC.
  271. /session/{screenname}:
  272. get:
  273. summary: Get active sessions for a given screen name or UIN.
  274. description: Retrieve a list of active sessions of a specific logged in user.
  275. parameters:
  276. - in: path
  277. name: screenname
  278. schema:
  279. type: string
  280. description: User's AIM screen name or ICQ UIN.
  281. required: true
  282. responses:
  283. '200':
  284. description: Successful response containing a list of active sessions for the given screen name
  285. content:
  286. application/json:
  287. schema:
  288. type: object
  289. properties:
  290. count:
  291. type: integer
  292. description: The number of active sessions.
  293. sessions:
  294. type: array
  295. items:
  296. type: object
  297. properties:
  298. id:
  299. type: string
  300. description: User's unique identifier.
  301. screen_name:
  302. type: string
  303. description: User's AIM screen name or ICQ UIN.
  304. online_seconds:
  305. type: number
  306. description: Number of seconds this user session has been online.
  307. away_message:
  308. type: string
  309. description: User's AIM away message HTML. Empty if the user is not away.
  310. idle_seconds:
  311. type: number
  312. description: Number of seconds this user session has been idle. 0 if not idle.
  313. is_invisible:
  314. type: boolean
  315. description: If true, indicates the user is invisible.
  316. is_icq:
  317. type: boolean
  318. description: If true, indicates an ICQ user instead of an AIM user.
  319. instances:
  320. type: array
  321. description: Array of session instances for this user.
  322. items:
  323. type: object
  324. properties:
  325. num:
  326. type: integer
  327. description: Instance number for this session instance.
  328. idle_seconds:
  329. type: integer
  330. description: Number of seconds this instance has been idle. 0 if not idle.
  331. is_away:
  332. type: boolean
  333. description: If true, indicates this instance is away.
  334. away_message:
  335. type: string
  336. description: This instance's AIM away message HTML.
  337. is_invisible:
  338. type: boolean
  339. description: If true, indicates this instance is invisible.
  340. remote_addr:
  341. type: string
  342. description: Remote IP address of the user's connection to BOS or TOC
  343. remote_port:
  344. type: integer
  345. description: Remote port number of the user's connection to BOS or TOC
  346. '404':
  347. description: User not found.
  348. delete:
  349. summary: Delete active sessions for a given screen name or UIN.
  350. description: Disconnect any active sessions of a specific logged in user.
  351. parameters:
  352. - in: path
  353. name: screenname
  354. schema:
  355. type: string
  356. description: User's AIM screen name or ICQ UIN.
  357. required: true
  358. responses:
  359. '204':
  360. description: Session deleted successfully
  361. '404':
  362. description: Session not found
  363. /user/password:
  364. put:
  365. summary: Set a user's password
  366. description: Update the password for a user specified by their screen name or ICQ UIN.
  367. requestBody:
  368. required: true
  369. content:
  370. application/json:
  371. schema:
  372. type: object
  373. required:
  374. - screen_name
  375. - password
  376. properties:
  377. screen_name:
  378. type: string
  379. description: The AIM screen name or ICQ UIN of the user whose password is to be updated.
  380. password:
  381. type: string
  382. description: The new password for the user.
  383. responses:
  384. '204':
  385. description: Password updated successfully.
  386. '400':
  387. description: Bad request. Invalid input data.
  388. '404':
  389. description: User not found.
  390. /chat/room/public:
  391. get:
  392. summary: List all public AIM chat rooms
  393. description: Retrieve a list of all public AIM chat rooms in exchange 5.
  394. responses:
  395. '200':
  396. description: Successful response containing a list of chat rooms.
  397. content:
  398. application/json:
  399. schema:
  400. type: array
  401. items:
  402. type: object
  403. properties:
  404. name:
  405. type: string
  406. description: Name of the chat room.
  407. create_time:
  408. type: string
  409. format: date-time
  410. description: The timestamp when the chat room was created.
  411. participants:
  412. type: array
  413. description: List of participants in the chat room.
  414. items:
  415. type: object
  416. properties:
  417. id:
  418. type: string
  419. description: User's unique identifier.
  420. screen_name:
  421. type: string
  422. description: User's AIM screen name.
  423. post:
  424. summary: Create a new public chat room
  425. description: Create a new public chat room in exchange 5.
  426. requestBody:
  427. required: true
  428. content:
  429. application/json:
  430. schema:
  431. type: object
  432. properties:
  433. name:
  434. type: string
  435. description: Name of the chat room.
  436. responses:
  437. '201':
  438. description: Chat room created successfully.
  439. '400':
  440. description: Bad request. Invalid input data.
  441. '409':
  442. description: Chat room already exists.
  443. delete:
  444. summary: Delete public chat rooms
  445. description: Delete one or more public chat rooms in exchange 5.
  446. requestBody:
  447. required: true
  448. content:
  449. application/json:
  450. schema:
  451. type: object
  452. required:
  453. - names
  454. properties:
  455. names:
  456. type: array
  457. description: List of chat room names to delete.
  458. items:
  459. type: string
  460. responses:
  461. '204':
  462. description: Chat rooms deleted successfully.
  463. '400':
  464. description: Bad request. Invalid input data.
  465. '500':
  466. description: Internal server error.
  467. /chat/room/private:
  468. get:
  469. summary: List all private AIM chat rooms
  470. description: Retrieve a list of all private AIM chat rooms in exchange 4.
  471. responses:
  472. '200':
  473. description: Successful response containing a list of chat rooms.
  474. content:
  475. application/json:
  476. schema:
  477. type: array
  478. items:
  479. type: object
  480. properties:
  481. name:
  482. type: string
  483. description: Name of the chat room.
  484. create_time:
  485. type: string
  486. format: date-time
  487. description: The timestamp when the chat room was created.
  488. creator_id:
  489. type: string
  490. description: The chat room creator user ID.
  491. participants:
  492. type: array
  493. description: List of participants in the chat room.
  494. items:
  495. type: object
  496. properties:
  497. id:
  498. type: string
  499. description: User's unique identifier.
  500. screen_name:
  501. type: string
  502. description: User's AIM screen name.
  503. /instant-message:
  504. post:
  505. summary: Send an instant message
  506. 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.
  507. requestBody:
  508. required: true
  509. content:
  510. application/json:
  511. schema:
  512. type: object
  513. properties:
  514. from:
  515. type: string
  516. description: The AIM screen name or ICQ UIN of the sender.
  517. to:
  518. type: string
  519. description: The AIM screen name or ICQ UIN of the recipient.
  520. text:
  521. type: string
  522. description: The text content of the message.
  523. responses:
  524. '200':
  525. description: Message sent successfully.
  526. '400':
  527. description: Bad request. Invalid input data.
  528. /version:
  529. get:
  530. summary: Get build information of RAS.
  531. description: Retrieve the build version, git commit, and build date of the running RAS binary.
  532. responses:
  533. '200':
  534. description: Successful response containing the build information.
  535. content:
  536. application/json:
  537. schema:
  538. type: object
  539. properties:
  540. version:
  541. type: string
  542. description: The release version number.
  543. commit:
  544. type: string
  545. description: The latest git commit hash in this build.
  546. date:
  547. type: string
  548. description: The build date and timestamp in RFC3339 format.
  549. /directory/category:
  550. get:
  551. summary: Get all keyword categories
  552. description: Retrieve a list of all keyword categories.
  553. responses:
  554. '200':
  555. description: Successful response containing a list of keyword categories.
  556. content:
  557. application/json:
  558. schema:
  559. type: array
  560. items:
  561. type: object
  562. properties:
  563. id:
  564. type: integer
  565. description: The unique identifier of the keyword category.
  566. name:
  567. type: string
  568. description: The name of the keyword category.
  569. post:
  570. summary: Create a new keyword category
  571. description: Create a new keyword category.
  572. requestBody:
  573. required: true
  574. content:
  575. application/json:
  576. schema:
  577. type: object
  578. required:
  579. - name
  580. properties:
  581. name:
  582. type: string
  583. description: The name of the keyword category.
  584. responses:
  585. '201':
  586. description: Keyword category created successfully.
  587. content:
  588. application/json:
  589. schema:
  590. type: object
  591. properties:
  592. id:
  593. type: integer
  594. description: The keyword category ID.
  595. name:
  596. type: string
  597. description: The name of the keyword category.
  598. '400':
  599. description: Malformed input body.
  600. content:
  601. application/json:
  602. schema:
  603. type: object
  604. properties:
  605. message:
  606. type: string
  607. '409':
  608. description: A category with the specified name already exists.
  609. content:
  610. application/json:
  611. schema:
  612. type: object
  613. properties:
  614. message:
  615. type: string
  616. /directory/category/{id}:
  617. delete:
  618. summary: Delete a keyword category
  619. description: Delete a keyword category specified by its ID.
  620. parameters:
  621. - name: id
  622. in: path
  623. description: The ID of the keyword category.
  624. required: true
  625. schema:
  626. type: integer
  627. responses:
  628. '204':
  629. description: Keyword category deleted successfully.
  630. '400':
  631. description: Invalid category ID.
  632. content:
  633. application/json:
  634. schema:
  635. type: object
  636. properties:
  637. message:
  638. type: string
  639. '404':
  640. description: Keyword category not found.
  641. content:
  642. application/json:
  643. schema:
  644. type: object
  645. properties:
  646. message:
  647. type: string
  648. '409':
  649. description: The keyword category is currently in use and cannot be deleted.
  650. content:
  651. application/json:
  652. schema:
  653. type: object
  654. properties:
  655. message:
  656. type: string
  657. /directory/category/{id}/keyword:
  658. get:
  659. summary: Get all keywords in a category
  660. description: Retrieve a list of all keywords in the specified category.
  661. parameters:
  662. - name: id
  663. in: path
  664. description: The ID of the keyword category.
  665. required: true
  666. schema:
  667. type: integer
  668. responses:
  669. '200':
  670. description: Successful response containing a list of keywords.
  671. content:
  672. application/json:
  673. schema:
  674. type: array
  675. items:
  676. type: object
  677. properties:
  678. id:
  679. type: integer
  680. description: The unique identifier of the keyword.
  681. name:
  682. type: string
  683. description: The name of the keyword.
  684. '400':
  685. description: Invalid category ID.
  686. content:
  687. application/json:
  688. schema:
  689. type: object
  690. properties:
  691. message:
  692. type: string
  693. '404':
  694. description: Keyword category not found.
  695. content:
  696. application/json:
  697. schema:
  698. type: object
  699. properties:
  700. message:
  701. type: string
  702. /directory/keyword:
  703. post:
  704. summary: Create a new keyword.
  705. description: Create a new keyword in a category.
  706. requestBody:
  707. required: true
  708. content:
  709. application/json:
  710. schema:
  711. type: object
  712. required:
  713. - category_id
  714. - name
  715. properties:
  716. category_id:
  717. type: integer
  718. description: The ID of the parent keyword category.
  719. name:
  720. type: string
  721. description: The name of the keyword.
  722. responses:
  723. '201':
  724. description: Keyword created successfully.
  725. content:
  726. application/json:
  727. schema:
  728. type: object
  729. properties:
  730. id:
  731. type: integer
  732. description: The keyword ID.
  733. name:
  734. type: string
  735. description: The name of the keyword.
  736. '400':
  737. description: Malformed input body.
  738. content:
  739. application/json:
  740. schema:
  741. type: object
  742. properties:
  743. message:
  744. type: string
  745. '404':
  746. description: Parent keyword category not found.
  747. content:
  748. application/json:
  749. schema:
  750. type: object
  751. properties:
  752. message:
  753. type: string
  754. '409':
  755. description: A keyword with the specified name already exists.
  756. content:
  757. application/json:
  758. schema:
  759. type: object
  760. properties:
  761. message:
  762. type: string
  763. /directory/keyword/{id}:
  764. delete:
  765. summary: Delete a keyword
  766. description: Delete a keyword specified by its ID.
  767. parameters:
  768. - name: id
  769. in: path
  770. description: The ID of the keyword.
  771. required: true
  772. schema:
  773. type: integer
  774. responses:
  775. '204':
  776. description: Keyword deleted successfully.
  777. '404':
  778. description: Keyword not found.
  779. content:
  780. application/json:
  781. schema:
  782. type: object
  783. properties:
  784. message:
  785. type: string
  786. '409':
  787. description: Conflict. The keyword is currently in use and cannot be deleted.
  788. content:
  789. application/json:
  790. schema:
  791. type: object
  792. properties:
  793. message:
  794. type: string
  795. /admin/webapi/keys:
  796. get:
  797. summary: List all Web API keys
  798. description: Retrieve a list of all Web API keys for the Web AIM API.
  799. tags: [ Web API Management ]
  800. responses:
  801. '200':
  802. description: Successful response containing a list of API keys.
  803. content:
  804. application/json:
  805. schema:
  806. type: array
  807. items:
  808. $ref: '#/components/schemas/WebAPIKey'
  809. '500':
  810. description: Internal server error.
  811. content:
  812. application/json:
  813. schema:
  814. $ref: '#/components/schemas/MessageResponse'
  815. post:
  816. summary: Create a new Web API key
  817. description: Create a new API key for Web AIM API authentication.
  818. tags: [ Web API Management ]
  819. requestBody:
  820. required: true
  821. content:
  822. application/json:
  823. schema:
  824. type: object
  825. required:
  826. - app_name
  827. properties:
  828. app_name:
  829. type: string
  830. description: Name of the application using this API key.
  831. example: "My Web AIM Client"
  832. allowed_origins:
  833. type: array
  834. items:
  835. type: string
  836. description: List of allowed CORS origins. Empty list allows all origins (useful for mobile apps).
  837. example: [ "https://example.com", "https://app.example.com" ]
  838. rate_limit:
  839. type: integer
  840. description: Maximum requests per minute allowed for this key.
  841. default: 60
  842. example: 120
  843. capabilities:
  844. type: array
  845. items:
  846. type: string
  847. description: List of capabilities/features enabled for this key. Empty list allows all capabilities.
  848. example: [ "aim.session", "presence.get", "im.send" ]
  849. responses:
  850. '201':
  851. description: API key created successfully.
  852. content:
  853. application/json:
  854. schema:
  855. allOf:
  856. - $ref: '#/components/schemas/WebAPIKey'
  857. - type: object
  858. properties:
  859. dev_key:
  860. type: string
  861. description: The actual API key value. This is only shown once at creation time.
  862. example: "a1b2c3d4e5f6789012345678901234567890123456789012345678901234"
  863. '400':
  864. description: Bad request. Invalid input data.
  865. content:
  866. application/json:
  867. schema:
  868. $ref: '#/components/schemas/MessageResponse'
  869. '409':
  870. description: Conflict. An API key with this ID already exists.
  871. content:
  872. application/json:
  873. schema:
  874. $ref: '#/components/schemas/MessageResponse'
  875. '500':
  876. description: Internal server error.
  877. content:
  878. application/json:
  879. schema:
  880. $ref: '#/components/schemas/MessageResponse'
  881. /admin/webapi/keys/{id}:
  882. get:
  883. summary: Get a specific Web API key
  884. description: Retrieve details of a specific Web API key by its developer ID.
  885. tags: [ Web API Management ]
  886. parameters:
  887. - name: id
  888. in: path
  889. description: The developer ID of the API key.
  890. required: true
  891. schema:
  892. type: string
  893. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  894. responses:
  895. '200':
  896. description: Successful response containing the API key details.
  897. content:
  898. application/json:
  899. schema:
  900. $ref: '#/components/schemas/WebAPIKey'
  901. '404':
  902. description: API key not found.
  903. content:
  904. application/json:
  905. schema:
  906. $ref: '#/components/schemas/MessageResponse'
  907. '500':
  908. description: Internal server error.
  909. content:
  910. application/json:
  911. schema:
  912. $ref: '#/components/schemas/MessageResponse'
  913. put:
  914. summary: Update a Web API key
  915. description: Update settings for an existing Web API key.
  916. tags: [ Web API Management ]
  917. parameters:
  918. - name: id
  919. in: path
  920. description: The developer ID of the API key.
  921. required: true
  922. schema:
  923. type: string
  924. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  925. requestBody:
  926. required: true
  927. content:
  928. application/json:
  929. schema:
  930. type: object
  931. properties:
  932. app_name:
  933. type: string
  934. description: New application name.
  935. is_active:
  936. type: boolean
  937. description: Enable or disable the API key.
  938. rate_limit:
  939. type: integer
  940. description: New rate limit (requests per minute).
  941. allowed_origins:
  942. type: array
  943. items:
  944. type: string
  945. description: New list of allowed CORS origins.
  946. capabilities:
  947. type: array
  948. items:
  949. type: string
  950. description: New list of enabled capabilities.
  951. responses:
  952. '200':
  953. description: API key updated successfully.
  954. content:
  955. application/json:
  956. schema:
  957. $ref: '#/components/schemas/WebAPIKey'
  958. '404':
  959. description: API key not found.
  960. content:
  961. application/json:
  962. schema:
  963. $ref: '#/components/schemas/MessageResponse'
  964. '500':
  965. description: Internal server error.
  966. content:
  967. application/json:
  968. schema:
  969. $ref: '#/components/schemas/MessageResponse'
  970. delete:
  971. summary: Delete a Web API key
  972. description: Permanently delete a Web API key.
  973. tags: [ Web API Management ]
  974. parameters:
  975. - name: id
  976. in: path
  977. description: The developer ID of the API key.
  978. required: true
  979. schema:
  980. type: string
  981. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  982. responses:
  983. '204':
  984. description: API key deleted successfully.
  985. '404':
  986. description: API key not found.
  987. content:
  988. application/json:
  989. schema:
  990. $ref: '#/components/schemas/MessageResponse'
  991. '500':
  992. description: Internal server error.
  993. content:
  994. application/json:
  995. schema:
  996. $ref: '#/components/schemas/MessageResponse'
  997. /bart:
  998. get:
  999. summary: Get BART entries by type
  1000. description: Retrieve a list of BART (Buddy ART) entries for a specific type.
  1001. parameters:
  1002. - name: type
  1003. in: query
  1004. description: The BART type ID (integer).
  1005. required: true
  1006. schema:
  1007. $ref: '#/components/schemas/BARTType'
  1008. responses:
  1009. '200':
  1010. description: Successful response containing BART entries for the specified type.
  1011. content:
  1012. application/json:
  1013. schema:
  1014. type: array
  1015. items:
  1016. type: object
  1017. properties:
  1018. hash:
  1019. type: string
  1020. description: A hex value representing the BART asset hash.
  1021. type:
  1022. $ref: '#/components/schemas/BARTType'
  1023. description: The BART type ID.
  1024. required:
  1025. - hash
  1026. - type
  1027. '400':
  1028. description: Bad request. Missing or invalid type parameter.
  1029. content:
  1030. application/json:
  1031. schema:
  1032. $ref: '#/components/schemas/MessageResponse'
  1033. '500':
  1034. description: Internal server error.
  1035. content:
  1036. application/json:
  1037. schema:
  1038. $ref: '#/components/schemas/MessageResponse'
  1039. /bart/{hash}:
  1040. get:
  1041. summary: Get BART asset data
  1042. description: Retrieve the raw binary data for a specific BART asset.
  1043. parameters:
  1044. - name: hash
  1045. in: path
  1046. description: The hex hash value for the BART asset.
  1047. required: true
  1048. schema:
  1049. type: string
  1050. pattern: '^[0-9a-fA-F]+$'
  1051. responses:
  1052. '200':
  1053. description: Successful response containing the raw BART asset data.
  1054. content:
  1055. application/octet-stream:
  1056. schema:
  1057. type: string
  1058. format: binary
  1059. '400':
  1060. description: Bad request. Missing or invalid hash parameter.
  1061. content:
  1062. application/json:
  1063. schema:
  1064. $ref: '#/components/schemas/MessageResponse'
  1065. '404':
  1066. description: BART asset not found.
  1067. content:
  1068. application/json:
  1069. schema:
  1070. $ref: '#/components/schemas/MessageResponse'
  1071. '500':
  1072. description: Internal server error.
  1073. content:
  1074. application/json:
  1075. schema:
  1076. $ref: '#/components/schemas/MessageResponse'
  1077. post:
  1078. summary: Upload a BART asset
  1079. description: Upload a Buddy ART asset with the specified hash and type.
  1080. parameters:
  1081. - name: hash
  1082. in: path
  1083. description: The hex hash value for the BART asset.
  1084. required: true
  1085. schema:
  1086. type: string
  1087. pattern: '^[0-9a-fA-F]+$'
  1088. - name: type
  1089. in: query
  1090. description: The BART type ID (integer).
  1091. required: true
  1092. schema:
  1093. $ref: '#/components/schemas/BARTType'
  1094. requestBody:
  1095. required: true
  1096. content:
  1097. application/octet-stream:
  1098. schema:
  1099. type: string
  1100. format: binary
  1101. description: Raw bytes of the BART asset
  1102. responses:
  1103. '201':
  1104. description: BART asset uploaded successfully.
  1105. content:
  1106. application/json:
  1107. schema:
  1108. type: object
  1109. properties:
  1110. hash:
  1111. type: string
  1112. description: A hex value representing the BART asset hash.
  1113. type:
  1114. $ref: '#/components/schemas/BARTType'
  1115. description: The BART type ID.
  1116. required:
  1117. - hash
  1118. - type
  1119. '400':
  1120. description: Bad request. Invalid type format, hash format, or failed to read request body.
  1121. content:
  1122. application/json:
  1123. schema:
  1124. $ref: '#/components/schemas/MessageResponse'
  1125. '409':
  1126. description: Conflict. BART asset already exists.
  1127. content:
  1128. application/json:
  1129. schema:
  1130. $ref: '#/components/schemas/MessageResponse'
  1131. '413':
  1132. description: Payload too large. Asset exceeds size limits for the specified type.
  1133. content:
  1134. application/json:
  1135. schema:
  1136. $ref: '#/components/schemas/MessageResponse'
  1137. '500':
  1138. description: Internal server error.
  1139. content:
  1140. application/json:
  1141. schema:
  1142. $ref: '#/components/schemas/MessageResponse'
  1143. delete:
  1144. summary: Delete a BART asset
  1145. description: Delete a BART asset with the specified hash.
  1146. parameters:
  1147. - name: hash
  1148. in: path
  1149. description: The hex hash value for the BART asset.
  1150. required: true
  1151. schema:
  1152. type: string
  1153. pattern: '^[0-9a-fA-F]+$'
  1154. responses:
  1155. '200':
  1156. description: BART asset deleted successfully.
  1157. content:
  1158. application/json:
  1159. schema:
  1160. $ref: '#/components/schemas/MessageResponse'
  1161. '400':
  1162. description: Bad request. Missing or invalid hash parameter.
  1163. content:
  1164. application/json:
  1165. schema:
  1166. $ref: '#/components/schemas/MessageResponse'
  1167. '404':
  1168. description: BART asset not found.
  1169. content:
  1170. application/json:
  1171. schema:
  1172. $ref: '#/components/schemas/MessageResponse'
  1173. '500':
  1174. description: Internal server error.
  1175. content:
  1176. application/json:
  1177. schema:
  1178. $ref: '#/components/schemas/MessageResponse'
  1179. /feedbag/{screen_name}/group:
  1180. get:
  1181. summary: Get buddy list for a user
  1182. description: Retrieve all buddies for a user, grouped by group ID.
  1183. parameters:
  1184. - name: screen_name
  1185. in: path
  1186. description: User's AIM screen name or ICQ UIN.
  1187. required: true
  1188. schema:
  1189. type: string
  1190. responses:
  1191. '200':
  1192. description: Successful response containing buddy list grouped by group ID.
  1193. content:
  1194. application/json:
  1195. schema:
  1196. type: array
  1197. description: List of buddy groups.
  1198. items:
  1199. type: object
  1200. properties:
  1201. group_id:
  1202. type: integer
  1203. description: The group ID.
  1204. group_name:
  1205. type: string
  1206. description: The name of the group.
  1207. buddies:
  1208. type: array
  1209. description: List of buddies in this group.
  1210. items:
  1211. type: object
  1212. properties:
  1213. name:
  1214. type: string
  1215. description: The buddy's screen name.
  1216. item_id:
  1217. type: integer
  1218. description: The feedbag item ID for this buddy.
  1219. required:
  1220. - group_id
  1221. - group_name
  1222. - buddies
  1223. '404':
  1224. description: User or feedbag not found.
  1225. content:
  1226. application/json:
  1227. schema:
  1228. $ref: '#/components/schemas/MessageResponse'
  1229. '500':
  1230. description: Internal server error.
  1231. content:
  1232. application/json:
  1233. schema:
  1234. $ref: '#/components/schemas/MessageResponse'
  1235. /feedbag/{screen_name}/group/{group_name}:
  1236. put:
  1237. summary: Add a group to a user's feedbag
  1238. description: |
  1239. Create a new buddy list group in the user's feedbag. If the feedbag is empty,
  1240. the root group is created automatically. This operation is idempotent — if a
  1241. group with the same name already exists, the request succeeds and returns the
  1242. existing group.
  1243. parameters:
  1244. - name: screen_name
  1245. in: path
  1246. description: User's AIM screen name or ICQ UIN.
  1247. required: true
  1248. schema:
  1249. type: string
  1250. - name: group_name
  1251. in: path
  1252. description: The name of the group to add.
  1253. required: true
  1254. schema:
  1255. type: string
  1256. example: "Friends"
  1257. responses:
  1258. '200':
  1259. description: Group already exists. Operation is idempotent.
  1260. content:
  1261. application/json:
  1262. schema:
  1263. type: object
  1264. properties:
  1265. group_id:
  1266. type: integer
  1267. description: The group ID.
  1268. group_name:
  1269. type: string
  1270. description: The name of the group.
  1271. required:
  1272. - group_id
  1273. - group_name
  1274. '201':
  1275. description: Group created successfully.
  1276. content:
  1277. application/json:
  1278. schema:
  1279. type: object
  1280. properties:
  1281. group_id:
  1282. type: integer
  1283. description: The group ID.
  1284. group_name:
  1285. type: string
  1286. description: The name of the group.
  1287. required:
  1288. - group_id
  1289. - group_name
  1290. '400':
  1291. description: Bad request. Invalid input data.
  1292. content:
  1293. application/json:
  1294. schema:
  1295. $ref: '#/components/schemas/MessageResponse'
  1296. '404':
  1297. description: User not found.
  1298. content:
  1299. application/json:
  1300. schema:
  1301. $ref: '#/components/schemas/MessageResponse'
  1302. '500':
  1303. description: Internal server error.
  1304. content:
  1305. application/json:
  1306. schema:
  1307. $ref: '#/components/schemas/MessageResponse'
  1308. /feedbag/{screen_name}/group/{group_id}/buddy/{buddy_screen_name}:
  1309. put:
  1310. summary: Add a buddy to a group
  1311. description: Add a buddy to a specific group in the user's feedbag. This operation is idempotent - if the buddy already exists in the group, the request will succeed without error.
  1312. parameters:
  1313. - name: screen_name
  1314. in: path
  1315. description: User's AIM screen name or ICQ UIN.
  1316. required: true
  1317. schema:
  1318. type: string
  1319. - name: group_id
  1320. in: path
  1321. description: The group ID to add the buddy to.
  1322. required: true
  1323. schema:
  1324. type: integer
  1325. - name: buddy_screen_name
  1326. in: path
  1327. description: The screen name of the buddy to add.
  1328. required: true
  1329. schema:
  1330. type: string
  1331. example: "buddy123"
  1332. responses:
  1333. '200':
  1334. description: Buddy added or already exists in the group. Operation is idempotent.
  1335. content:
  1336. application/json:
  1337. schema:
  1338. type: object
  1339. properties:
  1340. name:
  1341. type: string
  1342. description: The buddy's screen name.
  1343. group_id:
  1344. type: integer
  1345. description: The group ID the buddy was added to.
  1346. item_id:
  1347. type: integer
  1348. description: The feedbag item ID for this buddy.
  1349. required:
  1350. - name
  1351. - group_id
  1352. - item_id
  1353. '400':
  1354. description: Bad request. Invalid input data.
  1355. content:
  1356. application/json:
  1357. schema:
  1358. $ref: '#/components/schemas/MessageResponse'
  1359. '404':
  1360. description: User or group not found.
  1361. content:
  1362. application/json:
  1363. schema:
  1364. $ref: '#/components/schemas/MessageResponse'
  1365. '500':
  1366. description: Internal server error.
  1367. content:
  1368. application/json:
  1369. schema:
  1370. $ref: '#/components/schemas/MessageResponse'
  1371. delete:
  1372. summary: Delete a buddy from a group
  1373. description: Remove a buddy from a specific group in the user's feedbag.
  1374. parameters:
  1375. - name: screen_name
  1376. in: path
  1377. description: User's AIM screen name or ICQ UIN.
  1378. required: true
  1379. schema:
  1380. type: string
  1381. - name: group_id
  1382. in: path
  1383. description: The group ID to remove the buddy from.
  1384. required: true
  1385. schema:
  1386. type: integer
  1387. - name: buddy_screen_name
  1388. in: path
  1389. description: The screen name of the buddy to remove.
  1390. required: true
  1391. schema:
  1392. type: string
  1393. example: "buddy123"
  1394. responses:
  1395. '204':
  1396. description: Buddy deleted successfully.
  1397. '400':
  1398. description: Bad request. Invalid input data.
  1399. content:
  1400. application/json:
  1401. schema:
  1402. $ref: '#/components/schemas/MessageResponse'
  1403. '404':
  1404. description: User, group, or buddy not found.
  1405. content:
  1406. application/json:
  1407. schema:
  1408. $ref: '#/components/schemas/MessageResponse'
  1409. '500':
  1410. description: Internal server error.
  1411. content:
  1412. application/json:
  1413. schema:
  1414. $ref: '#/components/schemas/MessageResponse'
  1415. /user/{screenname}/linked-account:
  1416. get:
  1417. summary: List linked accounts for a screen name
  1418. description: Retrieve all linked accounts associated with a user.
  1419. parameters:
  1420. - in: path
  1421. name: screenname
  1422. schema:
  1423. type: string
  1424. description: User's AIM screen name or ICQ UIN.
  1425. required: true
  1426. responses:
  1427. '200':
  1428. description: Successful response containing linked accounts.
  1429. content:
  1430. application/json:
  1431. schema:
  1432. type: object
  1433. properties:
  1434. linked_accounts:
  1435. type: array
  1436. items:
  1437. type: string
  1438. description: List of linked screen names.
  1439. '404':
  1440. description: User not found.
  1441. content:
  1442. application/json:
  1443. schema:
  1444. $ref: '#/components/schemas/MessageResponse'
  1445. '500':
  1446. description: Internal server error.
  1447. content:
  1448. application/json:
  1449. schema:
  1450. $ref: '#/components/schemas/MessageResponse'
  1451. post:
  1452. summary: Add a linked account
  1453. description: Link a screen name to the specified primary user account.
  1454. parameters:
  1455. - in: path
  1456. name: screenname
  1457. schema:
  1458. type: string
  1459. description: User's AIM screen name or ICQ UIN.
  1460. required: true
  1461. requestBody:
  1462. required: true
  1463. content:
  1464. application/json:
  1465. schema:
  1466. type: object
  1467. required:
  1468. - linked_screen_name
  1469. properties:
  1470. linked_screen_name:
  1471. type: string
  1472. description: The screen name to link to the primary account.
  1473. example: "secondaryuser"
  1474. responses:
  1475. '201':
  1476. description: Linked account created successfully.
  1477. '400':
  1478. description: Invalid request body, or screen name cannot be linked to itself.
  1479. content:
  1480. application/json:
  1481. schema:
  1482. $ref: '#/components/schemas/MessageResponse'
  1483. '404':
  1484. description: Primary user or linked user not found.
  1485. content:
  1486. application/json:
  1487. schema:
  1488. $ref: '#/components/schemas/MessageResponse'
  1489. '409':
  1490. description: Linked account relationship already exists.
  1491. content:
  1492. application/json:
  1493. schema:
  1494. $ref: '#/components/schemas/MessageResponse'
  1495. '500':
  1496. description: Internal server error.
  1497. content:
  1498. application/json:
  1499. schema:
  1500. $ref: '#/components/schemas/MessageResponse'
  1501. /user/{screenname}/linked-account/{linked_screenname}:
  1502. delete:
  1503. summary: Remove a linked account
  1504. description: Remove the linked account relationship between a primary screen name and a linked screen name.
  1505. parameters:
  1506. - in: path
  1507. name: screenname
  1508. schema:
  1509. type: string
  1510. description: User's AIM screen name or ICQ UIN.
  1511. required: true
  1512. - in: path
  1513. name: linked_screenname
  1514. schema:
  1515. type: string
  1516. description: The linked screen name to remove.
  1517. required: true
  1518. responses:
  1519. '204':
  1520. description: Linked account removed successfully.
  1521. '404':
  1522. description: User or linked account not found.
  1523. content:
  1524. application/json:
  1525. schema:
  1526. $ref: '#/components/schemas/MessageResponse'
  1527. '500':
  1528. description: Internal server error.
  1529. content:
  1530. application/json:
  1531. schema:
  1532. $ref: '#/components/schemas/MessageResponse'
  1533. components:
  1534. schemas:
  1535. MessageResponse:
  1536. type: object
  1537. properties:
  1538. message:
  1539. type: string
  1540. description: Response message describing the result or error.
  1541. required:
  1542. - message
  1543. BARTType:
  1544. type: integer
  1545. enum: [ 0, 1, 2, 3, 4, 5, 6, 12, 13, 15, 96, 129, 131, 136, 137, 1024, 1026, 1027, 1028 ]
  1546. description: |
  1547. BART (Buddy ART) type identifier. Valid type IDs and their corresponding names:
  1548. - 0: buddy_icon_small (GIF/JPG/BMP, <= 32 pixels and 2k)
  1549. - 1: buddy_icon (GIF/JPG/BMP, <= 64 pixels and 7k)
  1550. - 2: status_str (StringTLV format; DATA flag is always set)
  1551. - 3: arrive_sound (WAV/MP3/MID, <= 10K)
  1552. - 4: rich_text (byte array of rich text codes; DATA flag is always set)
  1553. - 5: superbuddy_icon (XML)
  1554. - 6: radio_station (Opaque struct; DATA flag is always set)
  1555. - 12: buddy_icon_big (SWF)
  1556. - 13: status_str_tod (Time when the status string is set)
  1557. - 15: current_av_track (XML file; Data flag should not be set)
  1558. - 96: depart_sound (WAV/MP3/MID, <= 10K)
  1559. - 129: im_chrome (GIF/JPG/BMP wallpaper)
  1560. - 131: im_sound (WAV/MP3, <= 10K)
  1561. - 136: im_chrome_xml (XML)
  1562. - 137: im_chrome_immers (Immersive Expressions)
  1563. - 1024: emoticon_set (Set of default Emoticons)
  1564. - 1026: encr_cert_chain (Cert chain for encryption certs)
  1565. - 1027: sign_cert_chain (Cert chain for signing certs)
  1566. - 1028: gateway_cert (Cert for enterprise gateway)
  1567. WebAPIKey:
  1568. type: object
  1569. properties:
  1570. dev_id:
  1571. type: string
  1572. description: Unique developer/application identifier.
  1573. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  1574. app_name:
  1575. type: string
  1576. description: Name of the application using this API key.
  1577. example: "My Web AIM Client"
  1578. created_at:
  1579. type: string
  1580. format: date-time
  1581. description: Timestamp when the key was created.
  1582. last_used:
  1583. type: string
  1584. format: date-time
  1585. nullable: true
  1586. description: Timestamp when the key was last used.
  1587. is_active:
  1588. type: boolean
  1589. description: Whether the API key is currently active.
  1590. default: true
  1591. rate_limit:
  1592. type: integer
  1593. description: Maximum requests per minute allowed.
  1594. example: 60
  1595. allowed_origins:
  1596. type: array
  1597. items:
  1598. type: string
  1599. description: List of allowed CORS origins. Empty list allows all origins.
  1600. example: [ "https://example.com" ]
  1601. capabilities:
  1602. type: array
  1603. items:
  1604. type: string
  1605. description: List of enabled features/endpoints. Empty list allows all capabilities.
  1606. example: [ "aim.session", "presence.get" ]