rest-api.yml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. # see me at: https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyterlab/jupyterlab_server/main/jupyterlab_server/rest-api.yml#/default
  2. openapi: "3.0.3"
  3. info:
  4. title: JupyterLab Server
  5. description: The REST API for JupyterLab Server
  6. version: 1.0.0
  7. license:
  8. name: BSD-3-Clause
  9. paths:
  10. /lab/api/listings/%40jupyterlab/extensionmanager-extension/listings.json:
  11. get:
  12. summary: Get Extension Listings Specs
  13. description: |
  14. Gets the list of extension metadata for the application
  15. responses:
  16. "200":
  17. description: The Extension Listing specs
  18. content:
  19. application/json:
  20. schema:
  21. properties:
  22. blocked_extension_uris:
  23. type: array
  24. description: list of blocked extension uris
  25. items:
  26. type: string
  27. allowed_extension_uris:
  28. type: array
  29. description: list of allowed extension uris
  30. items:
  31. type: string
  32. blocked_extensions:
  33. type: array
  34. description: list of blocked extensions
  35. items:
  36. $ref: "#/components/schemas/ListEntry"
  37. allowed_extensions:
  38. type: array
  39. description: list of blocked extensions
  40. items:
  41. $ref: "#/components/schemas/ListEntry"
  42. /lab/api/settings/:
  43. get:
  44. summary: Get Settings List
  45. description: |
  46. Gets the list of all application settings data
  47. responses:
  48. "200":
  49. description: The Application Settings Data
  50. content:
  51. application/json:
  52. schema:
  53. properties:
  54. settings:
  55. type: array
  56. description: List of application settings entries
  57. items:
  58. $ref: "#/components/schemas/SettingsEntry"
  59. /lab/api/settings/{schema_name}:
  60. parameters:
  61. - name: schema_name
  62. description: Schema Name
  63. in: path
  64. required: true
  65. schema:
  66. type: string
  67. get:
  68. summary: Get the settings data for a given schema
  69. description: |
  70. Gets the settings data for a given schema
  71. responses:
  72. "200":
  73. description: The Settings Data
  74. content:
  75. application/json:
  76. schema:
  77. $ref: "#/components/schemas/SettingsEntry"
  78. put:
  79. summary: Override the settings data for a given schema
  80. description: |
  81. Overrides the settings data for a given schema
  82. requestBody:
  83. required: true
  84. description: raw settings data
  85. content:
  86. application/json:
  87. schema:
  88. type: object
  89. properties:
  90. raw:
  91. type: string
  92. responses:
  93. "204":
  94. description: The setting has been updated
  95. /lab/api/themes/{theme_file}:
  96. parameters:
  97. - name: theme_file
  98. description: Theme file path
  99. in: path
  100. required: true
  101. schema:
  102. type: string
  103. get:
  104. summary: Get a static theme file
  105. description: |
  106. Gets the static theme file at a given path
  107. responses:
  108. "200":
  109. description: The Theme File
  110. /lab/api/translations/:
  111. get:
  112. summary: Get Translation Bundles
  113. description: |
  114. Gets the list of translation bundles
  115. responses:
  116. "200":
  117. description: The Extension Listing specs
  118. content:
  119. application/json:
  120. schema:
  121. type: object
  122. properties:
  123. data:
  124. type: object
  125. additionalProperties:
  126. $ref: "#/components/schemas/TranslationEntry"
  127. message:
  128. type: string
  129. /lab/api/translations/{locale}:
  130. parameters:
  131. - name: locale
  132. description: Locale name
  133. in: path
  134. required: true
  135. schema:
  136. type: string
  137. get:
  138. summary: Get the translation data for locale
  139. description: |
  140. Gets the translation data for a given locale
  141. responses:
  142. "200":
  143. description: The Local Data
  144. content:
  145. application/json:
  146. schema:
  147. type: object
  148. properties:
  149. data:
  150. type: object
  151. message:
  152. type: string
  153. /lab/api/workspaces/:
  154. get:
  155. summary: Get Workspace Data
  156. description: |
  157. Gets the list of workspace data
  158. responses:
  159. "200":
  160. description: The Workspace specs
  161. content:
  162. application/json:
  163. schema:
  164. type: object
  165. properties:
  166. workspaces:
  167. type: object
  168. properties:
  169. ids:
  170. type: array
  171. items:
  172. type: string
  173. values:
  174. type: array
  175. items:
  176. $ref: "#/components/schemas/Workspace"
  177. /lab/api/workspaces/{space_name}:
  178. parameters:
  179. - name: space_name
  180. description: Workspace name
  181. in: path
  182. required: true
  183. schema:
  184. type: string
  185. get:
  186. summary: Get the workspace data for name
  187. description: |
  188. Gets the workspace data for a given workspace name
  189. responses:
  190. "200":
  191. description: The Workspace Data
  192. content:
  193. application/json:
  194. schema:
  195. $ref: "#/components/schemas/Workspace"
  196. put:
  197. summary: Override the workspace data for a given name
  198. description: |
  199. Overrides the workspace data for a given workspace name
  200. requestBody:
  201. required: true
  202. description: raw workspace data
  203. content:
  204. application/json:
  205. schema:
  206. $ref: "#/components/schemas/Workspace"
  207. responses:
  208. "204":
  209. description: The workspace has been updated
  210. delete:
  211. summary: Delete the workspace data for a given name
  212. description: |
  213. Deletes the workspace data for a given workspace name
  214. responses:
  215. "204":
  216. description: The workspace has been deleted
  217. /lab/api/licenses/:
  218. get:
  219. summary: License report
  220. description: |
  221. Get the third-party licenses for the core application and all federated
  222. extensions
  223. parameters:
  224. - name: full_text
  225. description: Return full license texts
  226. in: query
  227. schema:
  228. type: boolean
  229. - name: format
  230. in: query
  231. description: The format in which to report licenses
  232. schema:
  233. type: string
  234. enum:
  235. - csv
  236. - json
  237. - markdown
  238. - name: bundles
  239. description: A regular expression to limit the names of bundles reported
  240. in: query
  241. schema:
  242. type: string
  243. - name: download
  244. in: query
  245. description: Whether to set a representative filename header
  246. schema:
  247. type: boolean
  248. responses:
  249. "200":
  250. description: A license report
  251. content:
  252. application/markdown:
  253. schema:
  254. type: string
  255. text/csv:
  256. schema:
  257. type: string
  258. application/json:
  259. schema:
  260. $ref: "#/components/schemas/LicenseBundles"
  261. components:
  262. schemas:
  263. ListEntry:
  264. type: object
  265. properties:
  266. name:
  267. type: string
  268. regexp:
  269. type: string
  270. type:
  271. type: string
  272. reason:
  273. type: string
  274. creation_date:
  275. type: string
  276. last_update_date:
  277. type: string
  278. SettingsEntry:
  279. type: object
  280. properties:
  281. id:
  282. type: string
  283. schema:
  284. type: object
  285. version:
  286. type: string
  287. raw:
  288. type: string
  289. settings:
  290. type: object
  291. warning:
  292. type: string
  293. nullable: true
  294. last_modified:
  295. type: string
  296. nullable: true
  297. created:
  298. type: string
  299. nullable: true
  300. TranslationEntry:
  301. type: object
  302. properties:
  303. data:
  304. type: object
  305. properties:
  306. displayName:
  307. type: string
  308. nativeName:
  309. type: string
  310. message:
  311. type: string
  312. Workspace:
  313. type: object
  314. properties:
  315. data:
  316. type: object
  317. metadata:
  318. type: object
  319. properties:
  320. id:
  321. type: string
  322. last_modified:
  323. type: string
  324. created:
  325. type: string
  326. LicenseBundles:
  327. type: object
  328. properties:
  329. bundles:
  330. type: object
  331. additionalProperties:
  332. type: object
  333. properties:
  334. packages:
  335. type: array
  336. items:
  337. type: object
  338. properties:
  339. extractedText:
  340. type: string
  341. licenseId:
  342. type: string
  343. name:
  344. type: string
  345. versionInfo:
  346. type: string