openapi.yaml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. openapi: 3.1.0
  2. info:
  3. title: FastAPI - Swagger UI
  4. version: 1.0.0
  5. paths:
  6. /agent/job:
  7. post:
  8. tags:
  9. - agent job interface
  10. summary: Submit Job
  11. operationId: submit_job_agent_job_post
  12. requestBody:
  13. content:
  14. application/json:
  15. schema:
  16. $ref: '#/components/schemas/BasicRequest'
  17. required: true
  18. responses:
  19. '200':
  20. description: Successful Response
  21. content:
  22. application/json:
  23. schema:
  24. $ref: '#/components/schemas/StandardResponse'
  25. '422':
  26. description: Validation Error
  27. content:
  28. application/json:
  29. schema:
  30. $ref: '#/components/schemas/HTTPValidationError'
  31. /agent/queue:
  32. post:
  33. tags:
  34. - agent job interface
  35. summary: Submit Queue
  36. operationId: submit_queue_agent_queue_post
  37. requestBody:
  38. content:
  39. application/json:
  40. schema:
  41. $ref: '#/components/schemas/BasicRequest'
  42. required: true
  43. responses:
  44. '200':
  45. description: Successful Response
  46. content:
  47. application/json:
  48. schema:
  49. $ref: '#/components/schemas/StandardResponse'
  50. '422':
  51. description: Validation Error
  52. content:
  53. application/json:
  54. schema:
  55. $ref: '#/components/schemas/HTTPValidationError'
  56. /file/upload/{file_type}/{job_id}:
  57. post:
  58. tags:
  59. - agent job interface
  60. summary: Upload File
  61. operationId: upload_file_file_upload__file_type___job_id__post
  62. parameters:
  63. - name: file_type
  64. in: path
  65. required: true
  66. schema:
  67. type: string
  68. title: File Type
  69. - name: job_id
  70. in: path
  71. required: true
  72. schema:
  73. type: integer
  74. title: Job Id
  75. requestBody:
  76. required: true
  77. content:
  78. multipart/form-data:
  79. schema:
  80. $ref: '#/components/schemas/Body_upload_file_file_upload__file_type___job_id__post'
  81. responses:
  82. '200':
  83. description: Successful Response
  84. content:
  85. application/json:
  86. schema:
  87. $ref: '#/components/schemas/StandardResponse'
  88. '422':
  89. description: Validation Error
  90. content:
  91. application/json:
  92. schema:
  93. $ref: '#/components/schemas/HTTPValidationError'
  94. /file/browse:
  95. post:
  96. tags:
  97. - agent job interface
  98. summary: Browser File
  99. operationId: browser_file_file_browse_post
  100. requestBody:
  101. content:
  102. application/json:
  103. schema:
  104. $ref: '#/components/schemas/BasicRequest'
  105. required: true
  106. responses:
  107. '200':
  108. description: Successful Response
  109. content:
  110. application/json:
  111. schema:
  112. $ref: '#/components/schemas/StandardResponse'
  113. '422':
  114. description: Validation Error
  115. content:
  116. application/json:
  117. schema:
  118. $ref: '#/components/schemas/HTTPValidationError'
  119. /file/download/{job_id}:
  120. get:
  121. tags:
  122. - agent job interface
  123. summary: Download File
  124. operationId: download_file_file_download__job_id__get
  125. parameters:
  126. - name: job_id
  127. in: path
  128. required: true
  129. schema:
  130. type: integer
  131. title: Job Id
  132. - name: path
  133. in: query
  134. required: false
  135. schema:
  136. type: string
  137. default: path
  138. title: Path
  139. responses:
  140. '200':
  141. description: Successful Response
  142. content:
  143. application/json:
  144. schema: {}
  145. '422':
  146. description: Validation Error
  147. content:
  148. application/json:
  149. schema:
  150. $ref: '#/components/schemas/HTTPValidationError'
  151. /file/view/{job_id}:
  152. get:
  153. tags:
  154. - agent job interface
  155. summary: View File
  156. operationId: view_file_file_view__job_id__get
  157. parameters:
  158. - name: job_id
  159. in: path
  160. required: true
  161. schema:
  162. type: integer
  163. title: Job Id
  164. - name: path
  165. in: query
  166. required: false
  167. schema:
  168. type: string
  169. default: path
  170. title: Path
  171. responses:
  172. '200':
  173. description: Successful Response
  174. content:
  175. application/json:
  176. schema:
  177. $ref: '#/components/schemas/StandardResponse'
  178. '422':
  179. description: Validation Error
  180. content:
  181. application/json:
  182. schema:
  183. $ref: '#/components/schemas/HTTPValidationError'
  184. /user/session:
  185. post:
  186. tags:
  187. - agent job interface
  188. summary: Register
  189. operationId: register_user_session_post
  190. requestBody:
  191. content:
  192. application/json:
  193. schema:
  194. $ref: '#/components/schemas/BasicRequest'
  195. required: true
  196. responses:
  197. '200':
  198. description: Successful Response
  199. content:
  200. application/json:
  201. schema:
  202. $ref: '#/components/schemas/StandardResponse'
  203. '422':
  204. description: Validation Error
  205. content:
  206. application/json:
  207. schema:
  208. $ref: '#/components/schemas/HTTPValidationError'
  209. /user/logout/{session_id}:
  210. get:
  211. tags:
  212. - agent job interface
  213. summary: Logout
  214. operationId: logout_user_logout__session_id__get
  215. parameters:
  216. - name: session_id
  217. in: path
  218. required: true
  219. schema:
  220. type: string
  221. title: Session Id
  222. responses:
  223. '200':
  224. description: Successful Response
  225. content:
  226. application/json:
  227. schema:
  228. $ref: '#/components/schemas/StandardResponse'
  229. '422':
  230. description: Validation Error
  231. content:
  232. application/json:
  233. schema:
  234. $ref: '#/components/schemas/HTTPValidationError'
  235. /user/signin:
  236. post:
  237. tags:
  238. - agent job interface
  239. summary: Signin
  240. operationId: signin_user_signin_post
  241. requestBody:
  242. content:
  243. application/json:
  244. schema:
  245. $ref: '#/components/schemas/BasicRequest'
  246. required: true
  247. responses:
  248. '200':
  249. description: Successful Response
  250. content:
  251. application/json:
  252. schema:
  253. $ref: '#/components/schemas/StandardResponse'
  254. '422':
  255. description: Validation Error
  256. content:
  257. application/json:
  258. schema:
  259. $ref: '#/components/schemas/HTTPValidationError'
  260. /user/roles:
  261. get:
  262. tags:
  263. - agent job interface
  264. summary: Get Roles Endpoint
  265. operationId: get_roles_endpoint_user_roles_get
  266. responses:
  267. '200':
  268. description: Successful Response
  269. content:
  270. application/json:
  271. schema:
  272. $ref: '#/components/schemas/StandardResponse'
  273. post:
  274. tags:
  275. - agent job interface
  276. summary: Create Role With Permissions Endpoint
  277. operationId: create_role_with_permissions_endpoint_user_roles_post
  278. requestBody:
  279. content:
  280. application/json:
  281. schema:
  282. $ref: '#/components/schemas/RoleCreateWithPermissionsRequest'
  283. required: true
  284. responses:
  285. '200':
  286. description: Successful Response
  287. content:
  288. application/json:
  289. schema:
  290. $ref: '#/components/schemas/StandardResponse'
  291. '422':
  292. description: Validation Error
  293. content:
  294. application/json:
  295. schema:
  296. $ref: '#/components/schemas/HTTPValidationError'
  297. /user/permissions:
  298. get:
  299. tags:
  300. - agent job interface
  301. summary: Get Permissions Endpoint
  302. operationId: get_permissions_endpoint_user_permissions_get
  303. responses:
  304. '200':
  305. description: Successful Response
  306. content:
  307. application/json:
  308. schema:
  309. $ref: '#/components/schemas/StandardResponse'
  310. post:
  311. tags:
  312. - agent job interface
  313. summary: Create Permission Endpoint
  314. operationId: create_permission_endpoint_user_permissions_post
  315. requestBody:
  316. content:
  317. application/json:
  318. schema:
  319. $ref: '#/components/schemas/PermissionCreateRequest'
  320. required: true
  321. responses:
  322. '200':
  323. description: Successful Response
  324. content:
  325. application/json:
  326. schema:
  327. $ref: '#/components/schemas/StandardResponse'
  328. '422':
  329. description: Validation Error
  330. content:
  331. application/json:
  332. schema:
  333. $ref: '#/components/schemas/HTTPValidationError'
  334. /user/users/roles:
  335. post:
  336. tags:
  337. - agent job interface
  338. summary: Assign Roles To User Endpoint
  339. operationId: assign_roles_to_user_endpoint_user_users_roles_post
  340. requestBody:
  341. content:
  342. application/json:
  343. schema:
  344. $ref: '#/components/schemas/UserRoleAssignmentRequest'
  345. required: true
  346. responses:
  347. '200':
  348. description: Successful Response
  349. content:
  350. application/json:
  351. schema:
  352. $ref: '#/components/schemas/StandardResponse'
  353. '422':
  354. description: Validation Error
  355. content:
  356. application/json:
  357. schema:
  358. $ref: '#/components/schemas/HTTPValidationError'
  359. /user/users:
  360. get:
  361. tags:
  362. - agent job interface
  363. summary: Get Users Endpoint
  364. operationId: get_users_endpoint_user_users_get
  365. parameters:
  366. - name: userName
  367. in: query
  368. required: false
  369. schema:
  370. anyOf:
  371. - type: string
  372. - type: 'null'
  373. description: "\u7528\u6237\u540D\uFF0C\u7528\u4E8E\u6A21\u7CCA\u67E5\u8BE2"
  374. title: Username
  375. description: "\u7528\u6237\u540D\uFF0C\u7528\u4E8E\u6A21\u7CCA\u67E5\u8BE2"
  376. - name: pageNo
  377. in: query
  378. required: false
  379. schema:
  380. type: integer
  381. minimum: 1
  382. description: "\u9875\u7801\uFF0C\u4ECE1\u5F00\u59CB"
  383. default: 1
  384. title: Pageno
  385. description: "\u9875\u7801\uFF0C\u4ECE1\u5F00\u59CB"
  386. - name: pageSize
  387. in: query
  388. required: false
  389. schema:
  390. type: integer
  391. maximum: 100
  392. minimum: 1
  393. description: "\u6BCF\u9875\u6570\u91CF\uFF0C\u6700\u5927100"
  394. default: 10
  395. title: Pagesize
  396. description: "\u6BCF\u9875\u6570\u91CF\uFF0C\u6700\u5927100"
  397. responses:
  398. '200':
  399. description: Successful Response
  400. content:
  401. application/json:
  402. schema:
  403. $ref: '#/components/schemas/StandardResponse'
  404. '422':
  405. description: Validation Error
  406. content:
  407. application/json:
  408. schema:
  409. $ref: '#/components/schemas/HTTPValidationError'
  410. /kb/summary:
  411. post:
  412. tags:
  413. - knowledge build interface
  414. summary: Summary Func
  415. operationId: summary_func_kb_summary_post
  416. requestBody:
  417. content:
  418. application/json:
  419. schema:
  420. $ref: '#/components/schemas/BasicRequest'
  421. required: true
  422. responses:
  423. '200':
  424. description: Successful Response
  425. content:
  426. application/json:
  427. schema:
  428. $ref: '#/components/schemas/StandardResponse'
  429. '422':
  430. description: Validation Error
  431. content:
  432. application/json:
  433. schema:
  434. $ref: '#/components/schemas/HTTPValidationError'
  435. /kb/schemas:
  436. post:
  437. tags:
  438. - knowledge build interface
  439. summary: Schemas Func
  440. operationId: schemas_func_kb_schemas_post
  441. requestBody:
  442. content:
  443. application/json:
  444. schema:
  445. $ref: '#/components/schemas/BasicRequest'
  446. required: true
  447. responses:
  448. '200':
  449. description: Successful Response
  450. content:
  451. application/json:
  452. schema:
  453. $ref: '#/components/schemas/StandardResponse'
  454. '422':
  455. description: Validation Error
  456. content:
  457. application/json:
  458. schema:
  459. $ref: '#/components/schemas/HTTPValidationError'
  460. /kb/nodes:
  461. post:
  462. tags:
  463. - knowledge build interface
  464. summary: Nodes Func
  465. operationId: nodes_func_kb_nodes_post
  466. requestBody:
  467. content:
  468. application/json:
  469. schema:
  470. $ref: '#/components/schemas/BasicRequest'
  471. required: true
  472. responses:
  473. '200':
  474. description: Successful Response
  475. content:
  476. application/json:
  477. schema:
  478. $ref: '#/components/schemas/StandardResponse'
  479. '422':
  480. description: Validation Error
  481. content:
  482. application/json:
  483. schema:
  484. $ref: '#/components/schemas/HTTPValidationError'
  485. /kb/graph_data:
  486. get:
  487. tags:
  488. - knowledge build interface
  489. summary: Get Graph Data
  490. description: "\u83B7\u53D6\u7528\u6237\u5173\u8054\u7684\u56FE\u8C31\u6570\u636E\
  491. \n- \u4ECEsession_id\u83B7\u53D6user_id\n- \u67E5\u8BE2DbUserDataRelation\u83B7\
  492. \u53D6\u7528\u6237\u5173\u8054\u7684\u6570\u636E\n- \u8FD4\u56DE\u4E0EJava\u7AEF\
  493. \u4E00\u81F4\u7684\u6570\u636E\u7ED3\u6784"
  494. operationId: get_graph_data_kb_graph_data_get
  495. parameters:
  496. - name: label_name
  497. in: query
  498. required: false
  499. schema:
  500. anyOf:
  501. - type: string
  502. - type: 'null'
  503. title: Label Name
  504. - name: input_str
  505. in: query
  506. required: false
  507. schema:
  508. anyOf:
  509. - type: string
  510. - type: 'null'
  511. title: Input Str
  512. responses:
  513. '200':
  514. description: Successful Response
  515. content:
  516. application/json:
  517. schema:
  518. $ref: '#/components/schemas/StandardResponse'
  519. '422':
  520. description: Validation Error
  521. content:
  522. application/json:
  523. schema:
  524. $ref: '#/components/schemas/HTTPValidationError'
  525. /knowledge-base/:
  526. post:
  527. tags:
  528. - knowledge base interface
  529. summary: Create Knowledge Base
  530. operationId: create_knowledge_base_knowledge_base__post
  531. requestBody:
  532. required: true
  533. content:
  534. application/json:
  535. schema:
  536. $ref: '#/components/schemas/KnowledgeBaseCreate'
  537. responses:
  538. '200':
  539. description: Successful Response
  540. content:
  541. application/json:
  542. schema:
  543. $ref: '#/components/schemas/ResponseModel'
  544. '422':
  545. description: Validation Error
  546. content:
  547. application/json:
  548. schema:
  549. $ref: '#/components/schemas/HTTPValidationError'
  550. get:
  551. tags:
  552. - knowledge base interface
  553. summary: List Knowledge Bases
  554. operationId: list_knowledge_bases_knowledge_base__get
  555. parameters:
  556. - name: pageNo
  557. in: query
  558. required: false
  559. schema:
  560. type: integer
  561. default: 1
  562. title: Pageno
  563. - name: pageSize
  564. in: query
  565. required: false
  566. schema:
  567. type: integer
  568. default: 10
  569. title: Pagesize
  570. - name: name
  571. in: query
  572. required: false
  573. schema:
  574. anyOf:
  575. - type: string
  576. - type: 'null'
  577. title: Name
  578. responses:
  579. '200':
  580. description: Successful Response
  581. content:
  582. application/json:
  583. schema:
  584. $ref: '#/components/schemas/ResponseModel'
  585. '422':
  586. description: Validation Error
  587. content:
  588. application/json:
  589. schema:
  590. $ref: '#/components/schemas/HTTPValidationError'
  591. /knowledge-base/{kb_id}:
  592. put:
  593. tags:
  594. - knowledge base interface
  595. summary: Update Knowledge Base
  596. operationId: update_knowledge_base_knowledge_base__kb_id__put
  597. parameters:
  598. - name: kb_id
  599. in: path
  600. required: true
  601. schema:
  602. type: integer
  603. title: Kb Id
  604. requestBody:
  605. required: true
  606. content:
  607. application/json:
  608. schema:
  609. $ref: '#/components/schemas/KnowledgeBaseUpdate'
  610. responses:
  611. '200':
  612. description: Successful Response
  613. content:
  614. application/json:
  615. schema:
  616. $ref: '#/components/schemas/ResponseModel'
  617. '422':
  618. description: Validation Error
  619. content:
  620. application/json:
  621. schema:
  622. $ref: '#/components/schemas/HTTPValidationError'
  623. delete:
  624. tags:
  625. - knowledge base interface
  626. summary: Delete Knowledge Base
  627. operationId: delete_knowledge_base_knowledge_base__kb_id__delete
  628. parameters:
  629. - name: kb_id
  630. in: path
  631. required: true
  632. schema:
  633. type: integer
  634. title: Kb Id
  635. responses:
  636. '200':
  637. description: Successful Response
  638. content:
  639. application/json:
  640. schema:
  641. $ref: '#/components/schemas/ResponseModel'
  642. '422':
  643. description: Validation Error
  644. content:
  645. application/json:
  646. schema:
  647. $ref: '#/components/schemas/HTTPValidationError'
  648. get:
  649. tags:
  650. - knowledge base interface
  651. summary: Get Knowledge Base
  652. operationId: get_knowledge_base_knowledge_base__kb_id__get
  653. parameters:
  654. - name: kb_id
  655. in: path
  656. required: true
  657. schema:
  658. type: integer
  659. title: Kb Id
  660. responses:
  661. '200':
  662. description: Successful Response
  663. content:
  664. application/json:
  665. schema:
  666. $ref: '#/components/schemas/ResponseModel'
  667. '422':
  668. description: Validation Error
  669. content:
  670. application/json:
  671. schema:
  672. $ref: '#/components/schemas/HTTPValidationError'
  673. /knowledge-base/name/{name}:
  674. get:
  675. tags:
  676. - knowledge base interface
  677. summary: Get Knowledge Base By Name
  678. operationId: get_knowledge_base_by_name_knowledge_base_name__name__get
  679. parameters:
  680. - name: name
  681. in: path
  682. required: true
  683. schema:
  684. type: string
  685. title: Name
  686. responses:
  687. '200':
  688. description: Successful Response
  689. content:
  690. application/json:
  691. schema:
  692. $ref: '#/components/schemas/ResponseModel'
  693. '422':
  694. description: Validation Error
  695. content:
  696. application/json:
  697. schema:
  698. $ref: '#/components/schemas/HTTPValidationError'
  699. /knowledge-base/{kb_id}/files/:
  700. post:
  701. tags:
  702. - knowledge base interface
  703. summary: Upload Files
  704. operationId: upload_files_knowledge_base__kb_id__files__post
  705. parameters:
  706. - name: kb_id
  707. in: path
  708. required: true
  709. schema:
  710. type: integer
  711. title: Kb Id
  712. requestBody:
  713. required: true
  714. content:
  715. multipart/form-data:
  716. schema:
  717. $ref: '#/components/schemas/Body_upload_files_knowledge_base__kb_id__files__post'
  718. responses:
  719. '200':
  720. description: Successful Response
  721. content:
  722. application/json:
  723. schema:
  724. $ref: '#/components/schemas/ResponseModel'
  725. '422':
  726. description: Validation Error
  727. content:
  728. application/json:
  729. schema:
  730. $ref: '#/components/schemas/HTTPValidationError'
  731. get:
  732. tags:
  733. - knowledge base interface
  734. summary: List Files
  735. operationId: list_files_knowledge_base__kb_id__files__get
  736. parameters:
  737. - name: kb_id
  738. in: path
  739. required: true
  740. schema:
  741. type: integer
  742. title: Kb Id
  743. - name: pageNo
  744. in: query
  745. required: false
  746. schema:
  747. type: integer
  748. default: 1
  749. title: Pageno
  750. - name: pageSize
  751. in: query
  752. required: false
  753. schema:
  754. type: integer
  755. default: 10
  756. title: Pagesize
  757. - name: file_name
  758. in: query
  759. required: false
  760. schema:
  761. anyOf:
  762. - type: string
  763. - type: 'null'
  764. title: File Name
  765. responses:
  766. '200':
  767. description: Successful Response
  768. content:
  769. application/json:
  770. schema:
  771. $ref: '#/components/schemas/ResponseModel'
  772. '422':
  773. description: Validation Error
  774. content:
  775. application/json:
  776. schema:
  777. $ref: '#/components/schemas/HTTPValidationError'
  778. /knowledge-base/{kb_id}/files/search/:
  779. get:
  780. tags:
  781. - knowledge base interface
  782. summary: Search Files
  783. operationId: search_files_knowledge_base__kb_id__files_search__get
  784. parameters:
  785. - name: kb_id
  786. in: path
  787. required: true
  788. schema:
  789. type: integer
  790. title: Kb Id
  791. - name: file_name
  792. in: query
  793. required: true
  794. schema:
  795. type: string
  796. title: File Name
  797. responses:
  798. '200':
  799. description: Successful Response
  800. content:
  801. application/json:
  802. schema:
  803. $ref: '#/components/schemas/ResponseModel'
  804. '422':
  805. description: Validation Error
  806. content:
  807. application/json:
  808. schema:
  809. $ref: '#/components/schemas/HTTPValidationError'
  810. /files/{file_id}/download:
  811. get:
  812. tags:
  813. - knowledge base interface
  814. summary: Download File
  815. operationId: download_file_files__file_id__download_get
  816. parameters:
  817. - name: file_id
  818. in: path
  819. required: true
  820. schema:
  821. type: integer
  822. title: File Id
  823. responses:
  824. '200':
  825. description: Successful Response
  826. content:
  827. application/json:
  828. schema: {}
  829. '422':
  830. description: Validation Error
  831. content:
  832. application/json:
  833. schema:
  834. $ref: '#/components/schemas/HTTPValidationError'
  835. /files/{file_id}:
  836. delete:
  837. tags:
  838. - knowledge base interface
  839. summary: Delete File
  840. operationId: delete_file_files__file_id__delete
  841. parameters:
  842. - name: file_id
  843. in: path
  844. required: true
  845. schema:
  846. type: integer
  847. title: File Id
  848. responses:
  849. '200':
  850. description: Successful Response
  851. content:
  852. application/json:
  853. schema:
  854. type: object
  855. additionalProperties: true
  856. title: Response Delete File Files File Id Delete
  857. '422':
  858. description: Validation Error
  859. content:
  860. application/json:
  861. schema:
  862. $ref: '#/components/schemas/HTTPValidationError'
  863. /files/batch-update:
  864. put:
  865. tags:
  866. - knowledge base interface
  867. summary: Batch Update Files
  868. operationId: batch_update_files_files_batch_update_put
  869. requestBody:
  870. content:
  871. application/json:
  872. schema:
  873. $ref: '#/components/schemas/BatchFileUpdate'
  874. required: true
  875. responses:
  876. '200':
  877. description: Successful Response
  878. content:
  879. application/json:
  880. schema:
  881. $ref: '#/components/schemas/ResponseModel'
  882. '422':
  883. description: Validation Error
  884. content:
  885. application/json:
  886. schema:
  887. $ref: '#/components/schemas/HTTPValidationError'
  888. components:
  889. schemas:
  890. BasicRequest:
  891. properties:
  892. action:
  893. type: string
  894. title: Action
  895. id:
  896. type: string
  897. title: Id
  898. params:
  899. items:
  900. $ref: '#/components/schemas/BasicRequestParameter'
  901. type: array
  902. title: Params
  903. type: object
  904. required:
  905. - action
  906. - id
  907. - params
  908. title: BasicRequest
  909. BasicRequestParameter:
  910. properties:
  911. name:
  912. type: string
  913. title: Name
  914. value:
  915. anyOf:
  916. - type: string
  917. - type: integer
  918. - type: number
  919. - type: boolean
  920. - items:
  921. type: string
  922. type: array
  923. - items:
  924. type: integer
  925. type: array
  926. - items:
  927. type: number
  928. type: array
  929. - items:
  930. type: boolean
  931. type: array
  932. title: Value
  933. type: object
  934. required:
  935. - name
  936. - value
  937. title: BasicRequestParameter
  938. BatchFileUpdate:
  939. properties:
  940. files:
  941. items:
  942. $ref: '#/components/schemas/FileUpdate'
  943. type: array
  944. title: Files
  945. type: object
  946. required:
  947. - files
  948. title: BatchFileUpdate
  949. Body_upload_file_file_upload__file_type___job_id__post:
  950. properties:
  951. file:
  952. type: string
  953. format: binary
  954. title: File
  955. type: object
  956. required:
  957. - file
  958. title: Body_upload_file_file_upload__file_type___job_id__post
  959. Body_upload_files_knowledge_base__kb_id__files__post:
  960. properties:
  961. files:
  962. items:
  963. type: string
  964. format: binary
  965. type: array
  966. title: Files
  967. type: object
  968. required:
  969. - files
  970. title: Body_upload_files_knowledge_base__kb_id__files__post
  971. FileUpdate:
  972. properties:
  973. id:
  974. type: integer
  975. title: Id
  976. file_name:
  977. anyOf:
  978. - type: string
  979. - type: 'null'
  980. title: File Name
  981. version:
  982. anyOf:
  983. - type: string
  984. - type: 'null'
  985. title: Version
  986. author:
  987. anyOf:
  988. - type: string
  989. - type: 'null'
  990. title: Author
  991. year:
  992. anyOf:
  993. - type: integer
  994. - type: 'null'
  995. title: Year
  996. page_count:
  997. anyOf:
  998. - type: integer
  999. - type: 'null'
  1000. title: Page Count
  1001. creator:
  1002. anyOf:
  1003. - type: string
  1004. - type: 'null'
  1005. title: Creator
  1006. knowledge_type:
  1007. anyOf:
  1008. - type: string
  1009. - type: 'null'
  1010. title: Knowledge Type
  1011. type: object
  1012. required:
  1013. - id
  1014. title: FileUpdate
  1015. HTTPValidationError:
  1016. properties:
  1017. detail:
  1018. items:
  1019. $ref: '#/components/schemas/ValidationError'
  1020. type: array
  1021. title: Detail
  1022. type: object
  1023. title: HTTPValidationError
  1024. KnowledgeBaseCreate:
  1025. properties:
  1026. name:
  1027. type: string
  1028. title: Name
  1029. description:
  1030. anyOf:
  1031. - type: string
  1032. - type: 'null'
  1033. title: Description
  1034. tags:
  1035. anyOf:
  1036. - type: string
  1037. - type: 'null'
  1038. title: Tags
  1039. type: object
  1040. required:
  1041. - name
  1042. title: KnowledgeBaseCreate
  1043. KnowledgeBaseUpdate:
  1044. properties:
  1045. name:
  1046. type: string
  1047. title: Name
  1048. description:
  1049. anyOf:
  1050. - type: string
  1051. - type: 'null'
  1052. title: Description
  1053. tags:
  1054. anyOf:
  1055. - type: string
  1056. - type: 'null'
  1057. title: Tags
  1058. type: object
  1059. required:
  1060. - name
  1061. title: KnowledgeBaseUpdate
  1062. PermissionCreateRequest:
  1063. properties:
  1064. name:
  1065. type: string
  1066. title: Name
  1067. description:
  1068. anyOf:
  1069. - type: string
  1070. - type: 'null'
  1071. title: Description
  1072. menu_name:
  1073. anyOf:
  1074. - type: string
  1075. - type: 'null'
  1076. title: Menu Name
  1077. menu_route:
  1078. anyOf:
  1079. - type: string
  1080. - type: 'null'
  1081. title: Menu Route
  1082. menu_icon:
  1083. anyOf:
  1084. - type: string
  1085. - type: 'null'
  1086. title: Menu Icon
  1087. parent_id:
  1088. anyOf:
  1089. - type: integer
  1090. - type: 'null'
  1091. title: Parent Id
  1092. type: object
  1093. required:
  1094. - name
  1095. title: PermissionCreateRequest
  1096. ResponseModel:
  1097. properties:
  1098. code:
  1099. type: integer
  1100. title: Code
  1101. message:
  1102. type: string
  1103. title: Message
  1104. data:
  1105. anyOf:
  1106. - additionalProperties: true
  1107. type: object
  1108. - items: {}
  1109. type: array
  1110. - type: boolean
  1111. - type: 'null'
  1112. title: Data
  1113. type: object
  1114. required:
  1115. - code
  1116. - message
  1117. - data
  1118. title: ResponseModel
  1119. RoleCreateWithPermissionsRequest:
  1120. properties:
  1121. role_id:
  1122. anyOf:
  1123. - type: integer
  1124. - type: 'null'
  1125. title: Role Id
  1126. name:
  1127. type: string
  1128. title: Name
  1129. description:
  1130. anyOf:
  1131. - type: string
  1132. - type: 'null'
  1133. title: Description
  1134. permission_ids:
  1135. items:
  1136. type: integer
  1137. type: array
  1138. title: Permission Ids
  1139. default: []
  1140. type: object
  1141. required:
  1142. - name
  1143. title: RoleCreateWithPermissionsRequest
  1144. StandardResponse:
  1145. properties:
  1146. code:
  1147. type: integer
  1148. title: Code
  1149. default: 200
  1150. message:
  1151. type: string
  1152. title: Message
  1153. default: success
  1154. meta:
  1155. additionalProperties: true
  1156. type: object
  1157. title: Meta
  1158. default: {}
  1159. records:
  1160. items: {}
  1161. type: array
  1162. title: Records
  1163. default: []
  1164. total:
  1165. anyOf:
  1166. - type: integer
  1167. - type: 'null'
  1168. title: Total
  1169. type: object
  1170. title: StandardResponse
  1171. UserRoleAssignmentRequest:
  1172. properties:
  1173. user_id:
  1174. type: integer
  1175. title: User Id
  1176. role_ids:
  1177. items:
  1178. type: integer
  1179. type: array
  1180. title: Role Ids
  1181. type: object
  1182. required:
  1183. - user_id
  1184. - role_ids
  1185. title: UserRoleAssignmentRequest
  1186. ValidationError:
  1187. properties:
  1188. loc:
  1189. items:
  1190. anyOf:
  1191. - type: string
  1192. - type: integer
  1193. type: array
  1194. title: Location
  1195. msg:
  1196. type: string
  1197. title: Message
  1198. type:
  1199. type: string
  1200. title: Error Type
  1201. type: object
  1202. required:
  1203. - loc
  1204. - msg
  1205. - type
  1206. title: ValidationError