api.yml 50 KB

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