Skip to content

Commit d15f3b8

Browse files
authored
Updates to webapp service yaml (#74)
- Document import route - Document changing workspace - Include workspaces in webapp metadata - Other minor cleanup
1 parent d941776 commit d15f3b8

File tree

1 file changed

+80
-6
lines changed

1 file changed

+80
-6
lines changed

webapp/niapp.yaml

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,25 @@ paths:
195195
$ref: '#/responses/Unauthorized'
196196
default:
197197
$ref: '#/responses/Error'
198+
'/webapps/import':
199+
post:
200+
tags:
201+
- metadata
202+
summary: Import webapp metadata
203+
description: >-
204+
Import a list of webapp metadata.
205+
206+
The webapp Id, created timestamp, and updated timestamp are optional. These fields will be generated by the service if they are not provided in the request.
207+
operationId: import-webapps
208+
parameters:
209+
- $ref: '#/parameters/ImportWebAppsRequest'
210+
responses:
211+
200:
212+
$ref: '#/responses/ImportWebAppsResponse'
213+
401:
214+
$ref: '#/responses/Unauthorized'
215+
default:
216+
$ref: '#/responses/Error'
198217
'/webapps/{id}/content':
199218
get:
200219
tags:
@@ -329,6 +348,11 @@ parameters:
329348
name:
330349
type: string
331350
description: The webapp's name
351+
example: My webapp
352+
workspace:
353+
type: string
354+
description: The workspace Id for the webapp. If this is not specified, the webapp will be created in the default workspace.
355+
example: 0c80cf49-54e9-4e92-b117-3bfa574caa84
332356
policyIds:
333357
type: array
334358
items:
@@ -353,6 +377,11 @@ parameters:
353377
name:
354378
type: string
355379
description: The webapp's name
380+
example: My webapp
381+
workspace:
382+
type: string
383+
description: The workspace Id for the webapp. If this is not specified, the webapp will remain in its existing workspace.
384+
example: 0c80cf49-54e9-4e92-b117-3bfa574caa84
356385
policyIds:
357386
type: array
358387
items:
@@ -380,12 +409,27 @@ parameters:
380409
- private
381410
- direct
382411
- public
412+
example: direct
383413
description: The webapp's sharing option
384414
sharedEmails:
385415
type: array
386416
items:
387417
type: string
418+
388419
description: List of emails of users to share the webapp with. Applies when "shared" option is "direct"
420+
ImportWebAppsRequest:
421+
in: body
422+
name: ImportWebAppsRequest
423+
description: Import WebApp Metadata Request
424+
schema:
425+
type: object
426+
title: Import WebApp Metadata Request
427+
properties:
428+
webapps:
429+
description: List of webapps to import
430+
type: array
431+
items:
432+
$ref: '#/definitions/WebApp'
389433
DuplicateWebAppRequest:
390434
in: body
391435
name: DuplicateWebAppRequest
@@ -400,7 +444,7 @@ parameters:
400444
example: My webapp name
401445
workspace:
402446
type: string
403-
description: The workspace in which to create the new webapp. If no workspace is specified, the new webapp will be put in the default workspace.
447+
description: The Id of the workspace in which to create the new webapp. If no workspace is specified, the new webapp will be put in the default workspace.
404448
example: 0c80cf49-54e9-4e92-b117-3bfa574caa84
405449

406450
responses:
@@ -427,6 +471,17 @@ responses:
427471
description: Create WebApp Response
428472
schema:
429473
$ref: '#/definitions/WebApp'
474+
ImportWebAppsResponse:
475+
description: Import WebApps Response
476+
schema:
477+
title: Import WebApps Response
478+
type: object
479+
properties:
480+
webapps:
481+
description: List of webapps that were imported
482+
type: array
483+
items:
484+
$ref: '#/definitions/WebApp'
430485
UpdateWebAppResponse:
431486
description: Update WebApp Response
432487
schema:
@@ -472,12 +527,20 @@ definitions:
472527
type: string
473528
enum:
474529
- Dashboard
530+
- TileDashboard
475531
- DashboardTemplate
476532
- WebVI
533+
- Visualization
534+
- VisualizationTemplate
477535
description: The webapp type
478536
name:
479537
type: string
480538
description: The webapp name
539+
example: My webapp
540+
workspace:
541+
type: string
542+
description: The Id of the workspace containing the webapp
543+
example: 0c80cf49-54e9-4e92-b117-3bfa574caa84
481544
shared:
482545
type: string
483546
enum:
@@ -495,7 +558,7 @@ definitions:
495558
type: array
496559
items:
497560
type: string
498-
example: "asdsad-17a6-45323-b64b-65325287372d"
561+
example: asdsad-17a6-45323-b64b-65325287372d
499562
description: List of policy Ids associated with the webapp, which give it access to the user's resources"
500563
created:
501564
type: string
@@ -599,8 +662,19 @@ definitions:
599662
type: array
600663
items:
601664
type: string
665+
innerErrors:
666+
type: array
667+
items:
668+
$ref: '#/definitions/Error'
602669
example:
603-
name: DocumentManager.NotFound
604-
code: -252520
605-
message: The specified document was not found.
606-
args: []
670+
name: Skyline.OneOrMoreErrorsOccurred
671+
code: -251041
672+
message: >-
673+
One or more errors occurred. See the contained list for details of each
674+
error.
675+
args: []
676+
innerErrors:
677+
- name: DocumentManager.NotFound
678+
code: -252520
679+
message: The specified document was not found.
680+
args: []

0 commit comments

Comments
 (0)