api.yml 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405
  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: |
  507. Send an instant message from one user to another. Both the sender and the
  508. recipient must be valid accounts. When sending from a system account, make
  509. sure that account exists.
  510. If the recipient is offline, the message is stored for delivery at their next
  511. login when storeOffline is true; otherwise a 404 is returned.
  512. requestBody:
  513. required: true
  514. content:
  515. application/json:
  516. schema:
  517. type: object
  518. properties:
  519. from:
  520. type: string
  521. description: The AIM screen name or ICQ UIN of the sender.
  522. to:
  523. type: string
  524. description: The AIM screen name or ICQ UIN of the recipient.
  525. text:
  526. type: string
  527. description: The text content of the message.
  528. storeOffline:
  529. type: boolean
  530. default: false
  531. description: If true, store the message for an offline recipient instead of returning 404.
  532. responses:
  533. '200':
  534. description: Message sent or stored for offline delivery.
  535. '400':
  536. description: Bad request. Invalid input data.
  537. '403':
  538. description: Message blocked by the recipient.
  539. '404':
  540. 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.
  541. /version:
  542. get:
  543. summary: Get build information of RAS.
  544. description: Retrieve the build version, git commit, and build date of the running RAS binary.
  545. responses:
  546. '200':
  547. description: Successful response containing the build information.
  548. content:
  549. application/json:
  550. schema:
  551. type: object
  552. properties:
  553. version:
  554. type: string
  555. description: The release version number.
  556. commit:
  557. type: string
  558. description: The latest git commit hash in this build.
  559. date:
  560. type: string
  561. description: The build date and timestamp in RFC3339 format.
  562. /directory/category:
  563. get:
  564. summary: Get all keyword categories
  565. description: Retrieve a list of all keyword categories.
  566. responses:
  567. '200':
  568. description: Successful response containing a list of keyword categories.
  569. content:
  570. application/json:
  571. schema:
  572. type: array
  573. items:
  574. type: object
  575. properties:
  576. id:
  577. type: integer
  578. description: The unique identifier of the keyword category.
  579. name:
  580. type: string
  581. description: The name of the keyword category.
  582. post:
  583. summary: Create a new keyword category
  584. description: Create a new keyword category.
  585. requestBody:
  586. required: true
  587. content:
  588. application/json:
  589. schema:
  590. type: object
  591. required:
  592. - name
  593. properties:
  594. name:
  595. type: string
  596. description: The name of the keyword category.
  597. responses:
  598. '201':
  599. description: Keyword category created successfully.
  600. content:
  601. application/json:
  602. schema:
  603. type: object
  604. properties:
  605. id:
  606. type: integer
  607. description: The keyword category ID.
  608. name:
  609. type: string
  610. description: The name of the keyword category.
  611. '400':
  612. description: Malformed input body.
  613. content:
  614. application/json:
  615. schema:
  616. type: object
  617. properties:
  618. message:
  619. type: string
  620. '409':
  621. description: A category with the specified name already exists.
  622. content:
  623. application/json:
  624. schema:
  625. type: object
  626. properties:
  627. message:
  628. type: string
  629. /directory/category/{id}:
  630. delete:
  631. summary: Delete a keyword category
  632. description: Delete a keyword category specified by its ID.
  633. parameters:
  634. - name: id
  635. in: path
  636. description: The ID of the keyword category.
  637. required: true
  638. schema:
  639. type: integer
  640. responses:
  641. '204':
  642. description: Keyword category deleted successfully.
  643. '400':
  644. description: Invalid category ID.
  645. content:
  646. application/json:
  647. schema:
  648. type: object
  649. properties:
  650. message:
  651. type: string
  652. '404':
  653. description: Keyword category not found.
  654. content:
  655. application/json:
  656. schema:
  657. type: object
  658. properties:
  659. message:
  660. type: string
  661. '409':
  662. description: The keyword category is currently in use and cannot be deleted.
  663. content:
  664. application/json:
  665. schema:
  666. type: object
  667. properties:
  668. message:
  669. type: string
  670. /directory/category/{id}/keyword:
  671. get:
  672. summary: Get all keywords in a category
  673. description: Retrieve a list of all keywords in the specified category.
  674. parameters:
  675. - name: id
  676. in: path
  677. description: The ID of the keyword category.
  678. required: true
  679. schema:
  680. type: integer
  681. responses:
  682. '200':
  683. description: Successful response containing a list of keywords.
  684. content:
  685. application/json:
  686. schema:
  687. type: array
  688. items:
  689. type: object
  690. properties:
  691. id:
  692. type: integer
  693. description: The unique identifier of the keyword.
  694. name:
  695. type: string
  696. description: The name of the keyword.
  697. '400':
  698. description: Invalid category ID.
  699. content:
  700. application/json:
  701. schema:
  702. type: object
  703. properties:
  704. message:
  705. type: string
  706. '404':
  707. description: Keyword category not found.
  708. content:
  709. application/json:
  710. schema:
  711. type: object
  712. properties:
  713. message:
  714. type: string
  715. /directory/keyword:
  716. post:
  717. summary: Create a new keyword.
  718. description: Create a new keyword in a category.
  719. requestBody:
  720. required: true
  721. content:
  722. application/json:
  723. schema:
  724. type: object
  725. required:
  726. - category_id
  727. - name
  728. properties:
  729. category_id:
  730. type: integer
  731. description: The ID of the parent keyword category.
  732. name:
  733. type: string
  734. description: The name of the keyword.
  735. responses:
  736. '201':
  737. description: Keyword created successfully.
  738. content:
  739. application/json:
  740. schema:
  741. type: object
  742. properties:
  743. id:
  744. type: integer
  745. description: The keyword ID.
  746. name:
  747. type: string
  748. description: The name of the keyword.
  749. '400':
  750. description: Malformed input body.
  751. content:
  752. application/json:
  753. schema:
  754. type: object
  755. properties:
  756. message:
  757. type: string
  758. '404':
  759. description: Parent keyword category not found.
  760. content:
  761. application/json:
  762. schema:
  763. type: object
  764. properties:
  765. message:
  766. type: string
  767. '409':
  768. description: A keyword with the specified name already exists.
  769. content:
  770. application/json:
  771. schema:
  772. type: object
  773. properties:
  774. message:
  775. type: string
  776. /directory/keyword/{id}:
  777. delete:
  778. summary: Delete a keyword
  779. description: Delete a keyword specified by its ID.
  780. parameters:
  781. - name: id
  782. in: path
  783. description: The ID of the keyword.
  784. required: true
  785. schema:
  786. type: integer
  787. responses:
  788. '204':
  789. description: Keyword deleted successfully.
  790. '404':
  791. description: Keyword not found.
  792. content:
  793. application/json:
  794. schema:
  795. type: object
  796. properties:
  797. message:
  798. type: string
  799. '409':
  800. description: Conflict. The keyword is currently in use and cannot be deleted.
  801. content:
  802. application/json:
  803. schema:
  804. type: object
  805. properties:
  806. message:
  807. type: string
  808. /bart:
  809. get:
  810. summary: Get BART entries by type
  811. description: Retrieve a list of BART (Buddy ART) entries for a specific type.
  812. parameters:
  813. - name: type
  814. in: query
  815. description: The BART type ID (integer).
  816. required: true
  817. schema:
  818. $ref: '#/components/schemas/BARTType'
  819. responses:
  820. '200':
  821. description: Successful response containing BART entries for the specified type.
  822. content:
  823. application/json:
  824. schema:
  825. type: array
  826. items:
  827. type: object
  828. properties:
  829. hash:
  830. type: string
  831. description: A hex value representing the BART asset hash.
  832. type:
  833. $ref: '#/components/schemas/BARTType'
  834. description: The BART type ID.
  835. required:
  836. - hash
  837. - type
  838. '400':
  839. description: Bad request. Missing or invalid type parameter.
  840. content:
  841. application/json:
  842. schema:
  843. $ref: '#/components/schemas/MessageResponse'
  844. '500':
  845. description: Internal server error.
  846. content:
  847. application/json:
  848. schema:
  849. $ref: '#/components/schemas/MessageResponse'
  850. /bart/{hash}:
  851. get:
  852. summary: Get BART asset data
  853. description: Retrieve the raw binary data for a specific BART asset.
  854. parameters:
  855. - name: hash
  856. in: path
  857. description: The hex hash value for the BART asset.
  858. required: true
  859. schema:
  860. type: string
  861. pattern: '^[0-9a-fA-F]+$'
  862. responses:
  863. '200':
  864. description: Successful response containing the raw BART asset data.
  865. content:
  866. application/octet-stream:
  867. schema:
  868. type: string
  869. format: binary
  870. '400':
  871. description: Bad request. Missing or invalid hash parameter.
  872. content:
  873. application/json:
  874. schema:
  875. $ref: '#/components/schemas/MessageResponse'
  876. '404':
  877. description: BART asset not found.
  878. content:
  879. application/json:
  880. schema:
  881. $ref: '#/components/schemas/MessageResponse'
  882. '500':
  883. description: Internal server error.
  884. content:
  885. application/json:
  886. schema:
  887. $ref: '#/components/schemas/MessageResponse'
  888. post:
  889. summary: Upload a BART asset
  890. description: Upload a Buddy ART asset with the specified hash and type.
  891. parameters:
  892. - name: hash
  893. in: path
  894. description: The hex hash value for the BART asset.
  895. required: true
  896. schema:
  897. type: string
  898. pattern: '^[0-9a-fA-F]+$'
  899. - name: type
  900. in: query
  901. description: The BART type ID (integer).
  902. required: true
  903. schema:
  904. $ref: '#/components/schemas/BARTType'
  905. requestBody:
  906. required: true
  907. content:
  908. application/octet-stream:
  909. schema:
  910. type: string
  911. format: binary
  912. description: Raw bytes of the BART asset
  913. responses:
  914. '201':
  915. description: BART asset uploaded successfully.
  916. content:
  917. application/json:
  918. schema:
  919. type: object
  920. properties:
  921. hash:
  922. type: string
  923. description: A hex value representing the BART asset hash.
  924. type:
  925. $ref: '#/components/schemas/BARTType'
  926. description: The BART type ID.
  927. required:
  928. - hash
  929. - type
  930. '400':
  931. description: Bad request. Invalid type format, hash format, or failed to read request body.
  932. content:
  933. application/json:
  934. schema:
  935. $ref: '#/components/schemas/MessageResponse'
  936. '409':
  937. description: Conflict. BART asset already exists.
  938. content:
  939. application/json:
  940. schema:
  941. $ref: '#/components/schemas/MessageResponse'
  942. '413':
  943. description: Payload too large. Asset exceeds size limits for the specified type.
  944. content:
  945. application/json:
  946. schema:
  947. $ref: '#/components/schemas/MessageResponse'
  948. '500':
  949. description: Internal server error.
  950. content:
  951. application/json:
  952. schema:
  953. $ref: '#/components/schemas/MessageResponse'
  954. delete:
  955. summary: Delete a BART asset
  956. description: Delete a BART asset with the specified hash.
  957. parameters:
  958. - name: hash
  959. in: path
  960. description: The hex hash value for the BART asset.
  961. required: true
  962. schema:
  963. type: string
  964. pattern: '^[0-9a-fA-F]+$'
  965. responses:
  966. '200':
  967. description: BART asset deleted successfully.
  968. content:
  969. application/json:
  970. schema:
  971. $ref: '#/components/schemas/MessageResponse'
  972. '400':
  973. description: Bad request. Missing or invalid hash parameter.
  974. content:
  975. application/json:
  976. schema:
  977. $ref: '#/components/schemas/MessageResponse'
  978. '404':
  979. description: BART asset not found.
  980. content:
  981. application/json:
  982. schema:
  983. $ref: '#/components/schemas/MessageResponse'
  984. '500':
  985. description: Internal server error.
  986. content:
  987. application/json:
  988. schema:
  989. $ref: '#/components/schemas/MessageResponse'
  990. /feedbag/{screen_name}/group:
  991. get:
  992. summary: Get buddy list for a user
  993. description: Retrieve all buddies for a user, grouped by group ID.
  994. parameters:
  995. - name: screen_name
  996. in: path
  997. description: User's AIM screen name or ICQ UIN.
  998. required: true
  999. schema:
  1000. type: string
  1001. responses:
  1002. '200':
  1003. description: Successful response containing buddy list grouped by group ID.
  1004. content:
  1005. application/json:
  1006. schema:
  1007. type: array
  1008. description: List of buddy groups.
  1009. items:
  1010. type: object
  1011. properties:
  1012. group_id:
  1013. type: integer
  1014. description: The group ID.
  1015. group_name:
  1016. type: string
  1017. description: The name of the group.
  1018. buddies:
  1019. type: array
  1020. description: List of buddies in this group.
  1021. items:
  1022. type: object
  1023. properties:
  1024. name:
  1025. type: string
  1026. description: The buddy's screen name.
  1027. item_id:
  1028. type: integer
  1029. description: The feedbag item ID for this buddy.
  1030. required:
  1031. - group_id
  1032. - group_name
  1033. - buddies
  1034. '404':
  1035. description: User or feedbag not found.
  1036. content:
  1037. application/json:
  1038. schema:
  1039. $ref: '#/components/schemas/MessageResponse'
  1040. '500':
  1041. description: Internal server error.
  1042. content:
  1043. application/json:
  1044. schema:
  1045. $ref: '#/components/schemas/MessageResponse'
  1046. /feedbag/{screen_name}/group/{group_name}:
  1047. put:
  1048. summary: Add a group to a user's feedbag
  1049. description: |
  1050. Create a new buddy list group in the user's feedbag. If the feedbag is empty,
  1051. the root group is created automatically. This operation is idempotent — if a
  1052. group with the same name already exists, the request succeeds and returns the
  1053. existing group.
  1054. parameters:
  1055. - name: screen_name
  1056. in: path
  1057. description: User's AIM screen name or ICQ UIN.
  1058. required: true
  1059. schema:
  1060. type: string
  1061. - name: group_name
  1062. in: path
  1063. description: The name of the group to add.
  1064. required: true
  1065. schema:
  1066. type: string
  1067. example: "Friends"
  1068. responses:
  1069. '200':
  1070. description: Group already exists. Operation is idempotent.
  1071. content:
  1072. application/json:
  1073. schema:
  1074. type: object
  1075. properties:
  1076. group_id:
  1077. type: integer
  1078. description: The group ID.
  1079. group_name:
  1080. type: string
  1081. description: The name of the group.
  1082. required:
  1083. - group_id
  1084. - group_name
  1085. '201':
  1086. description: Group created successfully.
  1087. content:
  1088. application/json:
  1089. schema:
  1090. type: object
  1091. properties:
  1092. group_id:
  1093. type: integer
  1094. description: The group ID.
  1095. group_name:
  1096. type: string
  1097. description: The name of the group.
  1098. required:
  1099. - group_id
  1100. - group_name
  1101. '400':
  1102. description: Bad request. Invalid input data.
  1103. content:
  1104. application/json:
  1105. schema:
  1106. $ref: '#/components/schemas/MessageResponse'
  1107. '404':
  1108. description: User not found.
  1109. content:
  1110. application/json:
  1111. schema:
  1112. $ref: '#/components/schemas/MessageResponse'
  1113. '500':
  1114. description: Internal server error.
  1115. content:
  1116. application/json:
  1117. schema:
  1118. $ref: '#/components/schemas/MessageResponse'
  1119. /feedbag/{screen_name}/group/{group_id}/buddy/{buddy_screen_name}:
  1120. put:
  1121. summary: Add a buddy to a group
  1122. 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.
  1123. parameters:
  1124. - name: screen_name
  1125. in: path
  1126. description: User's AIM screen name or ICQ UIN.
  1127. required: true
  1128. schema:
  1129. type: string
  1130. - name: group_id
  1131. in: path
  1132. description: The group ID to add the buddy to.
  1133. required: true
  1134. schema:
  1135. type: integer
  1136. - name: buddy_screen_name
  1137. in: path
  1138. description: The screen name of the buddy to add.
  1139. required: true
  1140. schema:
  1141. type: string
  1142. example: "buddy123"
  1143. responses:
  1144. '200':
  1145. description: Buddy added or already exists in the group. Operation is idempotent.
  1146. content:
  1147. application/json:
  1148. schema:
  1149. type: object
  1150. properties:
  1151. name:
  1152. type: string
  1153. description: The buddy's screen name.
  1154. group_id:
  1155. type: integer
  1156. description: The group ID the buddy was added to.
  1157. item_id:
  1158. type: integer
  1159. description: The feedbag item ID for this buddy.
  1160. required:
  1161. - name
  1162. - group_id
  1163. - item_id
  1164. '400':
  1165. description: Bad request. Invalid input data.
  1166. content:
  1167. application/json:
  1168. schema:
  1169. $ref: '#/components/schemas/MessageResponse'
  1170. '404':
  1171. description: User or group not found.
  1172. content:
  1173. application/json:
  1174. schema:
  1175. $ref: '#/components/schemas/MessageResponse'
  1176. '500':
  1177. description: Internal server error.
  1178. content:
  1179. application/json:
  1180. schema:
  1181. $ref: '#/components/schemas/MessageResponse'
  1182. delete:
  1183. summary: Delete a buddy from a group
  1184. description: Remove a buddy from a specific group in the user's feedbag.
  1185. parameters:
  1186. - name: screen_name
  1187. in: path
  1188. description: User's AIM screen name or ICQ UIN.
  1189. required: true
  1190. schema:
  1191. type: string
  1192. - name: group_id
  1193. in: path
  1194. description: The group ID to remove the buddy from.
  1195. required: true
  1196. schema:
  1197. type: integer
  1198. - name: buddy_screen_name
  1199. in: path
  1200. description: The screen name of the buddy to remove.
  1201. required: true
  1202. schema:
  1203. type: string
  1204. example: "buddy123"
  1205. responses:
  1206. '204':
  1207. description: Buddy deleted successfully.
  1208. '400':
  1209. description: Bad request. Invalid input data.
  1210. content:
  1211. application/json:
  1212. schema:
  1213. $ref: '#/components/schemas/MessageResponse'
  1214. '404':
  1215. description: User, group, or buddy not found.
  1216. content:
  1217. application/json:
  1218. schema:
  1219. $ref: '#/components/schemas/MessageResponse'
  1220. '500':
  1221. description: Internal server error.
  1222. content:
  1223. application/json:
  1224. schema:
  1225. $ref: '#/components/schemas/MessageResponse'
  1226. /user/{screenname}/linked-account:
  1227. get:
  1228. summary: List linked accounts for a screen name
  1229. description: Retrieve all linked accounts associated with a user.
  1230. parameters:
  1231. - in: path
  1232. name: screenname
  1233. schema:
  1234. type: string
  1235. description: User's AIM screen name or ICQ UIN.
  1236. required: true
  1237. responses:
  1238. '200':
  1239. description: Successful response containing linked accounts.
  1240. content:
  1241. application/json:
  1242. schema:
  1243. type: object
  1244. properties:
  1245. linked_accounts:
  1246. type: array
  1247. items:
  1248. type: string
  1249. description: List of linked screen names.
  1250. '404':
  1251. description: User not found.
  1252. content:
  1253. application/json:
  1254. schema:
  1255. $ref: '#/components/schemas/MessageResponse'
  1256. '500':
  1257. description: Internal server error.
  1258. content:
  1259. application/json:
  1260. schema:
  1261. $ref: '#/components/schemas/MessageResponse'
  1262. post:
  1263. summary: Add a linked account
  1264. description: Link a screen name to the specified primary user account.
  1265. parameters:
  1266. - in: path
  1267. name: screenname
  1268. schema:
  1269. type: string
  1270. description: User's AIM screen name or ICQ UIN.
  1271. required: true
  1272. requestBody:
  1273. required: true
  1274. content:
  1275. application/json:
  1276. schema:
  1277. type: object
  1278. required:
  1279. - linked_screen_name
  1280. properties:
  1281. linked_screen_name:
  1282. type: string
  1283. description: The screen name to link to the primary account.
  1284. example: "secondaryuser"
  1285. responses:
  1286. '201':
  1287. description: Linked account created successfully.
  1288. '400':
  1289. description: Invalid request body, or screen name cannot be linked to itself.
  1290. content:
  1291. application/json:
  1292. schema:
  1293. $ref: '#/components/schemas/MessageResponse'
  1294. '404':
  1295. description: Primary user or linked user not found.
  1296. content:
  1297. application/json:
  1298. schema:
  1299. $ref: '#/components/schemas/MessageResponse'
  1300. '409':
  1301. description: Linked account relationship already exists.
  1302. content:
  1303. application/json:
  1304. schema:
  1305. $ref: '#/components/schemas/MessageResponse'
  1306. '500':
  1307. description: Internal server error.
  1308. content:
  1309. application/json:
  1310. schema:
  1311. $ref: '#/components/schemas/MessageResponse'
  1312. /user/{screenname}/linked-account/{linked_screenname}:
  1313. delete:
  1314. summary: Remove a linked account
  1315. description: Remove the linked account relationship between a primary screen name and a linked screen name.
  1316. parameters:
  1317. - in: path
  1318. name: screenname
  1319. schema:
  1320. type: string
  1321. description: User's AIM screen name or ICQ UIN.
  1322. required: true
  1323. - in: path
  1324. name: linked_screenname
  1325. schema:
  1326. type: string
  1327. description: The linked screen name to remove.
  1328. required: true
  1329. responses:
  1330. '204':
  1331. description: Linked account removed successfully.
  1332. '404':
  1333. description: User or linked account not found.
  1334. content:
  1335. application/json:
  1336. schema:
  1337. $ref: '#/components/schemas/MessageResponse'
  1338. '500':
  1339. description: Internal server error.
  1340. content:
  1341. application/json:
  1342. schema:
  1343. $ref: '#/components/schemas/MessageResponse'
  1344. components:
  1345. schemas:
  1346. MessageResponse:
  1347. type: object
  1348. properties:
  1349. message:
  1350. type: string
  1351. description: Response message describing the result or error.
  1352. required:
  1353. - message
  1354. BARTType:
  1355. type: integer
  1356. enum: [ 0, 1, 2, 3, 4, 5, 6, 12, 13, 15, 96, 129, 131, 136, 137, 1024, 1026, 1027, 1028 ]
  1357. description: |
  1358. BART (Buddy ART) type identifier. Valid type IDs and their corresponding names:
  1359. - 0: buddy_icon_small (GIF/JPG/BMP, <= 32 pixels and 2k)
  1360. - 1: buddy_icon (GIF/JPG/BMP, <= 64 pixels and 7k)
  1361. - 2: status_str (StringTLV format; DATA flag is always set)
  1362. - 3: arrive_sound (WAV/MP3/MID, <= 10K)
  1363. - 4: rich_text (byte array of rich text codes; DATA flag is always set)
  1364. - 5: superbuddy_icon (XML)
  1365. - 6: radio_station (Opaque struct; DATA flag is always set)
  1366. - 12: buddy_icon_big (SWF)
  1367. - 13: status_str_tod (Time when the status string is set)
  1368. - 15: current_av_track (XML file; Data flag should not be set)
  1369. - 96: depart_sound (WAV/MP3/MID, <= 10K)
  1370. - 129: im_chrome (GIF/JPG/BMP wallpaper)
  1371. - 131: im_sound (WAV/MP3, <= 10K)
  1372. - 136: im_chrome_xml (XML)
  1373. - 137: im_chrome_immers (Immersive Expressions)
  1374. - 1024: emoticon_set (Set of default Emoticons)
  1375. - 1026: encr_cert_chain (Cert chain for encryption certs)
  1376. - 1027: sign_cert_chain (Cert chain for signing certs)
  1377. - 1028: gateway_cert (Cert for enterprise gateway)