api.yml 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391
  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. /bart:
  796. get:
  797. summary: Get BART entries by type
  798. description: Retrieve a list of BART (Buddy ART) entries for a specific type.
  799. parameters:
  800. - name: type
  801. in: query
  802. description: The BART type ID (integer).
  803. required: true
  804. schema:
  805. $ref: '#/components/schemas/BARTType'
  806. responses:
  807. '200':
  808. description: Successful response containing BART entries for the specified type.
  809. content:
  810. application/json:
  811. schema:
  812. type: array
  813. items:
  814. type: object
  815. properties:
  816. hash:
  817. type: string
  818. description: A hex value representing the BART asset hash.
  819. type:
  820. $ref: '#/components/schemas/BARTType'
  821. description: The BART type ID.
  822. required:
  823. - hash
  824. - type
  825. '400':
  826. description: Bad request. Missing or invalid type parameter.
  827. content:
  828. application/json:
  829. schema:
  830. $ref: '#/components/schemas/MessageResponse'
  831. '500':
  832. description: Internal server error.
  833. content:
  834. application/json:
  835. schema:
  836. $ref: '#/components/schemas/MessageResponse'
  837. /bart/{hash}:
  838. get:
  839. summary: Get BART asset data
  840. description: Retrieve the raw binary data for a specific BART asset.
  841. parameters:
  842. - name: hash
  843. in: path
  844. description: The hex hash value for the BART asset.
  845. required: true
  846. schema:
  847. type: string
  848. pattern: '^[0-9a-fA-F]+$'
  849. responses:
  850. '200':
  851. description: Successful response containing the raw BART asset data.
  852. content:
  853. application/octet-stream:
  854. schema:
  855. type: string
  856. format: binary
  857. '400':
  858. description: Bad request. Missing or invalid hash parameter.
  859. content:
  860. application/json:
  861. schema:
  862. $ref: '#/components/schemas/MessageResponse'
  863. '404':
  864. description: BART asset not found.
  865. content:
  866. application/json:
  867. schema:
  868. $ref: '#/components/schemas/MessageResponse'
  869. '500':
  870. description: Internal server error.
  871. content:
  872. application/json:
  873. schema:
  874. $ref: '#/components/schemas/MessageResponse'
  875. post:
  876. summary: Upload a BART asset
  877. description: Upload a Buddy ART asset with the specified hash and type.
  878. parameters:
  879. - name: hash
  880. in: path
  881. description: The hex hash value for the BART asset.
  882. required: true
  883. schema:
  884. type: string
  885. pattern: '^[0-9a-fA-F]+$'
  886. - name: type
  887. in: query
  888. description: The BART type ID (integer).
  889. required: true
  890. schema:
  891. $ref: '#/components/schemas/BARTType'
  892. requestBody:
  893. required: true
  894. content:
  895. application/octet-stream:
  896. schema:
  897. type: string
  898. format: binary
  899. description: Raw bytes of the BART asset
  900. responses:
  901. '201':
  902. description: BART asset uploaded successfully.
  903. content:
  904. application/json:
  905. schema:
  906. type: object
  907. properties:
  908. hash:
  909. type: string
  910. description: A hex value representing the BART asset hash.
  911. type:
  912. $ref: '#/components/schemas/BARTType'
  913. description: The BART type ID.
  914. required:
  915. - hash
  916. - type
  917. '400':
  918. description: Bad request. Invalid type format, hash format, or failed to read request body.
  919. content:
  920. application/json:
  921. schema:
  922. $ref: '#/components/schemas/MessageResponse'
  923. '409':
  924. description: Conflict. BART asset already exists.
  925. content:
  926. application/json:
  927. schema:
  928. $ref: '#/components/schemas/MessageResponse'
  929. '413':
  930. description: Payload too large. Asset exceeds size limits for the specified type.
  931. content:
  932. application/json:
  933. schema:
  934. $ref: '#/components/schemas/MessageResponse'
  935. '500':
  936. description: Internal server error.
  937. content:
  938. application/json:
  939. schema:
  940. $ref: '#/components/schemas/MessageResponse'
  941. delete:
  942. summary: Delete a BART asset
  943. description: Delete a BART asset with the specified hash.
  944. parameters:
  945. - name: hash
  946. in: path
  947. description: The hex hash value for the BART asset.
  948. required: true
  949. schema:
  950. type: string
  951. pattern: '^[0-9a-fA-F]+$'
  952. responses:
  953. '200':
  954. description: BART asset deleted successfully.
  955. content:
  956. application/json:
  957. schema:
  958. $ref: '#/components/schemas/MessageResponse'
  959. '400':
  960. description: Bad request. Missing or invalid hash parameter.
  961. content:
  962. application/json:
  963. schema:
  964. $ref: '#/components/schemas/MessageResponse'
  965. '404':
  966. description: BART asset not found.
  967. content:
  968. application/json:
  969. schema:
  970. $ref: '#/components/schemas/MessageResponse'
  971. '500':
  972. description: Internal server error.
  973. content:
  974. application/json:
  975. schema:
  976. $ref: '#/components/schemas/MessageResponse'
  977. /feedbag/{screen_name}/group:
  978. get:
  979. summary: Get buddy list for a user
  980. description: Retrieve all buddies for a user, grouped by group ID.
  981. parameters:
  982. - name: screen_name
  983. in: path
  984. description: User's AIM screen name or ICQ UIN.
  985. required: true
  986. schema:
  987. type: string
  988. responses:
  989. '200':
  990. description: Successful response containing buddy list grouped by group ID.
  991. content:
  992. application/json:
  993. schema:
  994. type: array
  995. description: List of buddy groups.
  996. items:
  997. type: object
  998. properties:
  999. group_id:
  1000. type: integer
  1001. description: The group ID.
  1002. group_name:
  1003. type: string
  1004. description: The name of the group.
  1005. buddies:
  1006. type: array
  1007. description: List of buddies in this group.
  1008. items:
  1009. type: object
  1010. properties:
  1011. name:
  1012. type: string
  1013. description: The buddy's screen name.
  1014. item_id:
  1015. type: integer
  1016. description: The feedbag item ID for this buddy.
  1017. required:
  1018. - group_id
  1019. - group_name
  1020. - buddies
  1021. '404':
  1022. description: User or feedbag not found.
  1023. content:
  1024. application/json:
  1025. schema:
  1026. $ref: '#/components/schemas/MessageResponse'
  1027. '500':
  1028. description: Internal server error.
  1029. content:
  1030. application/json:
  1031. schema:
  1032. $ref: '#/components/schemas/MessageResponse'
  1033. /feedbag/{screen_name}/group/{group_name}:
  1034. put:
  1035. summary: Add a group to a user's feedbag
  1036. description: |
  1037. Create a new buddy list group in the user's feedbag. If the feedbag is empty,
  1038. the root group is created automatically. This operation is idempotent — if a
  1039. group with the same name already exists, the request succeeds and returns the
  1040. existing group.
  1041. parameters:
  1042. - name: screen_name
  1043. in: path
  1044. description: User's AIM screen name or ICQ UIN.
  1045. required: true
  1046. schema:
  1047. type: string
  1048. - name: group_name
  1049. in: path
  1050. description: The name of the group to add.
  1051. required: true
  1052. schema:
  1053. type: string
  1054. example: "Friends"
  1055. responses:
  1056. '200':
  1057. description: Group already exists. Operation is idempotent.
  1058. content:
  1059. application/json:
  1060. schema:
  1061. type: object
  1062. properties:
  1063. group_id:
  1064. type: integer
  1065. description: The group ID.
  1066. group_name:
  1067. type: string
  1068. description: The name of the group.
  1069. required:
  1070. - group_id
  1071. - group_name
  1072. '201':
  1073. description: Group created successfully.
  1074. content:
  1075. application/json:
  1076. schema:
  1077. type: object
  1078. properties:
  1079. group_id:
  1080. type: integer
  1081. description: The group ID.
  1082. group_name:
  1083. type: string
  1084. description: The name of the group.
  1085. required:
  1086. - group_id
  1087. - group_name
  1088. '400':
  1089. description: Bad request. Invalid input data.
  1090. content:
  1091. application/json:
  1092. schema:
  1093. $ref: '#/components/schemas/MessageResponse'
  1094. '404':
  1095. description: User not found.
  1096. content:
  1097. application/json:
  1098. schema:
  1099. $ref: '#/components/schemas/MessageResponse'
  1100. '500':
  1101. description: Internal server error.
  1102. content:
  1103. application/json:
  1104. schema:
  1105. $ref: '#/components/schemas/MessageResponse'
  1106. /feedbag/{screen_name}/group/{group_id}/buddy/{buddy_screen_name}:
  1107. put:
  1108. summary: Add a buddy to a group
  1109. 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.
  1110. parameters:
  1111. - name: screen_name
  1112. in: path
  1113. description: User's AIM screen name or ICQ UIN.
  1114. required: true
  1115. schema:
  1116. type: string
  1117. - name: group_id
  1118. in: path
  1119. description: The group ID to add the buddy to.
  1120. required: true
  1121. schema:
  1122. type: integer
  1123. - name: buddy_screen_name
  1124. in: path
  1125. description: The screen name of the buddy to add.
  1126. required: true
  1127. schema:
  1128. type: string
  1129. example: "buddy123"
  1130. responses:
  1131. '200':
  1132. description: Buddy added or already exists in the group. Operation is idempotent.
  1133. content:
  1134. application/json:
  1135. schema:
  1136. type: object
  1137. properties:
  1138. name:
  1139. type: string
  1140. description: The buddy's screen name.
  1141. group_id:
  1142. type: integer
  1143. description: The group ID the buddy was added to.
  1144. item_id:
  1145. type: integer
  1146. description: The feedbag item ID for this buddy.
  1147. required:
  1148. - name
  1149. - group_id
  1150. - item_id
  1151. '400':
  1152. description: Bad request. Invalid input data.
  1153. content:
  1154. application/json:
  1155. schema:
  1156. $ref: '#/components/schemas/MessageResponse'
  1157. '404':
  1158. description: User or group not found.
  1159. content:
  1160. application/json:
  1161. schema:
  1162. $ref: '#/components/schemas/MessageResponse'
  1163. '500':
  1164. description: Internal server error.
  1165. content:
  1166. application/json:
  1167. schema:
  1168. $ref: '#/components/schemas/MessageResponse'
  1169. delete:
  1170. summary: Delete a buddy from a group
  1171. description: Remove a buddy from a specific group in the user's feedbag.
  1172. parameters:
  1173. - name: screen_name
  1174. in: path
  1175. description: User's AIM screen name or ICQ UIN.
  1176. required: true
  1177. schema:
  1178. type: string
  1179. - name: group_id
  1180. in: path
  1181. description: The group ID to remove the buddy from.
  1182. required: true
  1183. schema:
  1184. type: integer
  1185. - name: buddy_screen_name
  1186. in: path
  1187. description: The screen name of the buddy to remove.
  1188. required: true
  1189. schema:
  1190. type: string
  1191. example: "buddy123"
  1192. responses:
  1193. '204':
  1194. description: Buddy deleted successfully.
  1195. '400':
  1196. description: Bad request. Invalid input data.
  1197. content:
  1198. application/json:
  1199. schema:
  1200. $ref: '#/components/schemas/MessageResponse'
  1201. '404':
  1202. description: User, group, or buddy not found.
  1203. content:
  1204. application/json:
  1205. schema:
  1206. $ref: '#/components/schemas/MessageResponse'
  1207. '500':
  1208. description: Internal server error.
  1209. content:
  1210. application/json:
  1211. schema:
  1212. $ref: '#/components/schemas/MessageResponse'
  1213. /user/{screenname}/linked-account:
  1214. get:
  1215. summary: List linked accounts for a screen name
  1216. description: Retrieve all linked accounts associated with a user.
  1217. parameters:
  1218. - in: path
  1219. name: screenname
  1220. schema:
  1221. type: string
  1222. description: User's AIM screen name or ICQ UIN.
  1223. required: true
  1224. responses:
  1225. '200':
  1226. description: Successful response containing linked accounts.
  1227. content:
  1228. application/json:
  1229. schema:
  1230. type: object
  1231. properties:
  1232. linked_accounts:
  1233. type: array
  1234. items:
  1235. type: string
  1236. description: List of linked screen names.
  1237. '404':
  1238. description: User not found.
  1239. content:
  1240. application/json:
  1241. schema:
  1242. $ref: '#/components/schemas/MessageResponse'
  1243. '500':
  1244. description: Internal server error.
  1245. content:
  1246. application/json:
  1247. schema:
  1248. $ref: '#/components/schemas/MessageResponse'
  1249. post:
  1250. summary: Add a linked account
  1251. description: Link a screen name to the specified primary user account.
  1252. parameters:
  1253. - in: path
  1254. name: screenname
  1255. schema:
  1256. type: string
  1257. description: User's AIM screen name or ICQ UIN.
  1258. required: true
  1259. requestBody:
  1260. required: true
  1261. content:
  1262. application/json:
  1263. schema:
  1264. type: object
  1265. required:
  1266. - linked_screen_name
  1267. properties:
  1268. linked_screen_name:
  1269. type: string
  1270. description: The screen name to link to the primary account.
  1271. example: "secondaryuser"
  1272. responses:
  1273. '201':
  1274. description: Linked account created successfully.
  1275. '400':
  1276. description: Invalid request body, or screen name cannot be linked to itself.
  1277. content:
  1278. application/json:
  1279. schema:
  1280. $ref: '#/components/schemas/MessageResponse'
  1281. '404':
  1282. description: Primary user or linked user not found.
  1283. content:
  1284. application/json:
  1285. schema:
  1286. $ref: '#/components/schemas/MessageResponse'
  1287. '409':
  1288. description: Linked account relationship already exists.
  1289. content:
  1290. application/json:
  1291. schema:
  1292. $ref: '#/components/schemas/MessageResponse'
  1293. '500':
  1294. description: Internal server error.
  1295. content:
  1296. application/json:
  1297. schema:
  1298. $ref: '#/components/schemas/MessageResponse'
  1299. /user/{screenname}/linked-account/{linked_screenname}:
  1300. delete:
  1301. summary: Remove a linked account
  1302. description: Remove the linked account relationship between a primary screen name and a linked screen name.
  1303. parameters:
  1304. - in: path
  1305. name: screenname
  1306. schema:
  1307. type: string
  1308. description: User's AIM screen name or ICQ UIN.
  1309. required: true
  1310. - in: path
  1311. name: linked_screenname
  1312. schema:
  1313. type: string
  1314. description: The linked screen name to remove.
  1315. required: true
  1316. responses:
  1317. '204':
  1318. description: Linked account removed successfully.
  1319. '404':
  1320. description: User or linked account not found.
  1321. content:
  1322. application/json:
  1323. schema:
  1324. $ref: '#/components/schemas/MessageResponse'
  1325. '500':
  1326. description: Internal server error.
  1327. content:
  1328. application/json:
  1329. schema:
  1330. $ref: '#/components/schemas/MessageResponse'
  1331. components:
  1332. schemas:
  1333. MessageResponse:
  1334. type: object
  1335. properties:
  1336. message:
  1337. type: string
  1338. description: Response message describing the result or error.
  1339. required:
  1340. - message
  1341. BARTType:
  1342. type: integer
  1343. enum: [ 0, 1, 2, 3, 4, 5, 6, 12, 13, 15, 96, 129, 131, 136, 137, 1024, 1026, 1027, 1028 ]
  1344. description: |
  1345. BART (Buddy ART) type identifier. Valid type IDs and their corresponding names:
  1346. - 0: buddy_icon_small (GIF/JPG/BMP, <= 32 pixels and 2k)
  1347. - 1: buddy_icon (GIF/JPG/BMP, <= 64 pixels and 7k)
  1348. - 2: status_str (StringTLV format; DATA flag is always set)
  1349. - 3: arrive_sound (WAV/MP3/MID, <= 10K)
  1350. - 4: rich_text (byte array of rich text codes; DATA flag is always set)
  1351. - 5: superbuddy_icon (XML)
  1352. - 6: radio_station (Opaque struct; DATA flag is always set)
  1353. - 12: buddy_icon_big (SWF)
  1354. - 13: status_str_tod (Time when the status string is set)
  1355. - 15: current_av_track (XML file; Data flag should not be set)
  1356. - 96: depart_sound (WAV/MP3/MID, <= 10K)
  1357. - 129: im_chrome (GIF/JPG/BMP wallpaper)
  1358. - 131: im_sound (WAV/MP3, <= 10K)
  1359. - 136: im_chrome_xml (XML)
  1360. - 137: im_chrome_immers (Immersive Expressions)
  1361. - 1024: emoticon_set (Set of default Emoticons)
  1362. - 1026: encr_cert_chain (Cert chain for encryption certs)
  1363. - 1027: sign_cert_chain (Cert chain for signing certs)
  1364. - 1028: gateway_cert (Cert for enterprise gateway)