Archived
2

added user status and prediction user

This commit is contained in:
VLE2FE
2020-08-26 19:37:36 +02:00
parent efbf73032d
commit 597a8f3084
21 changed files with 477 additions and 80 deletions

View File

@ -1,7 +1,7 @@
/model/groups:
get:
summary: list all available groups
description: 'Auth: basic, levels: read, write, dev, admin'
summary: list all available groups for user
description: 'Auth: basic, levels: predict, read, write, dev, admin'
tags:
- /model
responses:
@ -137,5 +137,32 @@
$ref: 'api.yaml#/components/responses/403'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
/model/authorized/{url}:
parameters:
- name: url
in: path
required: true
description: URLComponent encoded URL of the requested model
schema:
type: string
example: https%3A%2F%2Fdefinma-model-test.apps.de1.bosch-iot-cloud.com%2Fpredict%2FH2O_A3WG6
get:
summary: check user permissions for model URL
description: 'Auth: basic, levels: predict, read, write, dev, admin. dev and admin users can access all models,
other users need the model specified by an admin in user.models'
tags:
- /model
security:
- BasicAuth: []
responses:
200:
$ref: 'api.yaml#/components/responses/Ok'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
500:
$ref: 'api.yaml#/components/responses/500'

View File

@ -213,8 +213,16 @@ User:
items:
type: string
example: Alpha II
models:
type: array
description: _ids of allowed models
items:
type: string
example: 5ea0450ed851c30a90e70894
ModelItem:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
name:
type: string

View File

@ -14,7 +14,13 @@
schema:
type: array
items:
$ref: 'api.yaml#/components/schemas/User'
allOf:
- $ref: 'api.yaml#/components/schemas/User'
properties:
status:
type: string
description: can be deleted/new
example: new
401:
$ref: 'api.yaml#/components/responses/401'
403:
@ -24,7 +30,7 @@
/user:
get:
summary: list own user details
description: 'Auth: basic, levels: read, write, dev, admin'
description: 'Auth: basic, levels: predict, read, write, dev, admin'
tags:
- /user
security:
@ -44,7 +50,7 @@
$ref: 'api.yaml#/components/responses/500'
put:
summary: change user details
description: 'Auth: basic, levels: read, write, dev, admin'
description: 'Auth: basic, levels: predict, read, write, dev, admin'
tags:
- /user
security:
@ -88,7 +94,7 @@
$ref: 'api.yaml#/components/responses/500'
delete:
summary: delete user
description: 'Auth: basic, levels: read, write, dev, admin'
description: 'Auth: basic, levels: predict, read, write, dev, admin'
tags:
- /user
security:
@ -173,6 +179,25 @@
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
/user/restore/{name}:
put:
summary: restore deleted user
description: 'Auth: basic, levels: admin'
tags:
- /user
security:
- BasicAuth: []
responses:
200:
$ref: 'api.yaml#/components/responses/Ok'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
/user/key:
get:
summary: get API key for the user