openapi.yaml 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172
  1. openapi: 3.0.3
  2. tags:
  3. - name: healthcheck
  4. - name: token
  5. - name: maintenance
  6. - name: admins
  7. - name: connections
  8. - name: defender
  9. - name: quota
  10. - name: folders
  11. - name: users
  12. info:
  13. title: SFTPGo
  14. description: SFTPGo REST API
  15. version: 2.0.5
  16. contact:
  17. url: 'https://github.com/drakkan/sftpgo'
  18. license:
  19. name: AGPLv3
  20. url: 'https://www.gnu.org/licenses/agpl-3.0.en.html'
  21. servers:
  22. - url: /api/v2
  23. security:
  24. - BearerAuth: []
  25. paths:
  26. /healthz:
  27. get:
  28. security: []
  29. servers:
  30. - url: /
  31. tags:
  32. - healthcheck
  33. summary: health check
  34. description: This endpoint can be used to check if the application is running and responding to requests
  35. operationId: healthz
  36. responses:
  37. '200':
  38. description: successful operation
  39. content:
  40. text/plain:
  41. schema:
  42. type: string
  43. example: ok
  44. /token:
  45. get:
  46. security:
  47. - BasicAuth: []
  48. tags:
  49. - token
  50. summary: Get a new access token
  51. description: Returns an access token and its expiration
  52. operationId: get_token
  53. responses:
  54. '200':
  55. description: successful operation
  56. content:
  57. application/json:
  58. schema:
  59. $ref: '#/components/schemas/Token'
  60. '401':
  61. $ref: '#/components/responses/Unauthorized'
  62. '403':
  63. $ref: '#/components/responses/Forbidden'
  64. '500':
  65. $ref: '#/components/responses/InternalServerError'
  66. default:
  67. $ref: '#/components/responses/DefaultResponse'
  68. /logout:
  69. get:
  70. tags:
  71. - token
  72. summary: Invalidate
  73. description: Allows to invalidate a token before its expiration
  74. operationId: logout
  75. responses:
  76. '200':
  77. description: successful operation
  78. content:
  79. application/json:
  80. schema:
  81. $ref: '#/components/schemas/ApiResponse'
  82. '401':
  83. $ref: '#/components/responses/Unauthorized'
  84. '403':
  85. $ref: '#/components/responses/Forbidden'
  86. '500':
  87. $ref: '#/components/responses/InternalServerError'
  88. default:
  89. $ref: '#/components/responses/DefaultResponse'
  90. /version:
  91. get:
  92. tags:
  93. - maintenance
  94. summary: Get version details
  95. description: 'Returns version details such as the version number, build date, commit hash and enabled features'
  96. operationId: get_version
  97. responses:
  98. '200':
  99. description: successful operation
  100. content:
  101. application/json:
  102. schema:
  103. $ref: '#/components/schemas/VersionInfo'
  104. '401':
  105. $ref: '#/components/responses/Unauthorized'
  106. '403':
  107. $ref: '#/components/responses/Forbidden'
  108. '500':
  109. $ref: '#/components/responses/InternalServerError'
  110. default:
  111. $ref: '#/components/responses/DefaultResponse'
  112. /changepwd/admin:
  113. put:
  114. tags:
  115. - admins
  116. summary: Change admin password
  117. description: Changes the password for the logged in admin
  118. operationId: change_admin_password
  119. requestBody:
  120. required: true
  121. content:
  122. application/json:
  123. schema:
  124. $ref: '#/components/schemas/PwdChange'
  125. responses:
  126. '200':
  127. description: successful operation
  128. content:
  129. application/json:
  130. schema:
  131. $ref: '#/components/schemas/ApiResponse'
  132. '401':
  133. $ref: '#/components/responses/Unauthorized'
  134. '403':
  135. $ref: '#/components/responses/Forbidden'
  136. '500':
  137. $ref: '#/components/responses/InternalServerError'
  138. default:
  139. $ref: '#/components/responses/DefaultResponse'
  140. /connections:
  141. get:
  142. tags:
  143. - connections
  144. summary: Get connections details
  145. description: Returns the active users and info about their current uploads/downloads
  146. operationId: get_connections
  147. responses:
  148. '200':
  149. description: successful operation
  150. content:
  151. application/json:
  152. schema:
  153. type: array
  154. items:
  155. $ref: '#/components/schemas/ConnectionStatus'
  156. '401':
  157. $ref: '#/components/responses/Unauthorized'
  158. '403':
  159. $ref: '#/components/responses/Forbidden'
  160. '500':
  161. $ref: '#/components/responses/InternalServerError'
  162. default:
  163. $ref: '#/components/responses/DefaultResponse'
  164. '/connections/{connectionID}':
  165. delete:
  166. tags:
  167. - connections
  168. summary: Close connection
  169. description: Terminates an active connection
  170. operationId: close_connection
  171. parameters:
  172. - name: connectionID
  173. in: path
  174. description: ID of the connection to close
  175. required: true
  176. schema:
  177. type: string
  178. responses:
  179. '200':
  180. description: successful operation
  181. content:
  182. application/json:
  183. schema:
  184. $ref: '#/components/schemas/ApiResponse'
  185. example:
  186. message: Connection closed
  187. '401':
  188. $ref: '#/components/responses/Unauthorized'
  189. '403':
  190. $ref: '#/components/responses/Forbidden'
  191. '404':
  192. $ref: '#/components/responses/NotFound'
  193. '500':
  194. $ref: '#/components/responses/InternalServerError'
  195. default:
  196. $ref: '#/components/responses/DefaultResponse'
  197. /defender/bantime:
  198. get:
  199. tags:
  200. - defender
  201. summary: Get ban time
  202. description: Returns the ban time for the specified IPv4/IPv6 address
  203. operationId: get_ban_time
  204. parameters:
  205. - in: query
  206. name: ip
  207. required: true
  208. description: IPv4/IPv6 address
  209. schema:
  210. type: string
  211. responses:
  212. '200':
  213. description: successful operation
  214. content:
  215. application/json:
  216. schema:
  217. $ref: '#/components/schemas/BanStatus'
  218. '401':
  219. $ref: '#/components/responses/Unauthorized'
  220. '403':
  221. $ref: '#/components/responses/Forbidden'
  222. '404':
  223. $ref: '#/components/responses/NotFound'
  224. '500':
  225. $ref: '#/components/responses/InternalServerError'
  226. default:
  227. $ref: '#/components/responses/DefaultResponse'
  228. /defender/unban:
  229. post:
  230. tags:
  231. - defender
  232. summary: Unban
  233. description: Removes the specified IPv4/IPv6 from the banned ones
  234. operationId: unban_host
  235. requestBody:
  236. required: true
  237. content:
  238. application/json:
  239. schema:
  240. type: object
  241. properties:
  242. ip:
  243. type: string
  244. description: IPv4/IPv6 address to remove
  245. responses:
  246. '200':
  247. description: successful operation
  248. content:
  249. application/json:
  250. schema:
  251. $ref: '#/components/schemas/ApiResponse'
  252. '400':
  253. $ref: '#/components/responses/BadRequest'
  254. '401':
  255. $ref: '#/components/responses/Unauthorized'
  256. '403':
  257. $ref: '#/components/responses/Forbidden'
  258. '404':
  259. $ref: '#/components/responses/NotFound'
  260. '500':
  261. $ref: '#/components/responses/InternalServerError'
  262. default:
  263. $ref: '#/components/responses/DefaultResponse'
  264. /defender/score:
  265. get:
  266. tags:
  267. - defender
  268. summary: Get score
  269. description: Returns the score for the specified IPv4/IPv6 address
  270. operationId: get_score
  271. parameters:
  272. - in: query
  273. name: ip
  274. required: true
  275. description: IPv4/IPv6 address
  276. schema:
  277. type: string
  278. responses:
  279. '200':
  280. description: successful operation
  281. content:
  282. application/json:
  283. schema:
  284. $ref: '#/components/schemas/ScoreStatus'
  285. '401':
  286. $ref: '#/components/responses/Unauthorized'
  287. '403':
  288. $ref: '#/components/responses/Forbidden'
  289. '404':
  290. $ref: '#/components/responses/NotFound'
  291. '500':
  292. $ref: '#/components/responses/InternalServerError'
  293. default:
  294. $ref: '#/components/responses/DefaultResponse'
  295. /quota-scans:
  296. get:
  297. tags:
  298. - quota
  299. summary: Get quota scans
  300. description: Returns active user quota scans
  301. operationId: get_quota_scans
  302. responses:
  303. '200':
  304. description: successful operation
  305. content:
  306. application/json:
  307. schema:
  308. type: array
  309. items:
  310. $ref: '#/components/schemas/QuotaScan'
  311. '401':
  312. $ref: '#/components/responses/Unauthorized'
  313. '403':
  314. $ref: '#/components/responses/Forbidden'
  315. '500':
  316. $ref: '#/components/responses/InternalServerError'
  317. default:
  318. $ref: '#/components/responses/DefaultResponse'
  319. post:
  320. tags:
  321. - quota
  322. summary: Start user quota scan
  323. description: Starts a new quota scan for the given user. A quota scan updates the number of files and their total size for the specified user and the virtual folders, if any, included in his quota
  324. operationId: start_quota_scan
  325. requestBody:
  326. required: true
  327. content:
  328. application/json:
  329. schema:
  330. $ref: '#/components/schemas/User'
  331. responses:
  332. '202':
  333. description: successful operation
  334. content:
  335. application/json:
  336. schema:
  337. $ref: '#/components/schemas/ApiResponse'
  338. example:
  339. message: Scan started
  340. '400':
  341. $ref: '#/components/responses/BadRequest'
  342. '401':
  343. $ref: '#/components/responses/Unauthorized'
  344. '403':
  345. $ref: '#/components/responses/Forbidden'
  346. '404':
  347. $ref: '#/components/responses/NotFound'
  348. '409':
  349. $ref: '#/components/responses/Conflict'
  350. '500':
  351. $ref: '#/components/responses/InternalServerError'
  352. default:
  353. $ref: '#/components/responses/DefaultResponse'
  354. /quota-update:
  355. put:
  356. tags:
  357. - quota
  358. summary: Update user quota limits
  359. description: Sets the current used quota limits for the given user
  360. operationId: quota_update
  361. parameters:
  362. - in: query
  363. name: mode
  364. required: false
  365. description: the update mode specifies if the given quota usage values should be added or replace the current ones
  366. schema:
  367. type: string
  368. enum:
  369. - add
  370. - reset
  371. description: |
  372. Update type:
  373. * `add` - add the specified quota limits to the current used ones
  374. * `reset` - reset the values to the specified ones. This is the default
  375. example: reset
  376. requestBody:
  377. required: true
  378. description: 'The only user mandatory fields are username, used_quota_size and used_quota_files. Please note that if the quota fields are missing they will default to 0'
  379. content:
  380. application/json:
  381. schema:
  382. $ref: '#/components/schemas/User'
  383. responses:
  384. '200':
  385. description: successful operation
  386. content:
  387. application/json:
  388. schema:
  389. $ref: '#/components/schemas/ApiResponse'
  390. example:
  391. message: Quota updated
  392. '400':
  393. $ref: '#/components/responses/BadRequest'
  394. '401':
  395. $ref: '#/components/responses/Unauthorized'
  396. '403':
  397. $ref: '#/components/responses/Forbidden'
  398. '404':
  399. $ref: '#/components/responses/NotFound'
  400. '409':
  401. $ref: '#/components/responses/Conflict'
  402. '500':
  403. $ref: '#/components/responses/InternalServerError'
  404. default:
  405. $ref: '#/components/responses/DefaultResponse'
  406. /folder-quota-update:
  407. put:
  408. tags:
  409. - quota
  410. summary: Update folder quota limits
  411. description: Sets the current used quota limits for the given folder
  412. operationId: folder_quota_update
  413. parameters:
  414. - in: query
  415. name: mode
  416. required: false
  417. description: the update mode specifies if the given quota usage values should be added or replace the current ones
  418. schema:
  419. type: string
  420. enum:
  421. - add
  422. - reset
  423. description: |
  424. Update type:
  425. * `add` - add the specified quota limits to the current used ones
  426. * `reset` - reset the values to the specified ones. This is the default
  427. example: reset
  428. requestBody:
  429. required: true
  430. description: 'The only folder mandatory fields are mapped_path,used_quota_size and used_quota_files. Please note that if the used quota fields are missing they will default to 0'
  431. content:
  432. application/json:
  433. schema:
  434. $ref: '#/components/schemas/BaseVirtualFolder'
  435. responses:
  436. '200':
  437. description: successful operation
  438. content:
  439. application/json:
  440. schema:
  441. $ref: '#/components/schemas/ApiResponse'
  442. example:
  443. message: Quota updated
  444. '400':
  445. $ref: '#/components/responses/BadRequest'
  446. '401':
  447. $ref: '#/components/responses/Unauthorized'
  448. '403':
  449. $ref: '#/components/responses/Forbidden'
  450. '404':
  451. $ref: '#/components/responses/NotFound'
  452. '409':
  453. $ref: '#/components/responses/Conflict'
  454. '500':
  455. $ref: '#/components/responses/InternalServerError'
  456. default:
  457. $ref: '#/components/responses/DefaultResponse'
  458. /folder-quota-scans:
  459. get:
  460. tags:
  461. - quota
  462. summary: Get folders quota scans
  463. description: Returns the active quota scans for folders
  464. operationId: get_folders_quota_scans
  465. responses:
  466. '200':
  467. description: successful operation
  468. content:
  469. application/json:
  470. schema:
  471. type: array
  472. items:
  473. $ref: '#/components/schemas/FolderQuotaScan'
  474. '401':
  475. $ref: '#/components/responses/Unauthorized'
  476. '403':
  477. $ref: '#/components/responses/Forbidden'
  478. '500':
  479. $ref: '#/components/responses/InternalServerError'
  480. default:
  481. $ref: '#/components/responses/DefaultResponse'
  482. post:
  483. tags:
  484. - quota
  485. summary: Start folder quota scan
  486. description: Starts a new quota scan for the given folder. A quota scan update the number of files and their total size for the specified folder
  487. operationId: start_folder_quota_scan
  488. requestBody:
  489. required: true
  490. content:
  491. application/json:
  492. schema:
  493. $ref: '#/components/schemas/BaseVirtualFolder'
  494. responses:
  495. '202':
  496. description: successful operation
  497. content:
  498. application/json:
  499. schema:
  500. $ref: '#/components/schemas/ApiResponse'
  501. example:
  502. message: Scan started
  503. '400':
  504. $ref: '#/components/responses/BadRequest'
  505. '401':
  506. $ref: '#/components/responses/Unauthorized'
  507. '403':
  508. $ref: '#/components/responses/Forbidden'
  509. '404':
  510. $ref: '#/components/responses/NotFound'
  511. '409':
  512. $ref: '#/components/responses/Conflict'
  513. '500':
  514. $ref: '#/components/responses/InternalServerError'
  515. default:
  516. $ref: '#/components/responses/DefaultResponse'
  517. /folders:
  518. get:
  519. tags:
  520. - folders
  521. summary: Get folders
  522. description: Returns an array with one or more folders
  523. operationId: get_folders
  524. parameters:
  525. - in: query
  526. name: offset
  527. schema:
  528. type: integer
  529. minimum: 0
  530. default: 0
  531. required: false
  532. - in: query
  533. name: limit
  534. schema:
  535. type: integer
  536. minimum: 1
  537. maximum: 500
  538. default: 100
  539. required: false
  540. description: 'The maximum number of items to return. Max value is 500, default is 100'
  541. - in: query
  542. name: order
  543. required: false
  544. description: Ordering folders by path. Default ASC
  545. schema:
  546. type: string
  547. enum:
  548. - ASC
  549. - DESC
  550. example: ASC
  551. responses:
  552. '200':
  553. description: successful operation
  554. content:
  555. application/json:
  556. schema:
  557. type: array
  558. items:
  559. $ref: '#/components/schemas/BaseVirtualFolder'
  560. '400':
  561. $ref: '#/components/responses/BadRequest'
  562. '401':
  563. $ref: '#/components/responses/Unauthorized'
  564. '403':
  565. $ref: '#/components/responses/Forbidden'
  566. '500':
  567. $ref: '#/components/responses/InternalServerError'
  568. default:
  569. $ref: '#/components/responses/DefaultResponse'
  570. post:
  571. tags:
  572. - folders
  573. summary: Add folder
  574. operationId: add_folder
  575. description: Adds a new folder. A quota scan is required to update the used files/size
  576. requestBody:
  577. required: true
  578. content:
  579. application/json:
  580. schema:
  581. $ref: '#/components/schemas/BaseVirtualFolder'
  582. responses:
  583. '201':
  584. description: successful operation
  585. content:
  586. application/json:
  587. schema:
  588. $ref: '#/components/schemas/BaseVirtualFolder'
  589. '400':
  590. $ref: '#/components/responses/BadRequest'
  591. '401':
  592. $ref: '#/components/responses/Unauthorized'
  593. '403':
  594. $ref: '#/components/responses/Forbidden'
  595. '500':
  596. $ref: '#/components/responses/InternalServerError'
  597. default:
  598. $ref: '#/components/responses/DefaultResponse'
  599. '/folders/{name}':
  600. parameters:
  601. - name: name
  602. in: path
  603. description: folder name
  604. required: true
  605. schema:
  606. type: string
  607. get:
  608. tags:
  609. - folders
  610. summary: Find folders by name
  611. description: Returns the folder with the given name if it exists.
  612. operationId: get_folder_by_name
  613. responses:
  614. '200':
  615. description: successful operation
  616. content:
  617. application/json:
  618. schema:
  619. $ref: '#/components/schemas/BaseVirtualFolder'
  620. '400':
  621. $ref: '#/components/responses/BadRequest'
  622. '401':
  623. $ref: '#/components/responses/Unauthorized'
  624. '403':
  625. $ref: '#/components/responses/Forbidden'
  626. '404':
  627. $ref: '#/components/responses/NotFound'
  628. '500':
  629. $ref: '#/components/responses/InternalServerError'
  630. default:
  631. $ref: '#/components/responses/DefaultResponse'
  632. put:
  633. tags:
  634. - folders
  635. summary: Update folder
  636. description: Updates an existing folder
  637. operationId: update_folder
  638. requestBody:
  639. required: true
  640. content:
  641. application/json:
  642. schema:
  643. $ref: '#/components/schemas/BaseVirtualFolder'
  644. responses:
  645. '200':
  646. description: successful operation
  647. content:
  648. application/json:
  649. schema:
  650. $ref: '#/components/schemas/ApiResponse'
  651. example:
  652. message: User updated
  653. '400':
  654. $ref: '#/components/responses/BadRequest'
  655. '401':
  656. $ref: '#/components/responses/Unauthorized'
  657. '403':
  658. $ref: '#/components/responses/Forbidden'
  659. '404':
  660. $ref: '#/components/responses/NotFound'
  661. '500':
  662. $ref: '#/components/responses/InternalServerError'
  663. default:
  664. $ref: '#/components/responses/DefaultResponse'
  665. delete:
  666. tags:
  667. - folders
  668. summary: Delete folder
  669. description: Deletes an existing folder
  670. operationId: delete_folder
  671. responses:
  672. '200':
  673. description: successful operation
  674. content:
  675. application/json:
  676. schema:
  677. $ref: '#/components/schemas/ApiResponse'
  678. example:
  679. message: User deleted
  680. '400':
  681. $ref: '#/components/responses/BadRequest'
  682. '401':
  683. $ref: '#/components/responses/Unauthorized'
  684. '403':
  685. $ref: '#/components/responses/Forbidden'
  686. '404':
  687. $ref: '#/components/responses/NotFound'
  688. '500':
  689. $ref: '#/components/responses/InternalServerError'
  690. default:
  691. $ref: '#/components/responses/DefaultResponse'
  692. /admins:
  693. get:
  694. tags:
  695. - admins
  696. summary: Get admins
  697. description: Returns an array with one or more admins. For security reasons hashed passwords are omitted in the response
  698. operationId: get_admins
  699. parameters:
  700. - in: query
  701. name: offset
  702. schema:
  703. type: integer
  704. minimum: 0
  705. default: 0
  706. required: false
  707. - in: query
  708. name: limit
  709. schema:
  710. type: integer
  711. minimum: 1
  712. maximum: 500
  713. default: 100
  714. required: false
  715. description: 'The maximum number of items to return. Max value is 500, default is 100'
  716. - in: query
  717. name: order
  718. required: false
  719. description: Ordering admins by username. Default ASC
  720. schema:
  721. type: string
  722. enum:
  723. - ASC
  724. - DESC
  725. example: ASC
  726. responses:
  727. '200':
  728. description: successful operation
  729. content:
  730. application/json:
  731. schema:
  732. type: array
  733. items:
  734. $ref: '#/components/schemas/Admin'
  735. '400':
  736. $ref: '#/components/responses/BadRequest'
  737. '401':
  738. $ref: '#/components/responses/Unauthorized'
  739. '403':
  740. $ref: '#/components/responses/Forbidden'
  741. '500':
  742. $ref: '#/components/responses/InternalServerError'
  743. default:
  744. $ref: '#/components/responses/DefaultResponse'
  745. post:
  746. tags:
  747. - admins
  748. summary: Add admin
  749. description: Adds a new admin
  750. operationId: add_admin
  751. requestBody:
  752. required: true
  753. content:
  754. application/json:
  755. schema:
  756. $ref: '#/components/schemas/Admin'
  757. examples:
  758. example-1:
  759. value:
  760. id: 1
  761. status: 0
  762. username: string
  763. description: string
  764. password: pa$$word
  765. email: [email protected]
  766. permissions:
  767. - '*'
  768. filters:
  769. allow_list:
  770. - 192.0.2.0/24
  771. - '2001:db8::/32'
  772. additional_info: string
  773. responses:
  774. '201':
  775. description: successful operation
  776. content:
  777. application/json:
  778. schema:
  779. $ref: '#/components/schemas/Admin'
  780. '400':
  781. $ref: '#/components/responses/BadRequest'
  782. '401':
  783. $ref: '#/components/responses/Unauthorized'
  784. '403':
  785. $ref: '#/components/responses/Forbidden'
  786. '500':
  787. $ref: '#/components/responses/InternalServerError'
  788. default:
  789. $ref: '#/components/responses/DefaultResponse'
  790. '/admins/{username}':
  791. parameters:
  792. - name: username
  793. in: path
  794. description: the admin username
  795. required: true
  796. schema:
  797. type: string
  798. get:
  799. tags:
  800. - admins
  801. summary: Find admins by username
  802. description: Returns the admin with the given username, if it exists. For security reasons the hashed password is omitted in the response
  803. operationId: get_admin_by_username
  804. responses:
  805. '200':
  806. description: successful operation
  807. content:
  808. application/json:
  809. schema:
  810. $ref: '#/components/schemas/Admin'
  811. '400':
  812. $ref: '#/components/responses/BadRequest'
  813. '401':
  814. $ref: '#/components/responses/Unauthorized'
  815. '403':
  816. $ref: '#/components/responses/Forbidden'
  817. '404':
  818. $ref: '#/components/responses/NotFound'
  819. '500':
  820. $ref: '#/components/responses/InternalServerError'
  821. default:
  822. $ref: '#/components/responses/DefaultResponse'
  823. put:
  824. tags:
  825. - admins
  826. summary: Update admin
  827. description: Updates an existing admin
  828. operationId: update_admin
  829. requestBody:
  830. required: true
  831. content:
  832. application/json:
  833. schema:
  834. $ref: '#/components/schemas/Admin'
  835. responses:
  836. '200':
  837. description: successful operation
  838. content:
  839. application/json:
  840. schema:
  841. $ref: '#/components/schemas/ApiResponse'
  842. example:
  843. message: Admin updated
  844. '400':
  845. $ref: '#/components/responses/BadRequest'
  846. '401':
  847. $ref: '#/components/responses/Unauthorized'
  848. '403':
  849. $ref: '#/components/responses/Forbidden'
  850. '404':
  851. $ref: '#/components/responses/NotFound'
  852. '500':
  853. $ref: '#/components/responses/InternalServerError'
  854. default:
  855. $ref: '#/components/responses/DefaultResponse'
  856. delete:
  857. tags:
  858. - admins
  859. summary: Delete admin
  860. description: Deletes an existing admin
  861. operationId: delete_admin
  862. responses:
  863. '200':
  864. description: successful operation
  865. content:
  866. application/json:
  867. schema:
  868. $ref: '#/components/schemas/ApiResponse'
  869. example:
  870. message: Admin deleted
  871. '400':
  872. $ref: '#/components/responses/BadRequest'
  873. '401':
  874. $ref: '#/components/responses/Unauthorized'
  875. '403':
  876. $ref: '#/components/responses/Forbidden'
  877. '404':
  878. $ref: '#/components/responses/NotFound'
  879. '500':
  880. $ref: '#/components/responses/InternalServerError'
  881. default:
  882. $ref: '#/components/responses/DefaultResponse'
  883. /users:
  884. get:
  885. tags:
  886. - users
  887. summary: Get users
  888. description: Returns an array with one or more users. For security reasons hashed passwords are omitted in the response
  889. operationId: get_users
  890. parameters:
  891. - in: query
  892. name: offset
  893. schema:
  894. type: integer
  895. minimum: 0
  896. default: 0
  897. required: false
  898. - in: query
  899. name: limit
  900. schema:
  901. type: integer
  902. minimum: 1
  903. maximum: 500
  904. default: 100
  905. required: false
  906. description: 'The maximum number of items to return. Max value is 500, default is 100'
  907. - in: query
  908. name: order
  909. required: false
  910. description: Ordering users by username. Default ASC
  911. schema:
  912. type: string
  913. enum:
  914. - ASC
  915. - DESC
  916. example: ASC
  917. responses:
  918. '200':
  919. description: successful operation
  920. content:
  921. application/json:
  922. schema:
  923. type: array
  924. items:
  925. $ref: '#/components/schemas/User'
  926. '400':
  927. $ref: '#/components/responses/BadRequest'
  928. '401':
  929. $ref: '#/components/responses/Unauthorized'
  930. '403':
  931. $ref: '#/components/responses/Forbidden'
  932. '500':
  933. $ref: '#/components/responses/InternalServerError'
  934. default:
  935. $ref: '#/components/responses/DefaultResponse'
  936. post:
  937. tags:
  938. - users
  939. summary: Add user
  940. description: Adds a new user
  941. operationId: add_user
  942. requestBody:
  943. required: true
  944. content:
  945. application/json:
  946. schema:
  947. $ref: '#/components/schemas/User'
  948. responses:
  949. '201':
  950. description: successful operation
  951. content:
  952. application/json:
  953. schema:
  954. $ref: '#/components/schemas/User'
  955. '400':
  956. $ref: '#/components/responses/BadRequest'
  957. '401':
  958. $ref: '#/components/responses/Unauthorized'
  959. '403':
  960. $ref: '#/components/responses/Forbidden'
  961. '500':
  962. $ref: '#/components/responses/InternalServerError'
  963. default:
  964. $ref: '#/components/responses/DefaultResponse'
  965. '/users/{username}':
  966. parameters:
  967. - name: username
  968. in: path
  969. description: the username
  970. required: true
  971. schema:
  972. type: string
  973. get:
  974. tags:
  975. - users
  976. summary: Find users by username
  977. description: Returns the user with the given username if it exists. For security reasons the hashed password is omitted in the response
  978. operationId: get_user_by_username
  979. responses:
  980. '200':
  981. description: successful operation
  982. content:
  983. application/json:
  984. schema:
  985. $ref: '#/components/schemas/User'
  986. '400':
  987. $ref: '#/components/responses/BadRequest'
  988. '401':
  989. $ref: '#/components/responses/Unauthorized'
  990. '403':
  991. $ref: '#/components/responses/Forbidden'
  992. '404':
  993. $ref: '#/components/responses/NotFound'
  994. '500':
  995. $ref: '#/components/responses/InternalServerError'
  996. default:
  997. $ref: '#/components/responses/DefaultResponse'
  998. put:
  999. tags:
  1000. - users
  1001. summary: Update user
  1002. description: 'Updates an existing user and optionally disconnects it, if connected, to apply the new settings'
  1003. operationId: update_user
  1004. parameters:
  1005. - in: query
  1006. name: disconnect
  1007. schema:
  1008. type: integer
  1009. enum:
  1010. - 0
  1011. - 1
  1012. description: |
  1013. Disconnect:
  1014. * `0` The user will not be disconnected and it will continue to use the old configuration until connected. This is the default
  1015. * `1` The user will be disconnected after a successful update. It must login again and so it will be forced to use the new configuration
  1016. requestBody:
  1017. required: true
  1018. content:
  1019. application/json:
  1020. schema:
  1021. $ref: '#/components/schemas/User'
  1022. responses:
  1023. '200':
  1024. description: successful operation
  1025. content:
  1026. application/json:
  1027. schema:
  1028. $ref: '#/components/schemas/ApiResponse'
  1029. example:
  1030. message: User updated
  1031. '400':
  1032. $ref: '#/components/responses/BadRequest'
  1033. '401':
  1034. $ref: '#/components/responses/Unauthorized'
  1035. '403':
  1036. $ref: '#/components/responses/Forbidden'
  1037. '404':
  1038. $ref: '#/components/responses/NotFound'
  1039. '500':
  1040. $ref: '#/components/responses/InternalServerError'
  1041. default:
  1042. $ref: '#/components/responses/DefaultResponse'
  1043. delete:
  1044. tags:
  1045. - users
  1046. summary: Delete user
  1047. description: Deletes an existing user
  1048. operationId: delete_user
  1049. responses:
  1050. '200':
  1051. description: successful operation
  1052. content:
  1053. application/json:
  1054. schema:
  1055. $ref: '#/components/schemas/ApiResponse'
  1056. example:
  1057. message: User deleted
  1058. '400':
  1059. $ref: '#/components/responses/BadRequest'
  1060. '401':
  1061. $ref: '#/components/responses/Unauthorized'
  1062. '403':
  1063. $ref: '#/components/responses/Forbidden'
  1064. '404':
  1065. $ref: '#/components/responses/NotFound'
  1066. '500':
  1067. $ref: '#/components/responses/InternalServerError'
  1068. default:
  1069. $ref: '#/components/responses/DefaultResponse'
  1070. /status:
  1071. get:
  1072. tags:
  1073. - maintenance
  1074. summary: Get status
  1075. description: Retrieves the status of the active services
  1076. operationId: get_status
  1077. responses:
  1078. '200':
  1079. description: successful operation
  1080. content:
  1081. application/json:
  1082. schema:
  1083. $ref: '#/components/schemas/ServicesStatus'
  1084. '400':
  1085. $ref: '#/components/responses/BadRequest'
  1086. '401':
  1087. $ref: '#/components/responses/Unauthorized'
  1088. '403':
  1089. $ref: '#/components/responses/Forbidden'
  1090. '500':
  1091. $ref: '#/components/responses/InternalServerError'
  1092. default:
  1093. $ref: '#/components/responses/DefaultResponse'
  1094. /dumpdata:
  1095. get:
  1096. tags:
  1097. - maintenance
  1098. summary: Dump data
  1099. description: 'Backups data as data provider independent JSON. The backup can be saved in a local file on the server, to avoid exposing sensitive data over the network, or returned as response body. The output of dumpdata can be used as input for loaddata'
  1100. operationId: dumpdata
  1101. parameters:
  1102. - in: query
  1103. name: output-file
  1104. schema:
  1105. type: string
  1106. description: Path for the file to write the JSON serialized data to. This path is relative to the configured "backups_path". If this file already exists it will be overwritten. To return the backup as response body set `output_data` to true instead.
  1107. - in: query
  1108. name: output-data
  1109. schema:
  1110. type: integer
  1111. enum:
  1112. - 0
  1113. - 1
  1114. description: |
  1115. output data:
  1116. * `0` or any other value != 1, the backup will be saved to a file on the server, `output_file` is required
  1117. * `1` the backup will be returned as response body
  1118. - in: query
  1119. name: indent
  1120. schema:
  1121. type: integer
  1122. enum:
  1123. - 0
  1124. - 1
  1125. description: |
  1126. indent:
  1127. * `0` no indentation. This is the default
  1128. * `1` format the output JSON
  1129. responses:
  1130. '200':
  1131. description: successful operation
  1132. content:
  1133. application/json:
  1134. schema:
  1135. oneOf:
  1136. - $ref: '#/components/schemas/ApiResponse'
  1137. - $ref: '#/components/schemas/BackupData'
  1138. '400':
  1139. $ref: '#/components/responses/BadRequest'
  1140. '401':
  1141. $ref: '#/components/responses/Unauthorized'
  1142. '403':
  1143. $ref: '#/components/responses/Forbidden'
  1144. '500':
  1145. $ref: '#/components/responses/InternalServerError'
  1146. default:
  1147. $ref: '#/components/responses/DefaultResponse'
  1148. /loaddata:
  1149. parameters:
  1150. - in: query
  1151. name: scan-quota
  1152. schema:
  1153. type: integer
  1154. enum:
  1155. - 0
  1156. - 1
  1157. - 2
  1158. description: |
  1159. Quota scan:
  1160. * `0` no quota scan is done, the imported users/folders will have used_quota_size and used_quota_files = 0 or the existing values if they already exists. This is the default
  1161. * `1` scan quota
  1162. * `2` scan quota if the user has quota restrictions
  1163. required: false
  1164. - in: query
  1165. name: mode
  1166. schema:
  1167. type: integer
  1168. enum:
  1169. - 0
  1170. - 1
  1171. - 2
  1172. description: |
  1173. Mode:
  1174. * `0` New users/admins are added, existing users/admins are updated. This is the default
  1175. * `1` New users/admins are added, existing users/admins are not modified
  1176. * `2` New users are added, existing users are updated and, if connected, they are disconnected and so forced to use the new configuration
  1177. get:
  1178. tags:
  1179. - maintenance
  1180. summary: Load data from path
  1181. description: 'Restores SFTPGo data from a JSON backup file on the server. Users, folders and admins will be restored one by one and the restore is stopped if a user/folder/admin cannot be added or updated, so it could happen a partial restore'
  1182. operationId: loaddata_from_file
  1183. parameters:
  1184. - in: query
  1185. name: input-file
  1186. schema:
  1187. type: string
  1188. required: true
  1189. description: Path for the file to read the JSON serialized data from. This can be an absolute path or a path relative to the configured "backups_path". The max allowed file size is 10MB
  1190. responses:
  1191. '200':
  1192. description: successful operation
  1193. content:
  1194. application/json:
  1195. schema:
  1196. $ref: '#/components/schemas/ApiResponse'
  1197. example:
  1198. message: Data restored
  1199. '400':
  1200. $ref: '#/components/responses/BadRequest'
  1201. '401':
  1202. $ref: '#/components/responses/Unauthorized'
  1203. '403':
  1204. $ref: '#/components/responses/Forbidden'
  1205. '500':
  1206. $ref: '#/components/responses/InternalServerError'
  1207. default:
  1208. $ref: '#/components/responses/DefaultResponse'
  1209. post:
  1210. tags:
  1211. - maintenance
  1212. summary: Load data
  1213. description: 'Restores SFTPGo data from a JSON backup. Users, folders and admins will be restored one by one and the restore is stopped if a user/folder/admin cannot be added or updated, so it could happen a partial restore'
  1214. operationId: loaddata_from_request_body
  1215. requestBody:
  1216. required: true
  1217. content:
  1218. application/json:
  1219. schema:
  1220. $ref: '#/components/schemas/BackupData'
  1221. responses:
  1222. '200':
  1223. description: successful operation
  1224. content:
  1225. application/json:
  1226. schema:
  1227. $ref: '#/components/schemas/ApiResponse'
  1228. example:
  1229. message: Data restored
  1230. '400':
  1231. $ref: '#/components/responses/BadRequest'
  1232. '401':
  1233. $ref: '#/components/responses/Unauthorized'
  1234. '403':
  1235. $ref: '#/components/responses/Forbidden'
  1236. '500':
  1237. $ref: '#/components/responses/InternalServerError'
  1238. default:
  1239. $ref: '#/components/responses/DefaultResponse'
  1240. components:
  1241. responses:
  1242. BadRequest:
  1243. description: Bad Request
  1244. content:
  1245. application/json:
  1246. schema:
  1247. $ref: '#/components/schemas/ApiResponse'
  1248. Unauthorized:
  1249. description: Unauthorized
  1250. content:
  1251. application/json:
  1252. schema:
  1253. $ref: '#/components/schemas/ApiResponse'
  1254. Forbidden:
  1255. description: Forbidden
  1256. content:
  1257. application/json:
  1258. schema:
  1259. $ref: '#/components/schemas/ApiResponse'
  1260. NotFound:
  1261. description: Not Found
  1262. content:
  1263. application/json:
  1264. schema:
  1265. $ref: '#/components/schemas/ApiResponse'
  1266. Conflict:
  1267. description: Conflict
  1268. content:
  1269. application/json:
  1270. schema:
  1271. $ref: '#/components/schemas/ApiResponse'
  1272. InternalServerError:
  1273. description: Internal Server Error
  1274. content:
  1275. application/json:
  1276. schema:
  1277. $ref: '#/components/schemas/ApiResponse'
  1278. DefaultResponse:
  1279. description: Unexpected Error
  1280. content:
  1281. application/json:
  1282. schema:
  1283. $ref: '#/components/schemas/ApiResponse'
  1284. schemas:
  1285. Permission:
  1286. type: string
  1287. enum:
  1288. - '*'
  1289. - list
  1290. - download
  1291. - upload
  1292. - overwrite
  1293. - delete
  1294. - rename
  1295. - create_dirs
  1296. - create_symlinks
  1297. - chmod
  1298. - chown
  1299. - chtimes
  1300. description: |
  1301. Permissions:
  1302. * `*` - all permissions are granted
  1303. * `list` - list items is allowed
  1304. * `download` - download files is allowed
  1305. * `upload` - upload files is allowed
  1306. * `overwrite` - overwrite an existing file, while uploading, is allowed. upload permission is required to allow file overwrite
  1307. * `delete` - delete files or directories is allowed
  1308. * `rename` - rename files or directories is allowed
  1309. * `create_dirs` - create directories is allowed
  1310. * `create_symlinks` - create links is allowed
  1311. * `chmod` changing file or directory permissions is allowed
  1312. * `chown` changing file or directory owner and group is allowed
  1313. * `chtimes` changing file or directory access and modification time is allowed
  1314. DirPermissions:
  1315. type: object
  1316. additionalProperties:
  1317. type: array
  1318. items:
  1319. $ref: '#/components/schemas/Permission'
  1320. minItems: 1
  1321. minProperties: 1
  1322. description: 'hash map with directory as key and an array of permissions as value. Directories must be absolute paths, permissions for root directory ("/") are required'
  1323. AdminPermissions:
  1324. type: string
  1325. enum:
  1326. - '*'
  1327. - add_users
  1328. - edit_users
  1329. - del_users
  1330. - view_users
  1331. - view_conns
  1332. - close_conns
  1333. - view_status
  1334. - manage_admins
  1335. - quota_scans
  1336. - manage_system
  1337. - manage_defender
  1338. - view_defender
  1339. description: |
  1340. Admin permissions:
  1341. * `*` - all permissions are granted
  1342. * `add_users` - add new users is allowed
  1343. * `edit_users` - change existing users is allowed
  1344. * `del_users` - remove users is allowed
  1345. * `view_users` - list users is allowed
  1346. * `view_conns` - list active connections is allowed
  1347. * `close_conns` - close active connections is allowed
  1348. * `view_status` - view the server status is allowed
  1349. * `manage_admins` - manage other admins is allowed
  1350. * `manage_defender` - remove ip from the dynamic blocklist is allowed
  1351. * `view_defender` - list the dynamic blocklist is allowed
  1352. LoginMethods:
  1353. type: string
  1354. enum:
  1355. - publickey
  1356. - password
  1357. - keyboard-interactive
  1358. - publickey+password
  1359. - publickey+keyboard-interactive
  1360. - TLSCertificate
  1361. - TLSCertificate+password
  1362. description: |
  1363. Available login methods. To enable multi-step authentication you have to allow only multi-step login methods
  1364. * `publickey`
  1365. * `password`
  1366. * `keyboard-interactive`
  1367. * `publickey+password` - multi-step auth: public key and password
  1368. * `publickey+keyboard-interactive` - multi-step auth: public key and keyboard interactive
  1369. * `TLSCertificate`
  1370. * `TLSCertificate+password` - multi-step auth: TLS client certificate and password
  1371. SupportedProtocols:
  1372. type: string
  1373. enum:
  1374. - SSH
  1375. - FTP
  1376. - DAV
  1377. description: |
  1378. Protocols:
  1379. * `SSH` - includes both SFTP and SSH commands
  1380. * `FTP` - plain FTP and FTPES/FTPS
  1381. * `DAV` - WebDAV over HTTP/HTTPS
  1382. PatternsFilter:
  1383. type: object
  1384. properties:
  1385. path:
  1386. type: string
  1387. description: 'exposed virtual path, if no other specific filter is defined, the filter apply for sub directories too. For example if filters are defined for the paths "/" and "/sub" then the filters for "/" are applied for any file outside the "/sub" directory'
  1388. allowed_patterns:
  1389. type: array
  1390. items:
  1391. type: string
  1392. description: 'list of, case insensitive, allowed shell like file patterns.'
  1393. example:
  1394. - '*.jpg'
  1395. - a*b?.png
  1396. denied_patterns:
  1397. type: array
  1398. items:
  1399. type: string
  1400. description: 'list of, case insensitive, denied shell like file patterns. Denied patterns are evaluated before the allowed ones'
  1401. example:
  1402. - '*.zip'
  1403. ExtensionsFilter:
  1404. type: object
  1405. properties:
  1406. path:
  1407. type: string
  1408. description: 'exposed virtual path, if no other specific filter is defined, the filter apply for sub directories too. For example if filters are defined for the paths "/" and "/sub" then the filters for "/" are applied for any file outside the "/sub" directory'
  1409. allowed_extensions:
  1410. type: array
  1411. items:
  1412. type: string
  1413. description: 'list of, case insensitive, allowed files extension. Shell like expansion is not supported so you have to specify `.jpg` and not `*.jpg`'
  1414. example:
  1415. - .jpg
  1416. - .png
  1417. denied_extensions:
  1418. type: array
  1419. items:
  1420. type: string
  1421. description: 'list of, case insensitive, denied files extension. Denied file extensions are evaluated before the allowed ones'
  1422. example:
  1423. - .zip
  1424. HooksFilter:
  1425. type: object
  1426. properties:
  1427. external_auth_disabled:
  1428. type: boolean
  1429. example: false
  1430. description: If true, the external auth hook, if defined, will not be executed
  1431. pre_login_disabled:
  1432. type: boolean
  1433. example: false
  1434. description: If true, the pre-login hook, if defined, will not be executed
  1435. check_password_disabled:
  1436. type: boolean
  1437. example: false
  1438. description: If true, the check password hook, if defined, will not be executed
  1439. description: User specific hook overrides
  1440. UserFilters:
  1441. type: object
  1442. properties:
  1443. allowed_ip:
  1444. type: array
  1445. items:
  1446. type: string
  1447. description: 'only clients connecting from these IP/Mask are allowed. IP/Mask must be in CIDR notation as defined in RFC 4632 and RFC 4291, for example "192.0.2.0/24" or "2001:db8::/32"'
  1448. example:
  1449. - 192.0.2.0/24
  1450. - '2001:db8::/32'
  1451. denied_ip:
  1452. type: array
  1453. items:
  1454. type: string
  1455. description: clients connecting from these IP/Mask are not allowed. Denied rules are evaluated before allowed ones
  1456. example:
  1457. - 172.16.0.0/16
  1458. denied_login_methods:
  1459. type: array
  1460. items:
  1461. $ref: '#/components/schemas/LoginMethods'
  1462. description: if null or empty any available login method is allowed
  1463. denied_protocols:
  1464. type: array
  1465. items:
  1466. $ref: '#/components/schemas/SupportedProtocols'
  1467. description: if null or empty any available protocol is allowed
  1468. file_patterns:
  1469. type: array
  1470. items:
  1471. $ref: '#/components/schemas/PatternsFilter'
  1472. description: 'filters based on shell like file patterns. These restrictions do not apply to files listing for performance reasons, so a denied file cannot be downloaded/overwritten/renamed but it will still be in the list of files. Please note that these restrictions can be easily bypassed'
  1473. file_extensions:
  1474. type: array
  1475. items:
  1476. $ref: '#/components/schemas/ExtensionsFilter'
  1477. description: 'filters based on shell like patterns. Deprecated, use file_patterns. These restrictions do not apply to files listing for performance reasons, so a denied file cannot be downloaded/overwritten/renamed but it will still be in the list of files. Please note that these restrictions can be easily bypassed'
  1478. max_upload_file_size:
  1479. type: integer
  1480. format: int64
  1481. description: 'maximum allowed size, as bytes, for a single file upload. The upload will be aborted if/when the size of the file being sent exceeds this limit. 0 means unlimited. This restriction does not apply for SSH system commands such as `git` and `rsync`'
  1482. tls_username:
  1483. type: string
  1484. enum:
  1485. - None
  1486. - CommonName
  1487. description: 'defines the TLS certificate field to use as username. For FTP clients it must match the name provided using the "USER" command. For WebDAV, if no username is provided, the CN will be used as username. For WebDAV clients it must match the implicit or provided username. Ignored if mutual TLS is disabled'
  1488. hooks:
  1489. $ref: '#/components/schemas/HooksFilter'
  1490. disable_fs_checks:
  1491. type: boolean
  1492. example: false
  1493. description: Disable checks for existence and automatic creation of home directory and virtual folders. SFTPGo requires that the user's home directory, virtual folder root, and intermediate paths to virtual folders exist to work properly. If you already know that the required directories exist, disabling these checks will speed up login. You could, for example, disable these checks after the first login
  1494. description: Additional user restrictions
  1495. Secret:
  1496. type: object
  1497. properties:
  1498. status:
  1499. type: string
  1500. enum:
  1501. - Plain
  1502. - AES-256-GCM
  1503. - Secretbox
  1504. - GCP
  1505. - AWS
  1506. - VaultTransit
  1507. - Redacted
  1508. description: 'Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value'
  1509. payload:
  1510. type: string
  1511. key:
  1512. type: string
  1513. additional_data:
  1514. type: string
  1515. mode:
  1516. type: integer
  1517. description: 1 means encrypted using a master key
  1518. description: The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existig secret will be preserved
  1519. S3Config:
  1520. type: object
  1521. properties:
  1522. bucket:
  1523. type: string
  1524. minLength: 1
  1525. region:
  1526. type: string
  1527. minLength: 1
  1528. access_key:
  1529. type: string
  1530. access_secret:
  1531. $ref: '#/components/schemas/Secret'
  1532. endpoint:
  1533. type: string
  1534. description: optional endpoint
  1535. storage_class:
  1536. type: string
  1537. upload_part_size:
  1538. type: integer
  1539. description: 'the buffer size (in MB) to use for multipart uploads. The minimum allowed part size is 5MB, and if this value is set to zero, the default value (5MB) for the AWS SDK will be used. The minimum allowed value is 5.'
  1540. upload_concurrency:
  1541. type: integer
  1542. description: 'the number of parts to upload in parallel. If this value is set to zero, the default value (2) will be used'
  1543. key_prefix:
  1544. type: string
  1545. description: 'key_prefix is similar to a chroot directory for a local filesystem. If specified the user will only see contents that starts with this prefix and so you can restrict access to a specific virtual folder. The prefix, if not empty, must not start with "/" and must end with "/". If empty the whole bucket contents will be available'
  1546. example: folder/subfolder/
  1547. description: S3 Compatible Object Storage configuration details
  1548. GCSConfig:
  1549. type: object
  1550. properties:
  1551. bucket:
  1552. type: string
  1553. minLength: 1
  1554. credentials:
  1555. $ref: '#/components/schemas/Secret'
  1556. automatic_credentials:
  1557. type: integer
  1558. enum:
  1559. - 0
  1560. - 1
  1561. description: |
  1562. Automatic credentials:
  1563. * `0` - disabled, explicit credentials, using a JSON credentials file, must be provided. This is the default value if the field is null
  1564. * `1` - enabled, we try to use the Application Default Credentials (ADC) strategy to find your application's credentials
  1565. storage_class:
  1566. type: string
  1567. key_prefix:
  1568. type: string
  1569. description: 'key_prefix is similar to a chroot directory for a local filesystem. If specified the user will only see contents that starts with this prefix and so you can restrict access to a specific virtual folder. The prefix, if not empty, must not start with "/" and must end with "/". If empty the whole bucket contents will be available'
  1570. example: folder/subfolder/
  1571. description: 'Google Cloud Storage configuration details. The "credentials" field must be populated only when adding/updating a user. It will be always omitted, since there are sensitive data, when you search/get users'
  1572. AzureBlobFsConfig:
  1573. type: object
  1574. properties:
  1575. container:
  1576. type: string
  1577. account_name:
  1578. type: string
  1579. description: 'Storage Account Name, leave blank to use SAS URL'
  1580. account_key:
  1581. $ref: '#/components/schemas/Secret'
  1582. sas_url:
  1583. type: string
  1584. description: 'Shared access signature URL, leave blank if using account/key'
  1585. endpoint:
  1586. type: string
  1587. description: 'optional endpoint. Default is "blob.core.windows.net". If you use the emulator the endpoint must include the protocol, for example "http://127.0.0.1:10000"'
  1588. upload_part_size:
  1589. type: integer
  1590. description: 'the buffer size (in MB) to use for multipart uploads. If this value is set to zero, the default value (4MB) will be used.'
  1591. upload_concurrency:
  1592. type: integer
  1593. description: 'the number of parts to upload in parallel. If this value is set to zero, the default value (2) will be used'
  1594. access_tier:
  1595. type: string
  1596. enum:
  1597. - ''
  1598. - Archive
  1599. - Hot
  1600. - Cool
  1601. key_prefix:
  1602. type: string
  1603. description: 'key_prefix is similar to a chroot directory for a local filesystem. If specified the user will only see contents that starts with this prefix and so you can restrict access to a specific virtual folder. The prefix, if not empty, must not start with "/" and must end with "/". If empty the whole container contents will be available'
  1604. example: folder/subfolder/
  1605. use_emulator:
  1606. type: boolean
  1607. description: Azure Blob Storage configuration details
  1608. CryptFsConfig:
  1609. type: object
  1610. properties:
  1611. passphrase:
  1612. $ref: '#/components/schemas/Secret'
  1613. description: Crypt filesystem configuration details
  1614. SFTPFsConfig:
  1615. type: object
  1616. properties:
  1617. endpoint:
  1618. type: string
  1619. description: 'remote SFTP endpoint as host:port'
  1620. username:
  1621. type: string
  1622. description: you can specify a password or private key or both. In the latter case the private key will be tried first.
  1623. password:
  1624. $ref: '#/components/schemas/Secret'
  1625. private_key:
  1626. $ref: '#/components/schemas/Secret'
  1627. fingerprints:
  1628. type: array
  1629. items:
  1630. type: string
  1631. description: 'SHA256 fingerprints to use for host key verification. If you don''t provide any fingerprint the remote host key will not be verified, this is a security risk'
  1632. prefix:
  1633. type: string
  1634. description: Specifying a prefix you can restrict all operations to a given path within the remote SFTP server.
  1635. disable_concurrent_reads:
  1636. type: boolean
  1637. description: Concurrent reads are safe to use and disabling them will degrade performance. Some servers automatically delete files once they are downloaded. Using concurrent reads is problematic with such servers.
  1638. buffer_size:
  1639. type: integer
  1640. minimum: 0
  1641. maximum: 16
  1642. example: 2
  1643. description: The size of the buffer (in MB) to use for transfers. By enabling buffering, the reads and writes, from/to the remote SFTP server, are split in multiple concurrent requests and this allows data to be transferred at a faster rate, over high latency networks, by overlapping round-trip times. With buffering enabled, resuming uploads is not supported and a file cannot be opened for both reading and writing at the same time. 0 means disabled.
  1644. FilesystemConfig:
  1645. type: object
  1646. properties:
  1647. provider:
  1648. type: integer
  1649. enum:
  1650. - 0
  1651. - 1
  1652. - 2
  1653. - 3
  1654. - 4
  1655. - 5
  1656. description: |
  1657. Providers:
  1658. * `0` - Local filesystem
  1659. * `1` - S3 Compatible Object Storage
  1660. * `2` - Google Cloud Storage
  1661. * `3` - Azure Blob Storage
  1662. * `4` - Local filesystem encrypted
  1663. * `5` - SFTP
  1664. s3config:
  1665. $ref: '#/components/schemas/S3Config'
  1666. gcsconfig:
  1667. $ref: '#/components/schemas/GCSConfig'
  1668. azblobconfig:
  1669. $ref: '#/components/schemas/AzureBlobFsConfig'
  1670. cryptconfig:
  1671. $ref: '#/components/schemas/CryptFsConfig'
  1672. sftpconfig:
  1673. $ref: '#/components/schemas/SFTPFsConfig'
  1674. description: Storage filesystem details
  1675. BaseVirtualFolder:
  1676. type: object
  1677. properties:
  1678. id:
  1679. type: integer
  1680. format: int32
  1681. minimum: 1
  1682. name:
  1683. type: string
  1684. description: unique name for this virtual folder
  1685. mapped_path:
  1686. type: string
  1687. description: absolute filesystem path to use as virtual folder
  1688. description:
  1689. type: string
  1690. description: optional description
  1691. used_quota_size:
  1692. type: integer
  1693. format: int64
  1694. used_quota_files:
  1695. type: integer
  1696. format: int32
  1697. last_quota_update:
  1698. type: integer
  1699. format: int64
  1700. description: Last quota update as unix timestamp in milliseconds
  1701. users:
  1702. type: array
  1703. items:
  1704. type: string
  1705. description: list of usernames associated with this virtual folder
  1706. filesystem:
  1707. $ref: '#/components/schemas/FilesystemConfig'
  1708. description: Defines the filesystem for the virtual folder and the used quota limits. The same folder can be shared among multiple users and each user can have different quota limits or a different virtual path.
  1709. VirtualFolder:
  1710. allOf:
  1711. - $ref: '#/components/schemas/BaseVirtualFolder'
  1712. - type: object
  1713. properties:
  1714. virtual_path:
  1715. type: string
  1716. quota_size:
  1717. type: integer
  1718. format: int64
  1719. description: 'Quota as size in bytes. 0 menas unlimited, -1 means included in user quota. Please note that quota is updated if files are added/removed via SFTPGo otherwise a quota scan or a manual quota update is needed'
  1720. quota_files:
  1721. type: integer
  1722. format: int32
  1723. description: 'Quota as number of files. 0 menas unlimited, , -1 means included in user quota. Please note that quota is updated if files are added/removed via SFTPGo otherwise a quota scan or a manual quota update is needed'
  1724. required:
  1725. - virtual_path
  1726. description: 'A virtual folder is a mapping between a SFTPGo virtual path and a filesystem path outside the user home directory. The specified paths must be absolute and the virtual path cannot be "/", it must be a sub directory. The parent directory for the specified virtual path must exist. SFTPGo will try to automatically create any missing parent directory for the configured virtual folders at user login.'
  1727. User:
  1728. type: object
  1729. properties:
  1730. id:
  1731. type: integer
  1732. format: int32
  1733. minimum: 1
  1734. status:
  1735. type: integer
  1736. enum:
  1737. - 0
  1738. - 1
  1739. description: |
  1740. status:
  1741. * `0` user is disabled, login is not allowed
  1742. * `1` user is enabled
  1743. username:
  1744. type: string
  1745. description: username is unique
  1746. description:
  1747. type: string
  1748. description: 'optional description, for example the user full name'
  1749. expiration_date:
  1750. type: integer
  1751. format: int64
  1752. description: expiration date as unix timestamp in milliseconds. An expired account cannot login. 0 means no expiration
  1753. password:
  1754. type: string
  1755. format: password
  1756. description: password or public key/SSH user certificate are mandatory. If the password has no known hashing algo prefix it will be stored, by default, using bcrypt, argon2id is supported too. You can send a password hashed as bcrypt ($2a$ prefix), argon2id, pbkdf2 or unix crypt and it will be stored as is. For security reasons this field is omitted when you search/get users
  1757. public_keys:
  1758. type: array
  1759. items:
  1760. type: string
  1761. description: a password or at least one public key/SSH user certificate are mandatory.
  1762. home_dir:
  1763. type: string
  1764. description: path to the user home directory. The user cannot upload or download files outside this directory. SFTPGo tries to automatically create this folder if missing. Must be an absolute path
  1765. virtual_folders:
  1766. type: array
  1767. items:
  1768. $ref: '#/components/schemas/VirtualFolder'
  1769. description: mapping between virtual SFTPGo paths and filesystem paths outside the user home directory. Supported for local filesystem only. If one or more of the specified folders are not inside the dataprovider they will be automatically created. You have to create the folder on the filesystem yourself
  1770. uid:
  1771. type: integer
  1772. format: int32
  1773. minimum: 0
  1774. maximum: 2147483647
  1775. description: 'if you run SFTPGo as root user, the created files and directories will be assigned to this uid. 0 means no change, the owner will be the user that runs SFTPGo. Ignored on windows'
  1776. gid:
  1777. type: integer
  1778. format: int32
  1779. minimum: 0
  1780. maximum: 2147483647
  1781. description: 'if you run SFTPGo as root user, the created files and directories will be assigned to this gid. 0 means no change, the group will be the one of the user that runs SFTPGo. Ignored on windows'
  1782. max_sessions:
  1783. type: integer
  1784. format: int32
  1785. description: Limit the sessions that a user can open. 0 means unlimited
  1786. quota_size:
  1787. type: integer
  1788. format: int64
  1789. description: Quota as size in bytes. 0 menas unlimited. Please note that quota is updated if files are added/removed via SFTPGo otherwise a quota scan or a manual quota update is needed
  1790. quota_files:
  1791. type: integer
  1792. format: int32
  1793. description: Quota as number of files. 0 menas unlimited. Please note that quota is updated if files are added/removed via SFTPGo otherwise a quota scan or a manual quota update is needed
  1794. permissions:
  1795. type: object
  1796. items:
  1797. $ref: '#/components/schemas/DirPermissions'
  1798. minItems: 1
  1799. example:
  1800. /:
  1801. - '*'
  1802. /somedir:
  1803. - list
  1804. - download
  1805. used_quota_size:
  1806. type: integer
  1807. format: int64
  1808. used_quota_files:
  1809. type: integer
  1810. format: int32
  1811. last_quota_update:
  1812. type: integer
  1813. format: int64
  1814. description: Last quota update as unix timestamp in milliseconds
  1815. upload_bandwidth:
  1816. type: integer
  1817. format: int32
  1818. description: 'Maximum upload bandwidth as KB/s, 0 means unlimited'
  1819. download_bandwidth:
  1820. type: integer
  1821. format: int32
  1822. description: 'Maximum download bandwidth as KB/s, 0 means unlimited'
  1823. last_login:
  1824. type: integer
  1825. format: int64
  1826. description: Last user login as unix timestamp in milliseconds. It is saved at most once every 10 minutes
  1827. filters:
  1828. $ref: '#/components/schemas/UserFilters'
  1829. filesystem:
  1830. $ref: '#/components/schemas/FilesystemConfig'
  1831. additional_info:
  1832. type: string
  1833. description: Free form text field for external systems
  1834. AdminFilters:
  1835. type: object
  1836. properties:
  1837. allow_list:
  1838. type: array
  1839. items:
  1840. type: string
  1841. description: 'only clients connecting from these IP/Mask are allowed. IP/Mask must be in CIDR notation as defined in RFC 4632 and RFC 4291, for example "192.0.2.0/24" or "2001:db8::/32"'
  1842. example:
  1843. - 192.0.2.0/24
  1844. - '2001:db8::/32'
  1845. Admin:
  1846. type: object
  1847. properties:
  1848. id:
  1849. type: integer
  1850. format: int32
  1851. minimum: 1
  1852. status:
  1853. type: integer
  1854. enum:
  1855. - 0
  1856. - 1
  1857. description: |
  1858. status:
  1859. * `0` user is disabled, login is not allowed
  1860. * `1` user is enabled
  1861. username:
  1862. type: string
  1863. description: username is unique
  1864. description:
  1865. type: string
  1866. description: 'optional description, for example the admin full name'
  1867. password:
  1868. type: string
  1869. format: password
  1870. description: Admin password. For security reasons this field is omitted when you search/get admins
  1871. email:
  1872. type: string
  1873. format: email
  1874. permissions:
  1875. type: array
  1876. items:
  1877. $ref: '#/components/schemas/AdminPermissions'
  1878. filters:
  1879. $ref: '#/components/schemas/AdminFilters'
  1880. additional_info:
  1881. type: string
  1882. description: Free form text field
  1883. Transfer:
  1884. type: object
  1885. properties:
  1886. operation_type:
  1887. type: string
  1888. enum:
  1889. - upload
  1890. - download
  1891. description: |
  1892. Operations:
  1893. * `upload`
  1894. * `download`
  1895. path:
  1896. type: string
  1897. description: file path for the upload/download
  1898. start_time:
  1899. type: integer
  1900. format: int64
  1901. description: start time as unix timestamp in milliseconds
  1902. size:
  1903. type: integer
  1904. format: int64
  1905. description: bytes transferred
  1906. ConnectionStatus:
  1907. type: object
  1908. properties:
  1909. username:
  1910. type: string
  1911. description: connected username
  1912. connection_id:
  1913. type: string
  1914. description: unique connection identifier
  1915. client_version:
  1916. type: string
  1917. description: client version
  1918. remote_address:
  1919. type: string
  1920. description: Remote address for the connected client
  1921. connection_time:
  1922. type: integer
  1923. format: int64
  1924. description: connection time as unix timestamp in milliseconds
  1925. command:
  1926. type: string
  1927. description: Last SSH/FTP command or WebDAV method
  1928. last_activity:
  1929. type: integer
  1930. format: int64
  1931. description: last client activity as unix timestamp in milliseconds
  1932. protocol:
  1933. type: string
  1934. enum:
  1935. - SFTP
  1936. - SCP
  1937. - SSH
  1938. - FTP
  1939. - DAV
  1940. active_transfers:
  1941. type: array
  1942. items:
  1943. $ref: '#/components/schemas/Transfer'
  1944. QuotaScan:
  1945. type: object
  1946. properties:
  1947. username:
  1948. type: string
  1949. description: username with an active scan
  1950. start_time:
  1951. type: integer
  1952. format: int64
  1953. description: scan start time as unix timestamp in milliseconds
  1954. FolderQuotaScan:
  1955. type: object
  1956. properties:
  1957. name:
  1958. type: string
  1959. description: folder name with an active scan
  1960. start_time:
  1961. type: integer
  1962. format: int64
  1963. description: scan start time as unix timestamp in milliseconds
  1964. SSHHostKey:
  1965. type: object
  1966. properties:
  1967. path:
  1968. type: string
  1969. fingerprint:
  1970. type: string
  1971. SSHBinding:
  1972. type: object
  1973. properties:
  1974. address:
  1975. type: string
  1976. description: TCP address the server listen on
  1977. port:
  1978. type: integer
  1979. description: the port used for serving requests
  1980. apply_proxy_config:
  1981. type: boolean
  1982. description: 'apply the proxy configuration, if any'
  1983. WebDAVBinding:
  1984. type: object
  1985. properties:
  1986. address:
  1987. type: string
  1988. description: TCP address the server listen on
  1989. port:
  1990. type: integer
  1991. description: the port used for serving requests
  1992. enable_https:
  1993. type: boolean
  1994. client_auth_type:
  1995. type: integer
  1996. description: 1 means that client certificate authentication is required in addition to HTTP basic authentication
  1997. FTPDBinding:
  1998. type: object
  1999. properties:
  2000. address:
  2001. type: string
  2002. description: TCP address the server listen on
  2003. port:
  2004. type: integer
  2005. description: the port used for serving requests
  2006. apply_proxy_config:
  2007. type: boolean
  2008. description: 'apply the proxy configuration, if any'
  2009. tls_mode:
  2010. type: integer
  2011. enum:
  2012. - 0
  2013. - 1
  2014. - 2
  2015. description: |
  2016. * `0` - clear or explicit TLS * `1` - explicit TLS required * `2` - implicit TLS
  2017. force_passive_ip:
  2018. type: string
  2019. description: External IP address to expose for passive connections
  2020. client_auth_type:
  2021. type: integer
  2022. description: 1 means that client certificate authentication is required in addition to FTP authentication
  2023. SSHServiceStatus:
  2024. type: object
  2025. properties:
  2026. is_active:
  2027. type: boolean
  2028. bindings:
  2029. type: array
  2030. items:
  2031. $ref: '#/components/schemas/SSHBinding'
  2032. nullable: true
  2033. host_keys:
  2034. type: array
  2035. items:
  2036. $ref: '#/components/schemas/SSHHostKey'
  2037. nullable: true
  2038. ssh_commands:
  2039. type: array
  2040. items:
  2041. type: string
  2042. FTPPassivePortRange:
  2043. type: object
  2044. properties:
  2045. start:
  2046. type: integer
  2047. end:
  2048. type: integer
  2049. FTPServiceStatus:
  2050. type: object
  2051. properties:
  2052. is_active:
  2053. type: boolean
  2054. bindings:
  2055. type: array
  2056. items:
  2057. $ref: '#/components/schemas/FTPDBinding'
  2058. nullable: true
  2059. passive_port_range:
  2060. $ref: '#/components/schemas/FTPPassivePortRange'
  2061. WebDAVServiceStatus:
  2062. type: object
  2063. properties:
  2064. is_active:
  2065. type: boolean
  2066. bindings:
  2067. type: array
  2068. items:
  2069. $ref: '#/components/schemas/WebDAVBinding'
  2070. nullable: true
  2071. DataProviderStatus:
  2072. type: object
  2073. properties:
  2074. is_active:
  2075. type: boolean
  2076. driver:
  2077. type: string
  2078. error:
  2079. type: string
  2080. ServicesStatus:
  2081. type: object
  2082. properties:
  2083. ssh:
  2084. $ref: '#/components/schemas/SSHServiceStatus'
  2085. ftp:
  2086. $ref: '#/components/schemas/FTPServiceStatus'
  2087. webdav:
  2088. $ref: '#/components/schemas/WebDAVServiceStatus'
  2089. data_provider:
  2090. $ref: '#/components/schemas/DataProviderStatus'
  2091. defender:
  2092. type: object
  2093. properties:
  2094. is_active:
  2095. type: boolean
  2096. BanStatus:
  2097. type: object
  2098. properties:
  2099. date_time:
  2100. type: string
  2101. format: date-time
  2102. nullable: true
  2103. description: if null the host is not banned
  2104. ScoreStatus:
  2105. type: object
  2106. properties:
  2107. score:
  2108. type: integer
  2109. description: if 0 the host is not listed
  2110. BackupData:
  2111. type: object
  2112. properties:
  2113. users:
  2114. type: array
  2115. items:
  2116. $ref: '#/components/schemas/User'
  2117. folders:
  2118. type: array
  2119. items:
  2120. $ref: '#/components/schemas/BaseVirtualFolder'
  2121. admins:
  2122. type: array
  2123. items:
  2124. $ref: '#/components/schemas/Admin'
  2125. version:
  2126. type: integer
  2127. PwdChange:
  2128. type: object
  2129. properties:
  2130. current_password:
  2131. type: string
  2132. new_password:
  2133. type: string
  2134. ApiResponse:
  2135. type: object
  2136. properties:
  2137. message:
  2138. type: string
  2139. description: 'message, can be empty'
  2140. error:
  2141. type: string
  2142. description: error description if any
  2143. VersionInfo:
  2144. type: object
  2145. properties:
  2146. version:
  2147. type: string
  2148. build_date:
  2149. type: string
  2150. commit_hash:
  2151. type: string
  2152. features:
  2153. type: array
  2154. items:
  2155. type: string
  2156. description: 'Features for the current build. Available features are "portable", "bolt", "mysql", "sqlite", "pgsql", "s3", "gcs", "metrics". If a feature is available it has a "+" prefix, otherwise a "-" prefix'
  2157. Token:
  2158. type: object
  2159. properties:
  2160. access_token:
  2161. type: string
  2162. expires_at:
  2163. type: string
  2164. format: date-time
  2165. securitySchemes:
  2166. BasicAuth:
  2167. type: http
  2168. scheme: basic
  2169. BearerAuth:
  2170. type: http
  2171. scheme: bearer
  2172. bearerFormat: JWT