File size: 9,794 Bytes
d1ceb73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# see me at: https://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyterlab/jupyterlab_server/main/jupyterlab_server/rest-api.yml#/default
openapi: "3.0.3"
info:
  title: JupyterLab Server
  description: The REST API for JupyterLab Server
  version: 1.0.0
  license:
    name: BSD-3-Clause

paths:
  /lab/api/listings/%40jupyterlab/extensionmanager-extension/listings.json:
    get:
      summary: Get Extension Listings Specs
      description: |
        Gets the list of extension metadata for the application
      responses:
        "200":
          description: The Extension Listing specs
          content:
            application/json:
              schema:
                properties:
                  blocked_extension_uris:
                    type: array
                    description: list of blocked extension uris
                    items:
                      type: string
                  allowed_extension_uris:
                    type: array
                    description: list of allowed extension uris
                    items:
                      type: string
                  blocked_extensions:
                    type: array
                    description: list of blocked extensions
                    items:
                      $ref: "#/components/schemas/ListEntry"
                  allowed_extensions:
                    type: array
                    description: list of blocked extensions
                    items:
                      $ref: "#/components/schemas/ListEntry"

  /lab/api/settings/:
    get:
      summary: Get Settings List
      description: |
        Gets the list of all application settings data
      responses:
        "200":
          description: The Application Settings Data
          content:
            application/json:
              schema:
                properties:
                  settings:
                    type: array
                    description: List of application settings entries
                    items:
                      $ref: "#/components/schemas/SettingsEntry"

  /lab/api/settings/{schema_name}:
    parameters:
      - name: schema_name
        description: Schema Name
        in: path
        required: true
        schema:
          type: string
    get:
      summary: Get the settings data for a given schema
      description: |
        Gets the settings data for a given schema
      responses:
        "200":
          description: The Settings Data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SettingsEntry"
    put:
      summary: Override the settings data for a given schema
      description: |
        Overrides the settings data for a given schema
      requestBody:
        required: true
        description: raw settings data
        content:
          application/json:
            schema:
              type: object
              properties:
                raw:
                  type: string
      responses:
        "204":
          description: The setting has been updated

  /lab/api/themes/{theme_file}:
    parameters:
      - name: theme_file
        description: Theme file path
        in: path
        required: true
        schema:
          type: string
    get:
      summary: Get a static theme file
      description: |
        Gets the static theme file at a given path
      responses:
        "200":
          description: The Theme File

  /lab/api/translations/:
    get:
      summary: Get Translation Bundles
      description: |
        Gets the list of translation bundles
      responses:
        "200":
          description: The Extension Listing specs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    additionalProperties:
                      $ref: "#/components/schemas/TranslationEntry"
                  message:
                    type: string

  /lab/api/translations/{locale}:
    parameters:
      - name: locale
        description: Locale name
        in: path
        required: true
        schema:
          type: string
    get:
      summary: Get the translation data for locale
      description: |
        Gets the translation data for a given locale
      responses:
        "200":
          description: The Local Data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                  message:
                    type: string

  /lab/api/workspaces/:
    get:
      summary: Get Workspace Data
      description: |
        Gets the list of workspace data
      responses:
        "200":
          description: The Workspace specs
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspaces:
                    type: object
                    properties:
                      ids:
                        type: array
                        items:
                          type: string
                      values:
                        type: array
                        items:
                          $ref: "#/components/schemas/Workspace"

  /lab/api/workspaces/{space_name}:
    parameters:
      - name: space_name
        description: Workspace name
        in: path
        required: true
        schema:
          type: string
    get:
      summary: Get the workspace data for name
      description: |
        Gets the workspace data for a given workspace name
      responses:
        "200":
          description: The Workspace Data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Workspace"
    put:
      summary: Override the workspace data for a given name
      description: |
        Overrides the workspace data for a given workspace name
      requestBody:
        required: true
        description: raw workspace data
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Workspace"
      responses:
        "204":
          description: The workspace has been updated

    delete:
      summary: Delete the workspace data for a given name
      description: |
        Deletes the workspace data for a given workspace name
      responses:
        "204":
          description: The workspace has been deleted
  /lab/api/licenses/:
    get:
      summary: License report
      description: |
        Get the third-party licenses for the core application and all federated
        extensions
      parameters:
        - name: full_text
          description: Return full license texts
          in: query
          schema:
            type: boolean
        - name: format
          in: query
          description: The format in which to report licenses
          schema:
            type: string
            enum:
              - csv
              - json
              - markdown
        - name: bundles
          description: A regular expression to limit the names of bundles reported
          in: query
          schema:
            type: string
        - name: download
          in: query
          description: Whether to set a representative filename header
          schema:
            type: boolean
      responses:
        "200":
          description: A license report
          content:
            application/markdown:
              schema:
                type: string
            text/csv:
              schema:
                type: string
            application/json:
              schema:
                $ref: "#/components/schemas/LicenseBundles"

components:
  schemas:
    ListEntry:
      type: object
      properties:
        name:
          type: string
        regexp:
          type: string
        type:
          type: string
        reason:
          type: string
        creation_date:
          type: string
        last_update_date:
          type: string
    SettingsEntry:
      type: object
      properties:
        id:
          type: string
        schema:
          type: object
        version:
          type: string
        raw:
          type: string
        settings:
          type: object
        warning:
          type: string
          nullable: true
        last_modified:
          type: string
          nullable: true
        created:
          type: string
          nullable: true
    TranslationEntry:
      type: object
      properties:
        data:
          type: object
          properties:
            displayName:
              type: string
            nativeName:
              type: string
        message:
          type: string
    Workspace:
      type: object
      properties:
        data:
          type: object
        metadata:
          type: object
          properties:
            id:
              type: string
            last_modified:
              type: string
            created:
              type: string
    LicenseBundles:
      type: object
      properties:
        bundles:
          type: object
          additionalProperties:
            type: object
            properties:
              packages:
                type: array
                items:
                  type: object
                  properties:
                    extractedText:
                      type: string
                    licenseId:
                      type: string
                    name:
                      type: string
                    versionInfo:
                      type: string