api.yml 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411
  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. client_id:
  272. type: string
  273. description: Client name and version reported by the client at sign-on. Empty if not reported.
  274. /session/{screenname}:
  275. get:
  276. summary: Get active sessions for a given screen name or UIN.
  277. description: Retrieve a list of active sessions of a specific logged in user.
  278. parameters:
  279. - in: path
  280. name: screenname
  281. schema:
  282. type: string
  283. description: User's AIM screen name or ICQ UIN.
  284. required: true
  285. responses:
  286. '200':
  287. description: Successful response containing a list of active sessions for the given screen name
  288. content:
  289. application/json:
  290. schema:
  291. type: object
  292. properties:
  293. count:
  294. type: integer
  295. description: The number of active sessions.
  296. sessions:
  297. type: array
  298. items:
  299. type: object
  300. properties:
  301. id:
  302. type: string
  303. description: User's unique identifier.
  304. screen_name:
  305. type: string
  306. description: User's AIM screen name or ICQ UIN.
  307. online_seconds:
  308. type: number
  309. description: Number of seconds this user session has been online.
  310. away_message:
  311. type: string
  312. description: User's AIM away message HTML. Empty if the user is not away.
  313. idle_seconds:
  314. type: number
  315. description: Number of seconds this user session has been idle. 0 if not idle.
  316. is_invisible:
  317. type: boolean
  318. description: If true, indicates the user is invisible.
  319. is_icq:
  320. type: boolean
  321. description: If true, indicates an ICQ user instead of an AIM user.
  322. instances:
  323. type: array
  324. description: Array of session instances for this user.
  325. items:
  326. type: object
  327. properties:
  328. num:
  329. type: integer
  330. description: Instance number for this session instance.
  331. idle_seconds:
  332. type: integer
  333. description: Number of seconds this instance has been idle. 0 if not idle.
  334. is_away:
  335. type: boolean
  336. description: If true, indicates this instance is away.
  337. away_message:
  338. type: string
  339. description: This instance's AIM away message HTML.
  340. is_invisible:
  341. type: boolean
  342. description: If true, indicates this instance is invisible.
  343. remote_addr:
  344. type: string
  345. description: Remote IP address of the user's connection to BOS or TOC
  346. remote_port:
  347. type: integer
  348. description: Remote port number of the user's connection to BOS or TOC
  349. client_id:
  350. type: string
  351. description: Client name and version reported by the client at sign-on. Empty if not reported.
  352. '404':
  353. description: User not found.
  354. delete:
  355. summary: Delete active sessions for a given screen name or UIN.
  356. description: Disconnect any active sessions of a specific logged in user.
  357. parameters:
  358. - in: path
  359. name: screenname
  360. schema:
  361. type: string
  362. description: User's AIM screen name or ICQ UIN.
  363. required: true
  364. responses:
  365. '204':
  366. description: Session deleted successfully
  367. '404':
  368. description: Session not found
  369. /user/password:
  370. put:
  371. summary: Set a user's password
  372. description: Update the password for a user specified by their screen name or ICQ UIN.
  373. requestBody:
  374. required: true
  375. content:
  376. application/json:
  377. schema:
  378. type: object
  379. required:
  380. - screen_name
  381. - password
  382. properties:
  383. screen_name:
  384. type: string
  385. description: The AIM screen name or ICQ UIN of the user whose password is to be updated.
  386. password:
  387. type: string
  388. description: The new password for the user.
  389. responses:
  390. '204':
  391. description: Password updated successfully.
  392. '400':
  393. description: Bad request. Invalid input data.
  394. '404':
  395. description: User not found.
  396. /chat/room/public:
  397. get:
  398. summary: List all public AIM chat rooms
  399. description: Retrieve a list of all public AIM chat rooms in exchange 5.
  400. responses:
  401. '200':
  402. description: Successful response containing a list of chat rooms.
  403. content:
  404. application/json:
  405. schema:
  406. type: array
  407. items:
  408. type: object
  409. properties:
  410. name:
  411. type: string
  412. description: Name of the chat room.
  413. create_time:
  414. type: string
  415. format: date-time
  416. description: The timestamp when the chat room was created.
  417. participants:
  418. type: array
  419. description: List of participants in the chat room.
  420. items:
  421. type: object
  422. properties:
  423. id:
  424. type: string
  425. description: User's unique identifier.
  426. screen_name:
  427. type: string
  428. description: User's AIM screen name.
  429. post:
  430. summary: Create a new public chat room
  431. description: Create a new public chat room in exchange 5.
  432. requestBody:
  433. required: true
  434. content:
  435. application/json:
  436. schema:
  437. type: object
  438. properties:
  439. name:
  440. type: string
  441. description: Name of the chat room.
  442. responses:
  443. '201':
  444. description: Chat room created successfully.
  445. '400':
  446. description: Bad request. Invalid input data.
  447. '409':
  448. description: Chat room already exists.
  449. delete:
  450. summary: Delete public chat rooms
  451. description: Delete one or more public chat rooms in exchange 5.
  452. requestBody:
  453. required: true
  454. content:
  455. application/json:
  456. schema:
  457. type: object
  458. required:
  459. - names
  460. properties:
  461. names:
  462. type: array
  463. description: List of chat room names to delete.
  464. items:
  465. type: string
  466. responses:
  467. '204':
  468. description: Chat rooms deleted successfully.
  469. '400':
  470. description: Bad request. Invalid input data.
  471. '500':
  472. description: Internal server error.
  473. /chat/room/private:
  474. get:
  475. summary: List all private AIM chat rooms
  476. description: Retrieve a list of all private AIM chat rooms in exchange 4.
  477. responses:
  478. '200':
  479. description: Successful response containing a list of chat rooms.
  480. content:
  481. application/json:
  482. schema:
  483. type: array
  484. items:
  485. type: object
  486. properties:
  487. name:
  488. type: string
  489. description: Name of the chat room.
  490. create_time:
  491. type: string
  492. format: date-time
  493. description: The timestamp when the chat room was created.
  494. creator_id:
  495. type: string
  496. description: The chat room creator user ID.
  497. participants:
  498. type: array
  499. description: List of participants in the chat room.
  500. items:
  501. type: object
  502. properties:
  503. id:
  504. type: string
  505. description: User's unique identifier.
  506. screen_name:
  507. type: string
  508. description: User's AIM screen name.
  509. /instant-message:
  510. post:
  511. summary: Send an instant message
  512. description: |
  513. Send an instant message from one user to another. Both the sender and the
  514. recipient must be valid accounts. When sending from a system account, make
  515. sure that account exists.
  516. If the recipient is offline, the message is stored for delivery at their next
  517. login when storeOffline is true; otherwise a 404 is returned.
  518. requestBody:
  519. required: true
  520. content:
  521. application/json:
  522. schema:
  523. type: object
  524. properties:
  525. from:
  526. type: string
  527. description: The AIM screen name or ICQ UIN of the sender.
  528. to:
  529. type: string
  530. description: The AIM screen name or ICQ UIN of the recipient.
  531. text:
  532. type: string
  533. description: The text content of the message.
  534. storeOffline:
  535. type: boolean
  536. default: false
  537. description: If true, store the message for an offline recipient instead of returning 404.
  538. responses:
  539. '200':
  540. description: Message sent or stored for offline delivery.
  541. '400':
  542. description: Bad request. Invalid input data, or the sender does not exist.
  543. '403':
  544. description: Message blocked by the recipient.
  545. '404':
  546. description: Recipient is offline and the message was not stored, either because storeOffline is false or because the recipient does not exist, does not accept offline messages, or has a full offline inbox.
  547. /version:
  548. get:
  549. summary: Get build information of RAS.
  550. description: Retrieve the build version, git commit, and build date of the running RAS binary.
  551. responses:
  552. '200':
  553. description: Successful response containing the build information.
  554. content:
  555. application/json:
  556. schema:
  557. type: object
  558. properties:
  559. version:
  560. type: string
  561. description: The release version number.
  562. commit:
  563. type: string
  564. description: The latest git commit hash in this build.
  565. date:
  566. type: string
  567. description: The build date and timestamp in RFC3339 format.
  568. /directory/category:
  569. get:
  570. summary: Get all keyword categories
  571. description: Retrieve a list of all keyword categories.
  572. responses:
  573. '200':
  574. description: Successful response containing a list of keyword categories.
  575. content:
  576. application/json:
  577. schema:
  578. type: array
  579. items:
  580. type: object
  581. properties:
  582. id:
  583. type: integer
  584. description: The unique identifier of the keyword category.
  585. name:
  586. type: string
  587. description: The name of the keyword category.
  588. post:
  589. summary: Create a new keyword category
  590. description: Create a new keyword category.
  591. requestBody:
  592. required: true
  593. content:
  594. application/json:
  595. schema:
  596. type: object
  597. required:
  598. - name
  599. properties:
  600. name:
  601. type: string
  602. description: The name of the keyword category.
  603. responses:
  604. '201':
  605. description: Keyword category created successfully.
  606. content:
  607. application/json:
  608. schema:
  609. type: object
  610. properties:
  611. id:
  612. type: integer
  613. description: The keyword category ID.
  614. name:
  615. type: string
  616. description: The name of the keyword category.
  617. '400':
  618. description: Malformed input body.
  619. content:
  620. application/json:
  621. schema:
  622. type: object
  623. properties:
  624. message:
  625. type: string
  626. '409':
  627. description: A category with the specified name already exists.
  628. content:
  629. application/json:
  630. schema:
  631. type: object
  632. properties:
  633. message:
  634. type: string
  635. /directory/category/{id}:
  636. delete:
  637. summary: Delete a keyword category
  638. description: Delete a keyword category specified by its ID.
  639. parameters:
  640. - name: id
  641. in: path
  642. description: The ID of the keyword category.
  643. required: true
  644. schema:
  645. type: integer
  646. responses:
  647. '204':
  648. description: Keyword category deleted successfully.
  649. '400':
  650. description: Invalid category ID.
  651. content:
  652. application/json:
  653. schema:
  654. type: object
  655. properties:
  656. message:
  657. type: string
  658. '404':
  659. description: Keyword category not found.
  660. content:
  661. application/json:
  662. schema:
  663. type: object
  664. properties:
  665. message:
  666. type: string
  667. '409':
  668. description: The keyword category is currently in use and cannot be deleted.
  669. content:
  670. application/json:
  671. schema:
  672. type: object
  673. properties:
  674. message:
  675. type: string
  676. /directory/category/{id}/keyword:
  677. get:
  678. summary: Get all keywords in a category
  679. description: Retrieve a list of all keywords in the specified category.
  680. parameters:
  681. - name: id
  682. in: path
  683. description: The ID of the keyword category.
  684. required: true
  685. schema:
  686. type: integer
  687. responses:
  688. '200':
  689. description: Successful response containing a list of keywords.
  690. content:
  691. application/json:
  692. schema:
  693. type: array
  694. items:
  695. type: object
  696. properties:
  697. id:
  698. type: integer
  699. description: The unique identifier of the keyword.
  700. name:
  701. type: string
  702. description: The name of the keyword.
  703. '400':
  704. description: Invalid category ID.
  705. content:
  706. application/json:
  707. schema:
  708. type: object
  709. properties:
  710. message:
  711. type: string
  712. '404':
  713. description: Keyword category not found.
  714. content:
  715. application/json:
  716. schema:
  717. type: object
  718. properties:
  719. message:
  720. type: string
  721. /directory/keyword:
  722. post:
  723. summary: Create a new keyword.
  724. description: Create a new keyword in a category.
  725. requestBody:
  726. required: true
  727. content:
  728. application/json:
  729. schema:
  730. type: object
  731. required:
  732. - category_id
  733. - name
  734. properties:
  735. category_id:
  736. type: integer
  737. description: The ID of the parent keyword category.
  738. name:
  739. type: string
  740. description: The name of the keyword.
  741. responses:
  742. '201':
  743. description: Keyword created successfully.
  744. content:
  745. application/json:
  746. schema:
  747. type: object
  748. properties:
  749. id:
  750. type: integer
  751. description: The keyword ID.
  752. name:
  753. type: string
  754. description: The name of the keyword.
  755. '400':
  756. description: Malformed input body.
  757. content:
  758. application/json:
  759. schema:
  760. type: object
  761. properties:
  762. message:
  763. type: string
  764. '404':
  765. description: Parent keyword category not found.
  766. content:
  767. application/json:
  768. schema:
  769. type: object
  770. properties:
  771. message:
  772. type: string
  773. '409':
  774. description: A keyword with the specified name already exists.
  775. content:
  776. application/json:
  777. schema:
  778. type: object
  779. properties:
  780. message:
  781. type: string
  782. /directory/keyword/{id}:
  783. delete:
  784. summary: Delete a keyword
  785. description: Delete a keyword specified by its ID.
  786. parameters:
  787. - name: id
  788. in: path
  789. description: The ID of the keyword.
  790. required: true
  791. schema:
  792. type: integer
  793. responses:
  794. '204':
  795. description: Keyword deleted successfully.
  796. '404':
  797. description: Keyword not found.
  798. content:
  799. application/json:
  800. schema:
  801. type: object
  802. properties:
  803. message:
  804. type: string
  805. '409':
  806. description: Conflict. The keyword is currently in use and cannot be deleted.
  807. content:
  808. application/json:
  809. schema:
  810. type: object
  811. properties:
  812. message:
  813. type: string
  814. /bart:
  815. get:
  816. summary: Get BART entries by type
  817. description: Retrieve a list of BART (Buddy ART) entries for a specific type.
  818. parameters:
  819. - name: type
  820. in: query
  821. description: The BART type ID (integer).
  822. required: true
  823. schema:
  824. $ref: '#/components/schemas/BARTType'
  825. responses:
  826. '200':
  827. description: Successful response containing BART entries for the specified type.
  828. content:
  829. application/json:
  830. schema:
  831. type: array
  832. items:
  833. type: object
  834. properties:
  835. hash:
  836. type: string
  837. description: A hex value representing the BART asset hash.
  838. type:
  839. $ref: '#/components/schemas/BARTType'
  840. description: The BART type ID.
  841. required:
  842. - hash
  843. - type
  844. '400':
  845. description: Bad request. Missing or invalid type parameter.
  846. content:
  847. application/json:
  848. schema:
  849. $ref: '#/components/schemas/MessageResponse'
  850. '500':
  851. description: Internal server error.
  852. content:
  853. application/json:
  854. schema:
  855. $ref: '#/components/schemas/MessageResponse'
  856. /bart/{hash}:
  857. get:
  858. summary: Get BART asset data
  859. description: Retrieve the raw binary data for a specific BART asset.
  860. parameters:
  861. - name: hash
  862. in: path
  863. description: The hex hash value for the BART asset.
  864. required: true
  865. schema:
  866. type: string
  867. pattern: '^[0-9a-fA-F]+$'
  868. responses:
  869. '200':
  870. description: Successful response containing the raw BART asset data.
  871. content:
  872. application/octet-stream:
  873. schema:
  874. type: string
  875. format: binary
  876. '400':
  877. description: Bad request. Missing or invalid hash parameter.
  878. content:
  879. application/json:
  880. schema:
  881. $ref: '#/components/schemas/MessageResponse'
  882. '404':
  883. description: BART asset not found.
  884. content:
  885. application/json:
  886. schema:
  887. $ref: '#/components/schemas/MessageResponse'
  888. '500':
  889. description: Internal server error.
  890. content:
  891. application/json:
  892. schema:
  893. $ref: '#/components/schemas/MessageResponse'
  894. post:
  895. summary: Upload a BART asset
  896. description: Upload a Buddy ART asset with the specified hash and type.
  897. parameters:
  898. - name: hash
  899. in: path
  900. description: The hex hash value for the BART asset.
  901. required: true
  902. schema:
  903. type: string
  904. pattern: '^[0-9a-fA-F]+$'
  905. - name: type
  906. in: query
  907. description: The BART type ID (integer).
  908. required: true
  909. schema:
  910. $ref: '#/components/schemas/BARTType'
  911. requestBody:
  912. required: true
  913. content:
  914. application/octet-stream:
  915. schema:
  916. type: string
  917. format: binary
  918. description: Raw bytes of the BART asset
  919. responses:
  920. '201':
  921. description: BART asset uploaded successfully.
  922. content:
  923. application/json:
  924. schema:
  925. type: object
  926. properties:
  927. hash:
  928. type: string
  929. description: A hex value representing the BART asset hash.
  930. type:
  931. $ref: '#/components/schemas/BARTType'
  932. description: The BART type ID.
  933. required:
  934. - hash
  935. - type
  936. '400':
  937. description: Bad request. Invalid type format, hash format, or failed to read request body.
  938. content:
  939. application/json:
  940. schema:
  941. $ref: '#/components/schemas/MessageResponse'
  942. '409':
  943. description: Conflict. BART asset already exists.
  944. content:
  945. application/json:
  946. schema:
  947. $ref: '#/components/schemas/MessageResponse'
  948. '413':
  949. description: Payload too large. Asset exceeds size limits for the specified type.
  950. content:
  951. application/json:
  952. schema:
  953. $ref: '#/components/schemas/MessageResponse'
  954. '500':
  955. description: Internal server error.
  956. content:
  957. application/json:
  958. schema:
  959. $ref: '#/components/schemas/MessageResponse'
  960. delete:
  961. summary: Delete a BART asset
  962. description: Delete a BART asset with the specified hash.
  963. parameters:
  964. - name: hash
  965. in: path
  966. description: The hex hash value for the BART asset.
  967. required: true
  968. schema:
  969. type: string
  970. pattern: '^[0-9a-fA-F]+$'
  971. responses:
  972. '200':
  973. description: BART asset deleted successfully.
  974. content:
  975. application/json:
  976. schema:
  977. $ref: '#/components/schemas/MessageResponse'
  978. '400':
  979. description: Bad request. Missing or invalid hash parameter.
  980. content:
  981. application/json:
  982. schema:
  983. $ref: '#/components/schemas/MessageResponse'
  984. '404':
  985. description: BART asset not found.
  986. content:
  987. application/json:
  988. schema:
  989. $ref: '#/components/schemas/MessageResponse'
  990. '500':
  991. description: Internal server error.
  992. content:
  993. application/json:
  994. schema:
  995. $ref: '#/components/schemas/MessageResponse'
  996. /feedbag/{screen_name}/group:
  997. get:
  998. summary: Get buddy list for a user
  999. description: Retrieve all buddies for a user, grouped by group ID.
  1000. parameters:
  1001. - name: screen_name
  1002. in: path
  1003. description: User's AIM screen name or ICQ UIN.
  1004. required: true
  1005. schema:
  1006. type: string
  1007. responses:
  1008. '200':
  1009. description: Successful response containing buddy list grouped by group ID.
  1010. content:
  1011. application/json:
  1012. schema:
  1013. type: array
  1014. description: List of buddy groups.
  1015. items:
  1016. type: object
  1017. properties:
  1018. group_id:
  1019. type: integer
  1020. description: The group ID.
  1021. group_name:
  1022. type: string
  1023. description: The name of the group.
  1024. buddies:
  1025. type: array
  1026. description: List of buddies in this group.
  1027. items:
  1028. type: object
  1029. properties:
  1030. name:
  1031. type: string
  1032. description: The buddy's screen name.
  1033. item_id:
  1034. type: integer
  1035. description: The feedbag item ID for this buddy.
  1036. required:
  1037. - group_id
  1038. - group_name
  1039. - buddies
  1040. '404':
  1041. description: User or feedbag not found.
  1042. content:
  1043. application/json:
  1044. schema:
  1045. $ref: '#/components/schemas/MessageResponse'
  1046. '500':
  1047. description: Internal server error.
  1048. content:
  1049. application/json:
  1050. schema:
  1051. $ref: '#/components/schemas/MessageResponse'
  1052. /feedbag/{screen_name}/group/{group_name}:
  1053. put:
  1054. summary: Add a group to a user's feedbag
  1055. description: |
  1056. Create a new buddy list group in the user's feedbag. If the feedbag is empty,
  1057. the root group is created automatically. This operation is idempotent — if a
  1058. group with the same name already exists, the request succeeds and returns the
  1059. existing group.
  1060. parameters:
  1061. - name: screen_name
  1062. in: path
  1063. description: User's AIM screen name or ICQ UIN.
  1064. required: true
  1065. schema:
  1066. type: string
  1067. - name: group_name
  1068. in: path
  1069. description: The name of the group to add.
  1070. required: true
  1071. schema:
  1072. type: string
  1073. example: "Friends"
  1074. responses:
  1075. '200':
  1076. description: Group already exists. Operation is idempotent.
  1077. content:
  1078. application/json:
  1079. schema:
  1080. type: object
  1081. properties:
  1082. group_id:
  1083. type: integer
  1084. description: The group ID.
  1085. group_name:
  1086. type: string
  1087. description: The name of the group.
  1088. required:
  1089. - group_id
  1090. - group_name
  1091. '201':
  1092. description: Group created successfully.
  1093. content:
  1094. application/json:
  1095. schema:
  1096. type: object
  1097. properties:
  1098. group_id:
  1099. type: integer
  1100. description: The group ID.
  1101. group_name:
  1102. type: string
  1103. description: The name of the group.
  1104. required:
  1105. - group_id
  1106. - group_name
  1107. '400':
  1108. description: Bad request. Invalid input data.
  1109. content:
  1110. application/json:
  1111. schema:
  1112. $ref: '#/components/schemas/MessageResponse'
  1113. '404':
  1114. description: User not found.
  1115. content:
  1116. application/json:
  1117. schema:
  1118. $ref: '#/components/schemas/MessageResponse'
  1119. '500':
  1120. description: Internal server error.
  1121. content:
  1122. application/json:
  1123. schema:
  1124. $ref: '#/components/schemas/MessageResponse'
  1125. /feedbag/{screen_name}/group/{group_id}/buddy/{buddy_screen_name}:
  1126. put:
  1127. summary: Add a buddy to a group
  1128. 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.
  1129. parameters:
  1130. - name: screen_name
  1131. in: path
  1132. description: User's AIM screen name or ICQ UIN.
  1133. required: true
  1134. schema:
  1135. type: string
  1136. - name: group_id
  1137. in: path
  1138. description: The group ID to add the buddy to.
  1139. required: true
  1140. schema:
  1141. type: integer
  1142. - name: buddy_screen_name
  1143. in: path
  1144. description: The screen name of the buddy to add.
  1145. required: true
  1146. schema:
  1147. type: string
  1148. example: "buddy123"
  1149. responses:
  1150. '200':
  1151. description: Buddy added or already exists in the group. Operation is idempotent.
  1152. content:
  1153. application/json:
  1154. schema:
  1155. type: object
  1156. properties:
  1157. name:
  1158. type: string
  1159. description: The buddy's screen name.
  1160. group_id:
  1161. type: integer
  1162. description: The group ID the buddy was added to.
  1163. item_id:
  1164. type: integer
  1165. description: The feedbag item ID for this buddy.
  1166. required:
  1167. - name
  1168. - group_id
  1169. - item_id
  1170. '400':
  1171. description: Bad request. Invalid input data.
  1172. content:
  1173. application/json:
  1174. schema:
  1175. $ref: '#/components/schemas/MessageResponse'
  1176. '404':
  1177. description: User or group not found.
  1178. content:
  1179. application/json:
  1180. schema:
  1181. $ref: '#/components/schemas/MessageResponse'
  1182. '500':
  1183. description: Internal server error.
  1184. content:
  1185. application/json:
  1186. schema:
  1187. $ref: '#/components/schemas/MessageResponse'
  1188. delete:
  1189. summary: Delete a buddy from a group
  1190. description: Remove a buddy from a specific group in the user's feedbag.
  1191. parameters:
  1192. - name: screen_name
  1193. in: path
  1194. description: User's AIM screen name or ICQ UIN.
  1195. required: true
  1196. schema:
  1197. type: string
  1198. - name: group_id
  1199. in: path
  1200. description: The group ID to remove the buddy from.
  1201. required: true
  1202. schema:
  1203. type: integer
  1204. - name: buddy_screen_name
  1205. in: path
  1206. description: The screen name of the buddy to remove.
  1207. required: true
  1208. schema:
  1209. type: string
  1210. example: "buddy123"
  1211. responses:
  1212. '204':
  1213. description: Buddy deleted successfully.
  1214. '400':
  1215. description: Bad request. Invalid input data.
  1216. content:
  1217. application/json:
  1218. schema:
  1219. $ref: '#/components/schemas/MessageResponse'
  1220. '404':
  1221. description: User, group, or buddy not found.
  1222. content:
  1223. application/json:
  1224. schema:
  1225. $ref: '#/components/schemas/MessageResponse'
  1226. '500':
  1227. description: Internal server error.
  1228. content:
  1229. application/json:
  1230. schema:
  1231. $ref: '#/components/schemas/MessageResponse'
  1232. /user/{screenname}/linked-account:
  1233. get:
  1234. summary: List linked accounts for a screen name
  1235. description: Retrieve all linked accounts associated with a user.
  1236. parameters:
  1237. - in: path
  1238. name: screenname
  1239. schema:
  1240. type: string
  1241. description: User's AIM screen name or ICQ UIN.
  1242. required: true
  1243. responses:
  1244. '200':
  1245. description: Successful response containing linked accounts.
  1246. content:
  1247. application/json:
  1248. schema:
  1249. type: object
  1250. properties:
  1251. linked_accounts:
  1252. type: array
  1253. items:
  1254. type: string
  1255. description: List of linked screen names.
  1256. '404':
  1257. description: User not found.
  1258. content:
  1259. application/json:
  1260. schema:
  1261. $ref: '#/components/schemas/MessageResponse'
  1262. '500':
  1263. description: Internal server error.
  1264. content:
  1265. application/json:
  1266. schema:
  1267. $ref: '#/components/schemas/MessageResponse'
  1268. post:
  1269. summary: Add a linked account
  1270. description: Link a screen name to the specified primary user account.
  1271. parameters:
  1272. - in: path
  1273. name: screenname
  1274. schema:
  1275. type: string
  1276. description: User's AIM screen name or ICQ UIN.
  1277. required: true
  1278. requestBody:
  1279. required: true
  1280. content:
  1281. application/json:
  1282. schema:
  1283. type: object
  1284. required:
  1285. - linked_screen_name
  1286. properties:
  1287. linked_screen_name:
  1288. type: string
  1289. description: The screen name to link to the primary account.
  1290. example: "secondaryuser"
  1291. responses:
  1292. '201':
  1293. description: Linked account created successfully.
  1294. '400':
  1295. description: Invalid request body, or screen name cannot be linked to itself.
  1296. content:
  1297. application/json:
  1298. schema:
  1299. $ref: '#/components/schemas/MessageResponse'
  1300. '404':
  1301. description: Primary user or linked user not found.
  1302. content:
  1303. application/json:
  1304. schema:
  1305. $ref: '#/components/schemas/MessageResponse'
  1306. '409':
  1307. description: Linked account relationship already exists, or the user already has the maximum of 4 linked accounts.
  1308. content:
  1309. application/json:
  1310. schema:
  1311. $ref: '#/components/schemas/MessageResponse'
  1312. '500':
  1313. description: Internal server error.
  1314. content:
  1315. application/json:
  1316. schema:
  1317. $ref: '#/components/schemas/MessageResponse'
  1318. /user/{screenname}/linked-account/{linked_screenname}:
  1319. delete:
  1320. summary: Remove a linked account
  1321. description: Remove the linked account relationship between a primary screen name and a linked screen name.
  1322. parameters:
  1323. - in: path
  1324. name: screenname
  1325. schema:
  1326. type: string
  1327. description: User's AIM screen name or ICQ UIN.
  1328. required: true
  1329. - in: path
  1330. name: linked_screenname
  1331. schema:
  1332. type: string
  1333. description: The linked screen name to remove.
  1334. required: true
  1335. responses:
  1336. '204':
  1337. description: Linked account removed successfully.
  1338. '404':
  1339. description: User or linked account not found.
  1340. content:
  1341. application/json:
  1342. schema:
  1343. $ref: '#/components/schemas/MessageResponse'
  1344. '500':
  1345. description: Internal server error.
  1346. content:
  1347. application/json:
  1348. schema:
  1349. $ref: '#/components/schemas/MessageResponse'
  1350. components:
  1351. schemas:
  1352. MessageResponse:
  1353. type: object
  1354. properties:
  1355. message:
  1356. type: string
  1357. description: Response message describing the result or error.
  1358. required:
  1359. - message
  1360. BARTType:
  1361. type: integer
  1362. enum: [ 0, 1, 2, 3, 4, 5, 6, 12, 13, 15, 96, 129, 131, 136, 137, 1024, 1026, 1027, 1028 ]
  1363. description: |
  1364. BART (Buddy ART) type identifier. Valid type IDs and their corresponding names:
  1365. - 0: buddy_icon_small (GIF/JPG/BMP, <= 32 pixels and 2k)
  1366. - 1: buddy_icon (GIF/JPG/BMP, <= 64 pixels and 7k)
  1367. - 2: status_str (StringTLV format; DATA flag is always set)
  1368. - 3: arrive_sound (WAV/MP3/MID, <= 10K)
  1369. - 4: rich_text (byte array of rich text codes; DATA flag is always set)
  1370. - 5: superbuddy_icon (XML)
  1371. - 6: radio_station (Opaque struct; DATA flag is always set)
  1372. - 12: buddy_icon_big (SWF)
  1373. - 13: status_str_tod (Time when the status string is set)
  1374. - 15: current_av_track (XML file; Data flag should not be set)
  1375. - 96: depart_sound (WAV/MP3/MID, <= 10K)
  1376. - 129: im_chrome (GIF/JPG/BMP wallpaper)
  1377. - 131: im_sound (WAV/MP3, <= 10K)
  1378. - 136: im_chrome_xml (XML)
  1379. - 137: im_chrome_immers (Immersive Expressions)
  1380. - 1024: emoticon_set (Set of default Emoticons)
  1381. - 1026: encr_cert_chain (Cert chain for encryption certs)
  1382. - 1027: sign_cert_chain (Cert chain for signing certs)
  1383. - 1028: gateway_cert (Cert for enterprise gateway)