api.yml 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  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: number
  225. description: Number of seconds this user session has been online.
  226. away_message:
  227. type: string
  228. description: User's AIM away message HTML. Empty if the user is not away.
  229. idle_seconds:
  230. type: number
  231. description: Number of seconds this user session has been idle. 0 if not idle.
  232. is_icq:
  233. type: boolean
  234. description: If true, indicates an ICQ user instead of an AIM user.
  235. remote_addr:
  236. type: string
  237. description: Remote IP address of the user's connection to BOS or TOC
  238. remote_port:
  239. type: integer
  240. description: Remote port number of the user's connection to BOS or TOC
  241. /session/{screenname}:
  242. get:
  243. summary: Get active sessions for a given screen name or UIN.
  244. description: Retrieve a list of active sessions of a specific logged in user.
  245. parameters:
  246. - in: path
  247. name: screenname
  248. schema:
  249. type: string
  250. description: User's AIM screen name or ICQ UIN.
  251. required: true
  252. responses:
  253. '200':
  254. description: Successful response containing a list of active sessions for the given screen name
  255. content:
  256. application/json:
  257. schema:
  258. type: object
  259. properties:
  260. count:
  261. type: integer
  262. description: The number of active sessions.
  263. sessions:
  264. type: array
  265. items:
  266. type: object
  267. properties:
  268. id:
  269. type: string
  270. description: User's unique identifier.
  271. screen_name:
  272. type: string
  273. description: User's AIM screen name or ICQ UIN.
  274. online_seconds:
  275. type: number
  276. description: Number of seconds this user session has been online.
  277. away_message:
  278. type: string
  279. description: User's AIM away message HTML. Empty if the user is not away.
  280. idle_seconds:
  281. type: number
  282. description: Number of seconds this user session has been idle. 0 if not idle.
  283. is_icq:
  284. type: boolean
  285. description: If true, indicates an ICQ user instead of an AIM user.
  286. remote_addr:
  287. type: string
  288. description: Remote IP address of the user's connection to BOS or TOC
  289. remote_port:
  290. type: integer
  291. description: Remote port number of the user's connection to BOS or TOC
  292. '404':
  293. description: User not found.
  294. delete:
  295. summary: Delete active sessions for a given screen name or UIN.
  296. description: Disconnect any active sessions of a specific logged in user.
  297. parameters:
  298. - in: path
  299. name: screenname
  300. schema:
  301. type: string
  302. description: User's AIM screen name or ICQ UIN.
  303. required: true
  304. responses:
  305. '204':
  306. description: Session deleted successfully
  307. '404':
  308. description: Session not found
  309. /user/password:
  310. put:
  311. summary: Set a user's password
  312. description: Update the password for a user specified by their screen name or ICQ UIN.
  313. requestBody:
  314. required: true
  315. content:
  316. application/json:
  317. schema:
  318. type: object
  319. required:
  320. - screen_name
  321. - password
  322. properties:
  323. screen_name:
  324. type: string
  325. description: The AIM screen name or ICQ UIN of the user whose password is to be updated.
  326. password:
  327. type: string
  328. description: The new password for the user.
  329. responses:
  330. '204':
  331. description: Password updated successfully.
  332. '400':
  333. description: Bad request. Invalid input data.
  334. '404':
  335. description: User not found.
  336. /chat/room/public:
  337. get:
  338. summary: List all public AIM chat rooms
  339. description: Retrieve a list of all public AIM chat rooms in exchange 5.
  340. responses:
  341. '200':
  342. description: Successful response containing a list of chat rooms.
  343. content:
  344. application/json:
  345. schema:
  346. type: array
  347. items:
  348. type: object
  349. properties:
  350. name:
  351. type: string
  352. description: Name of the chat room.
  353. create_time:
  354. type: string
  355. format: date-time
  356. description: The timestamp when the chat room was created.
  357. participants:
  358. type: array
  359. description: List of participants in the chat room.
  360. items:
  361. type: object
  362. properties:
  363. id:
  364. type: string
  365. description: User's unique identifier.
  366. screen_name:
  367. type: string
  368. description: User's AIM screen name.
  369. post:
  370. summary: Create a new public chat room
  371. description: Create a new public chat room in exchange 5.
  372. requestBody:
  373. required: true
  374. content:
  375. application/json:
  376. schema:
  377. type: object
  378. properties:
  379. name:
  380. type: string
  381. description: Name of the chat room.
  382. responses:
  383. '201':
  384. description: Chat room created successfully.
  385. '400':
  386. description: Bad request. Invalid input data.
  387. '409':
  388. description: Chat room already exists.
  389. delete:
  390. summary: Delete public chat rooms
  391. description: Delete one or more public chat rooms in exchange 5.
  392. requestBody:
  393. required: true
  394. content:
  395. application/json:
  396. schema:
  397. type: object
  398. required:
  399. - names
  400. properties:
  401. names:
  402. type: array
  403. description: List of chat room names to delete.
  404. items:
  405. type: string
  406. responses:
  407. '204':
  408. description: Chat rooms deleted successfully.
  409. '400':
  410. description: Bad request. Invalid input data.
  411. '500':
  412. description: Internal server error.
  413. /chat/room/private:
  414. get:
  415. summary: List all private AIM chat rooms
  416. description: Retrieve a list of all private AIM chat rooms in exchange 4.
  417. responses:
  418. '200':
  419. description: Successful response containing a list of chat rooms.
  420. content:
  421. application/json:
  422. schema:
  423. type: array
  424. items:
  425. type: object
  426. properties:
  427. name:
  428. type: string
  429. description: Name of the chat room.
  430. create_time:
  431. type: string
  432. format: date-time
  433. description: The timestamp when the chat room was created.
  434. creator_id:
  435. type: string
  436. description: The chat room creator user ID.
  437. participants:
  438. type: array
  439. description: List of participants in the chat room.
  440. items:
  441. type: object
  442. properties:
  443. id:
  444. type: string
  445. description: User's unique identifier.
  446. screen_name:
  447. type: string
  448. description: User's AIM screen name.
  449. /instant-message:
  450. post:
  451. summary: Send an instant message
  452. 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.
  453. requestBody:
  454. required: true
  455. content:
  456. application/json:
  457. schema:
  458. type: object
  459. properties:
  460. from:
  461. type: string
  462. description: The AIM screen name or ICQ UIN of the sender.
  463. to:
  464. type: string
  465. description: The AIM screen name or ICQ UIN of the recipient.
  466. text:
  467. type: string
  468. description: The text content of the message.
  469. responses:
  470. '200':
  471. description: Message sent successfully.
  472. '400':
  473. description: Bad request. Invalid input data.
  474. /version:
  475. get:
  476. summary: Get build information of RAS.
  477. description: Retrieve the build version, git commit, and build date of the running RAS binary.
  478. responses:
  479. '200':
  480. description: Successful response containing the build information.
  481. content:
  482. application/json:
  483. schema:
  484. type: object
  485. properties:
  486. version:
  487. type: string
  488. description: The release version number.
  489. commit:
  490. type: string
  491. description: The latest git commit hash in this build.
  492. date:
  493. type: string
  494. description: The build date and timestamp in RFC3339 format.
  495. /directory/category:
  496. get:
  497. summary: Get all keyword categories
  498. description: Retrieve a list of all keyword categories.
  499. responses:
  500. '200':
  501. description: Successful response containing a list of keyword categories.
  502. content:
  503. application/json:
  504. schema:
  505. type: array
  506. items:
  507. type: object
  508. properties:
  509. id:
  510. type: integer
  511. description: The unique identifier of the keyword category.
  512. name:
  513. type: string
  514. description: The name of the keyword category.
  515. post:
  516. summary: Create a new keyword category
  517. description: Create a new keyword category.
  518. requestBody:
  519. required: true
  520. content:
  521. application/json:
  522. schema:
  523. type: object
  524. required:
  525. - name
  526. properties:
  527. name:
  528. type: string
  529. description: The name of the keyword category.
  530. responses:
  531. '201':
  532. description: Keyword category created successfully.
  533. content:
  534. application/json:
  535. schema:
  536. type: object
  537. properties:
  538. id:
  539. type: integer
  540. description: The keyword category ID.
  541. name:
  542. type: string
  543. description: The name of the keyword category.
  544. '400':
  545. description: Malformed input body.
  546. content:
  547. application/json:
  548. schema:
  549. type: object
  550. properties:
  551. message:
  552. type: string
  553. '409':
  554. description: A category with the specified name already exists.
  555. content:
  556. application/json:
  557. schema:
  558. type: object
  559. properties:
  560. message:
  561. type: string
  562. /directory/category/{id}:
  563. delete:
  564. summary: Delete a keyword category
  565. description: Delete a keyword category specified by its ID.
  566. parameters:
  567. - name: id
  568. in: path
  569. description: The ID of the keyword category.
  570. required: true
  571. schema:
  572. type: integer
  573. responses:
  574. '204':
  575. description: Keyword category deleted successfully.
  576. '400':
  577. description: Invalid category ID.
  578. content:
  579. application/json:
  580. schema:
  581. type: object
  582. properties:
  583. message:
  584. type: string
  585. '404':
  586. description: Keyword category not found.
  587. content:
  588. application/json:
  589. schema:
  590. type: object
  591. properties:
  592. message:
  593. type: string
  594. '409':
  595. description: The keyword category is currently in use and cannot be deleted.
  596. content:
  597. application/json:
  598. schema:
  599. type: object
  600. properties:
  601. message:
  602. type: string
  603. /directory/category/{id}/keyword:
  604. get:
  605. summary: Get all keywords in a category
  606. description: Retrieve a list of all keywords in the specified category.
  607. parameters:
  608. - name: id
  609. in: path
  610. description: The ID of the keyword category.
  611. required: true
  612. schema:
  613. type: integer
  614. responses:
  615. '200':
  616. description: Successful response containing a list of keywords.
  617. content:
  618. application/json:
  619. schema:
  620. type: array
  621. items:
  622. type: object
  623. properties:
  624. id:
  625. type: integer
  626. description: The unique identifier of the keyword.
  627. name:
  628. type: string
  629. description: The name of the keyword.
  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. /directory/keyword:
  649. post:
  650. summary: Create a new keyword.
  651. description: Create a new keyword in a category.
  652. requestBody:
  653. required: true
  654. content:
  655. application/json:
  656. schema:
  657. type: object
  658. required:
  659. - category_id
  660. - name
  661. properties:
  662. category_id:
  663. type: integer
  664. description: The ID of the parent keyword category.
  665. name:
  666. type: string
  667. description: The name of the keyword.
  668. responses:
  669. '201':
  670. description: Keyword created successfully.
  671. content:
  672. application/json:
  673. schema:
  674. type: object
  675. properties:
  676. id:
  677. type: integer
  678. description: The keyword ID.
  679. name:
  680. type: string
  681. description: The name of the keyword.
  682. '400':
  683. description: Malformed input body.
  684. content:
  685. application/json:
  686. schema:
  687. type: object
  688. properties:
  689. message:
  690. type: string
  691. '404':
  692. description: Parent keyword category not found.
  693. content:
  694. application/json:
  695. schema:
  696. type: object
  697. properties:
  698. message:
  699. type: string
  700. '409':
  701. description: A keyword with the specified name already exists.
  702. content:
  703. application/json:
  704. schema:
  705. type: object
  706. properties:
  707. message:
  708. type: string
  709. /directory/keyword/{id}:
  710. delete:
  711. summary: Delete a keyword
  712. description: Delete a keyword specified by its ID.
  713. parameters:
  714. - name: id
  715. in: path
  716. description: The ID of the keyword.
  717. required: true
  718. schema:
  719. type: integer
  720. responses:
  721. '204':
  722. description: Keyword deleted successfully.
  723. '404':
  724. description: Keyword not found.
  725. content:
  726. application/json:
  727. schema:
  728. type: object
  729. properties:
  730. message:
  731. type: string
  732. '409':
  733. description: Conflict. The keyword is currently in use and cannot be deleted.
  734. content:
  735. application/json:
  736. schema:
  737. type: object
  738. properties:
  739. message:
  740. type: string
  741. /admin/webapi/keys:
  742. get:
  743. summary: List all Web API keys
  744. description: Retrieve a list of all Web API keys for the Web AIM API.
  745. tags: [Web API Management]
  746. responses:
  747. '200':
  748. description: Successful response containing a list of API keys.
  749. content:
  750. application/json:
  751. schema:
  752. type: array
  753. items:
  754. $ref: '#/components/schemas/WebAPIKey'
  755. '500':
  756. description: Internal server error.
  757. content:
  758. application/json:
  759. schema:
  760. $ref: '#/components/schemas/MessageResponse'
  761. post:
  762. summary: Create a new Web API key
  763. description: Create a new API key for Web AIM API authentication.
  764. tags: [Web API Management]
  765. requestBody:
  766. required: true
  767. content:
  768. application/json:
  769. schema:
  770. type: object
  771. required:
  772. - app_name
  773. properties:
  774. app_name:
  775. type: string
  776. description: Name of the application using this API key.
  777. example: "My Web AIM Client"
  778. allowed_origins:
  779. type: array
  780. items:
  781. type: string
  782. description: List of allowed CORS origins. Empty list allows all origins (useful for mobile apps).
  783. example: ["https://example.com", "https://app.example.com"]
  784. rate_limit:
  785. type: integer
  786. description: Maximum requests per minute allowed for this key.
  787. default: 60
  788. example: 120
  789. capabilities:
  790. type: array
  791. items:
  792. type: string
  793. description: List of capabilities/features enabled for this key. Empty list allows all capabilities.
  794. example: ["aim.session", "presence.get", "im.send"]
  795. responses:
  796. '201':
  797. description: API key created successfully.
  798. content:
  799. application/json:
  800. schema:
  801. allOf:
  802. - $ref: '#/components/schemas/WebAPIKey'
  803. - type: object
  804. properties:
  805. dev_key:
  806. type: string
  807. description: The actual API key value. This is only shown once at creation time.
  808. example: "a1b2c3d4e5f6789012345678901234567890123456789012345678901234"
  809. '400':
  810. description: Bad request. Invalid input data.
  811. content:
  812. application/json:
  813. schema:
  814. $ref: '#/components/schemas/MessageResponse'
  815. '409':
  816. description: Conflict. An API key with this ID already exists.
  817. content:
  818. application/json:
  819. schema:
  820. $ref: '#/components/schemas/MessageResponse'
  821. '500':
  822. description: Internal server error.
  823. content:
  824. application/json:
  825. schema:
  826. $ref: '#/components/schemas/MessageResponse'
  827. /admin/webapi/keys/{id}:
  828. get:
  829. summary: Get a specific Web API key
  830. description: Retrieve details of a specific Web API key by its developer ID.
  831. tags: [Web API Management]
  832. parameters:
  833. - name: id
  834. in: path
  835. description: The developer ID of the API key.
  836. required: true
  837. schema:
  838. type: string
  839. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  840. responses:
  841. '200':
  842. description: Successful response containing the API key details.
  843. content:
  844. application/json:
  845. schema:
  846. $ref: '#/components/schemas/WebAPIKey'
  847. '404':
  848. description: API key not found.
  849. content:
  850. application/json:
  851. schema:
  852. $ref: '#/components/schemas/MessageResponse'
  853. '500':
  854. description: Internal server error.
  855. content:
  856. application/json:
  857. schema:
  858. $ref: '#/components/schemas/MessageResponse'
  859. put:
  860. summary: Update a Web API key
  861. description: Update settings for an existing Web API key.
  862. tags: [Web API Management]
  863. parameters:
  864. - name: id
  865. in: path
  866. description: The developer ID of the API key.
  867. required: true
  868. schema:
  869. type: string
  870. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  871. requestBody:
  872. required: true
  873. content:
  874. application/json:
  875. schema:
  876. type: object
  877. properties:
  878. app_name:
  879. type: string
  880. description: New application name.
  881. is_active:
  882. type: boolean
  883. description: Enable or disable the API key.
  884. rate_limit:
  885. type: integer
  886. description: New rate limit (requests per minute).
  887. allowed_origins:
  888. type: array
  889. items:
  890. type: string
  891. description: New list of allowed CORS origins.
  892. capabilities:
  893. type: array
  894. items:
  895. type: string
  896. description: New list of enabled capabilities.
  897. responses:
  898. '200':
  899. description: API key updated successfully.
  900. content:
  901. application/json:
  902. schema:
  903. $ref: '#/components/schemas/WebAPIKey'
  904. '404':
  905. description: API key not found.
  906. content:
  907. application/json:
  908. schema:
  909. $ref: '#/components/schemas/MessageResponse'
  910. '500':
  911. description: Internal server error.
  912. content:
  913. application/json:
  914. schema:
  915. $ref: '#/components/schemas/MessageResponse'
  916. delete:
  917. summary: Delete a Web API key
  918. description: Permanently delete a Web API key.
  919. tags: [Web API Management]
  920. parameters:
  921. - name: id
  922. in: path
  923. description: The developer ID of the API key.
  924. required: true
  925. schema:
  926. type: string
  927. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  928. responses:
  929. '204':
  930. description: API key deleted successfully.
  931. '404':
  932. description: API key not found.
  933. content:
  934. application/json:
  935. schema:
  936. $ref: '#/components/schemas/MessageResponse'
  937. '500':
  938. description: Internal server error.
  939. content:
  940. application/json:
  941. schema:
  942. $ref: '#/components/schemas/MessageResponse'
  943. /bart:
  944. get:
  945. summary: Get BART entries by type
  946. description: Retrieve a list of BART (Buddy ART) entries for a specific type.
  947. parameters:
  948. - name: type
  949. in: query
  950. description: The BART type ID (integer).
  951. required: true
  952. schema:
  953. $ref: '#/components/schemas/BARTType'
  954. responses:
  955. '200':
  956. description: Successful response containing BART entries for the specified type.
  957. content:
  958. application/json:
  959. schema:
  960. type: array
  961. items:
  962. type: object
  963. properties:
  964. hash:
  965. type: string
  966. description: A hex value representing the BART asset hash.
  967. type:
  968. $ref: '#/components/schemas/BARTType'
  969. description: The BART type ID.
  970. required:
  971. - hash
  972. - type
  973. '400':
  974. description: Bad request. Missing or invalid type parameter.
  975. content:
  976. application/json:
  977. schema:
  978. $ref: '#/components/schemas/MessageResponse'
  979. '500':
  980. description: Internal server error.
  981. content:
  982. application/json:
  983. schema:
  984. $ref: '#/components/schemas/MessageResponse'
  985. /bart/{hash}:
  986. get:
  987. summary: Get BART asset data
  988. description: Retrieve the raw binary data for a specific BART asset.
  989. parameters:
  990. - name: hash
  991. in: path
  992. description: The hex hash value for the BART asset.
  993. required: true
  994. schema:
  995. type: string
  996. pattern: '^[0-9a-fA-F]+$'
  997. responses:
  998. '200':
  999. description: Successful response containing the raw BART asset data.
  1000. content:
  1001. application/octet-stream:
  1002. schema:
  1003. type: string
  1004. format: binary
  1005. '400':
  1006. description: Bad request. Missing or invalid hash parameter.
  1007. content:
  1008. application/json:
  1009. schema:
  1010. $ref: '#/components/schemas/MessageResponse'
  1011. '404':
  1012. description: BART asset not found.
  1013. content:
  1014. application/json:
  1015. schema:
  1016. $ref: '#/components/schemas/MessageResponse'
  1017. '500':
  1018. description: Internal server error.
  1019. content:
  1020. application/json:
  1021. schema:
  1022. $ref: '#/components/schemas/MessageResponse'
  1023. post:
  1024. summary: Upload a BART asset
  1025. description: Upload a Buddy ART asset with the specified hash and type.
  1026. parameters:
  1027. - name: hash
  1028. in: path
  1029. description: The hex hash value for the BART asset.
  1030. required: true
  1031. schema:
  1032. type: string
  1033. pattern: '^[0-9a-fA-F]+$'
  1034. - name: type
  1035. in: query
  1036. description: The BART type ID (integer).
  1037. required: true
  1038. schema:
  1039. $ref: '#/components/schemas/BARTType'
  1040. requestBody:
  1041. required: true
  1042. content:
  1043. application/octet-stream:
  1044. schema:
  1045. type: string
  1046. format: binary
  1047. description: Raw bytes of the BART asset
  1048. responses:
  1049. '201':
  1050. description: BART asset uploaded successfully.
  1051. content:
  1052. application/json:
  1053. schema:
  1054. type: object
  1055. properties:
  1056. hash:
  1057. type: string
  1058. description: A hex value representing the BART asset hash.
  1059. type:
  1060. $ref: '#/components/schemas/BARTType'
  1061. description: The BART type ID.
  1062. required:
  1063. - hash
  1064. - type
  1065. '400':
  1066. description: Bad request. Invalid type format, hash format, or failed to read request body.
  1067. content:
  1068. application/json:
  1069. schema:
  1070. $ref: '#/components/schemas/MessageResponse'
  1071. '409':
  1072. description: Conflict. BART asset already exists.
  1073. content:
  1074. application/json:
  1075. schema:
  1076. $ref: '#/components/schemas/MessageResponse'
  1077. '413':
  1078. description: Payload too large. Asset exceeds size limits for the specified type.
  1079. content:
  1080. application/json:
  1081. schema:
  1082. $ref: '#/components/schemas/MessageResponse'
  1083. '500':
  1084. description: Internal server error.
  1085. content:
  1086. application/json:
  1087. schema:
  1088. $ref: '#/components/schemas/MessageResponse'
  1089. delete:
  1090. summary: Delete a BART asset
  1091. description: Delete a BART asset with the specified hash.
  1092. parameters:
  1093. - name: hash
  1094. in: path
  1095. description: The hex hash value for the BART asset.
  1096. required: true
  1097. schema:
  1098. type: string
  1099. pattern: '^[0-9a-fA-F]+$'
  1100. responses:
  1101. '200':
  1102. description: BART asset deleted successfully.
  1103. content:
  1104. application/json:
  1105. schema:
  1106. $ref: '#/components/schemas/MessageResponse'
  1107. '400':
  1108. description: Bad request. Missing or invalid hash parameter.
  1109. content:
  1110. application/json:
  1111. schema:
  1112. $ref: '#/components/schemas/MessageResponse'
  1113. '404':
  1114. description: BART asset not found.
  1115. content:
  1116. application/json:
  1117. schema:
  1118. $ref: '#/components/schemas/MessageResponse'
  1119. '500':
  1120. description: Internal server error.
  1121. content:
  1122. application/json:
  1123. schema:
  1124. $ref: '#/components/schemas/MessageResponse'
  1125. components:
  1126. schemas:
  1127. MessageResponse:
  1128. type: object
  1129. properties:
  1130. message:
  1131. type: string
  1132. description: Response message describing the result or error.
  1133. required:
  1134. - message
  1135. BARTType:
  1136. type: integer
  1137. enum: [0, 1, 2, 3, 4, 5, 6, 12, 13, 15, 96, 129, 131, 136, 137, 1024, 1026, 1027, 1028]
  1138. description: |
  1139. BART (Buddy ART) type identifier. Valid type IDs and their corresponding names:
  1140. - 0: buddy_icon_small (GIF/JPG/BMP, <= 32 pixels and 2k)
  1141. - 1: buddy_icon (GIF/JPG/BMP, <= 64 pixels and 7k)
  1142. - 2: status_str (StringTLV format; DATA flag is always set)
  1143. - 3: arrive_sound (WAV/MP3/MID, <= 10K)
  1144. - 4: rich_text (byte array of rich text codes; DATA flag is always set)
  1145. - 5: superbuddy_icon (XML)
  1146. - 6: radio_station (Opaque struct; DATA flag is always set)
  1147. - 12: buddy_icon_big (SWF)
  1148. - 13: status_str_tod (Time when the status string is set)
  1149. - 15: current_av_track (XML file; Data flag should not be set)
  1150. - 96: depart_sound (WAV/MP3/MID, <= 10K)
  1151. - 129: im_chrome (GIF/JPG/BMP wallpaper)
  1152. - 131: im_sound (WAV/MP3, <= 10K)
  1153. - 136: im_chrome_xml (XML)
  1154. - 137: im_chrome_immers (Immersive Expressions)
  1155. - 1024: emoticon_set (Set of default Emoticons)
  1156. - 1026: encr_cert_chain (Cert chain for encryption certs)
  1157. - 1027: sign_cert_chain (Cert chain for signing certs)
  1158. - 1028: gateway_cert (Cert for enterprise gateway)
  1159. WebAPIKey:
  1160. type: object
  1161. properties:
  1162. dev_id:
  1163. type: string
  1164. description: Unique developer/application identifier.
  1165. example: "dev_550e8400-e29b-41d4-a716-446655440000"
  1166. app_name:
  1167. type: string
  1168. description: Name of the application using this API key.
  1169. example: "My Web AIM Client"
  1170. created_at:
  1171. type: string
  1172. format: date-time
  1173. description: Timestamp when the key was created.
  1174. last_used:
  1175. type: string
  1176. format: date-time
  1177. nullable: true
  1178. description: Timestamp when the key was last used.
  1179. is_active:
  1180. type: boolean
  1181. description: Whether the API key is currently active.
  1182. default: true
  1183. rate_limit:
  1184. type: integer
  1185. description: Maximum requests per minute allowed.
  1186. example: 60
  1187. allowed_origins:
  1188. type: array
  1189. items:
  1190. type: string
  1191. description: List of allowed CORS origins. Empty list allows all origins.
  1192. example: ["https://example.com"]
  1193. capabilities:
  1194. type: array
  1195. items:
  1196. type: string
  1197. description: List of enabled features/endpoints. Empty list allows all capabilities.
  1198. example: ["aim.session", "presence.get"]