2020-04-21 10:53:07 +02:00
|
|
|
/users:
|
|
|
|
get:
|
2020-04-24 12:25:32 +02:00
|
|
|
summary: lists all users
|
2020-04-23 13:59:45 +02:00
|
|
|
description: 'Auth: basic, levels: admin'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user API key
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
2020-04-24 12:25:32 +02:00
|
|
|
/user:
|
|
|
|
get:
|
|
|
|
summary: list own user details
|
|
|
|
description: 'Auth: basic, levels: read, write, maintain, admin'
|
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
put:
|
2020-04-27 15:10:14 +02:00
|
|
|
summary: change user details
|
2020-04-24 12:25:32 +02:00
|
|
|
description: 'Auth: basic, levels: read, write, maintain, admin'
|
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
allOf:
|
|
|
|
- $ref: 'oas.yaml#/components/schemas/_Id'
|
|
|
|
- $ref: 'oas.yaml#/components/schemas/UserName'
|
|
|
|
- $ref: 'oas.yaml#/components/schemas/Email'
|
|
|
|
properties:
|
|
|
|
pass:
|
|
|
|
type: string
|
|
|
|
writeOnly: true
|
|
|
|
example: Abc123!#
|
|
|
|
location:
|
|
|
|
type: string
|
|
|
|
example: Rng
|
|
|
|
device_name:
|
|
|
|
type: string
|
|
|
|
example: Alpha II
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
|
|
|
400:
|
|
|
|
$ref: 'oas.yaml#/components/responses/400'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
delete:
|
2020-04-27 15:10:14 +02:00
|
|
|
summary: delete user
|
2020-04-24 12:25:32 +02:00
|
|
|
description: 'Auth: basic, levels: read, write, maintain, admin'
|
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
$ref: 'oas.yaml#/components/responses/Ok'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
2020-04-21 10:53:07 +02:00
|
|
|
/user/{name}:
|
|
|
|
parameters:
|
|
|
|
- $ref: 'oas.yaml#/components/parameters/Name'
|
|
|
|
get:
|
2020-04-24 12:25:32 +02:00
|
|
|
summary: list user details
|
|
|
|
description: 'Auth: basic, levels: admin'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-04-24 12:25:32 +02:00
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
2020-04-21 10:53:07 +02:00
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
404:
|
|
|
|
$ref: 'oas.yaml#/components/responses/404'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
put:
|
2020-04-27 15:10:14 +02:00
|
|
|
summary: change user details
|
2020-04-24 12:25:32 +02:00
|
|
|
description: 'Auth: basic, levels: admin'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
2020-04-23 13:59:45 +02:00
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
2020-04-21 10:53:07 +02:00
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-04-24 12:25:32 +02:00
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
2020-04-21 10:53:07 +02:00
|
|
|
400:
|
|
|
|
$ref: 'oas.yaml#/components/responses/400'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
404:
|
|
|
|
$ref: 'oas.yaml#/components/responses/404'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
delete:
|
2020-04-27 15:10:14 +02:00
|
|
|
summary: delete user
|
2020-04-24 12:25:32 +02:00
|
|
|
description: 'Auth: basic, levels: admin'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
2020-04-23 13:59:45 +02:00
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
2020-04-21 10:53:07 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
$ref: 'oas.yaml#/components/responses/Ok'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
404:
|
|
|
|
$ref: 'oas.yaml#/components/responses/404'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
/user/key:
|
|
|
|
get:
|
2020-04-27 15:10:14 +02:00
|
|
|
summary: get API key for the user
|
2020-04-23 13:59:45 +02:00
|
|
|
description: 'Auth: basic, levels: read, write, maintain, dev, admin'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-04-27 14:26:51 +02:00
|
|
|
properties:
|
|
|
|
key:
|
|
|
|
type: string
|
|
|
|
example: 5ea0450ed851c30a90e70899
|
2020-04-21 10:53:07 +02:00
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
/user/new:
|
|
|
|
post:
|
2020-04-24 12:25:32 +02:00
|
|
|
summary: add new user
|
2020-04-23 13:59:45 +02:00
|
|
|
description: 'Auth: basic, levels: admin'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security:
|
|
|
|
- BasicAuth: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-04-22 17:24:15 +02:00
|
|
|
required:
|
|
|
|
- email
|
|
|
|
- name
|
|
|
|
- pass
|
|
|
|
- level
|
|
|
|
- location
|
|
|
|
- device_name
|
|
|
|
allOf:
|
|
|
|
- $ref: 'oas.yaml#/components/schemas/User'
|
2020-04-21 10:53:07 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
description: user details
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-04-22 17:24:15 +02:00
|
|
|
$ref: 'oas.yaml#/components/schemas/User'
|
2020-04-21 10:53:07 +02:00
|
|
|
400:
|
|
|
|
$ref: 'oas.yaml#/components/responses/400'
|
|
|
|
401:
|
|
|
|
$ref: 'oas.yaml#/components/responses/401'
|
|
|
|
403:
|
|
|
|
$ref: 'oas.yaml#/components/responses/403'
|
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|
|
|
|
/user/passreset:
|
|
|
|
post:
|
2020-04-24 12:25:32 +02:00
|
|
|
summary: reset password and send mail to restore
|
2020-04-23 13:59:45 +02:00
|
|
|
description: 'Auth: none'
|
2020-04-21 10:53:07 +02:00
|
|
|
tags:
|
|
|
|
- /user
|
|
|
|
security: []
|
|
|
|
requestBody:
|
|
|
|
required: true
|
|
|
|
description: mail saved in user profile to provide authentication
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2020-04-23 17:46:00 +02:00
|
|
|
allOf:
|
|
|
|
- $ref: 'oas.yaml#/components/schemas/UserName'
|
|
|
|
- $ref: 'oas.yaml#/components/schemas/Email'
|
2020-04-21 10:53:07 +02:00
|
|
|
responses:
|
|
|
|
200:
|
|
|
|
$ref: 'oas.yaml#/components/responses/Ok'
|
2020-04-23 17:46:00 +02:00
|
|
|
404:
|
|
|
|
$ref: 'oas.yaml#/components/responses/404'
|
2020-04-21 10:53:07 +02:00
|
|
|
500:
|
|
|
|
$ref: 'oas.yaml#/components/responses/500'
|