source: TFP-WebServer/WebServer/src/WebAPI/APIs/Permissions/WebUsers.openapi.yaml@ 462

Last change on this file since 462 was 462, checked in by alloc, 15 months ago

More OpenAPI specs added

File size: 4.7 KB
Line 
1openapi: 3.1.0
2info:
3 title: Web Users
4 version: '1'
5
6components:
7 schemas:
8 TypeWebUserName:
9 type: string
10
11 WebUserElement:
12 type: object
13 properties:
14 name:
15 $ref: '#/components/schemas/TypeWebUserName'
16 platformUserId:
17 $ref: './openapi.yaml#/components/schemas/TypeUserIdObject'
18 crossplatformUserId:
19 $ref: './openapi.yaml#/components/schemas/TypeUserIdObject'
20 required:
21 - name
22 - platformUserId
23 - crossplatformUserId
24
25 WebUserList:
26 type: array
27 items:
28 $ref: '#/components/schemas/WebUserElement'
29
30
31 requestBodies:
32 WebUserBodyIn:
33 content:
34 application/json:
35 schema:
36 type: object
37 properties:
38 password:
39 type: string
40 format: password
41 platformUserId:
42 $ref: './openapi.yaml#/components/schemas/TypeUserIdObject'
43 crossplatformUserId:
44 $ref: './openapi.yaml#/components/schemas/TypeUserIdObject'
45 required:
46 - password
47 - platformUserId
48 required: true
49
50
51 parameters:
52 WebUserNamePathParameter:
53 name: userName
54 in: path
55 required: true
56 schema:
57 $ref: '#/components/schemas/TypeWebUserName'
58
59
60paths:
61 /api/webusers:
62 get:
63 tags:
64 - Permissions
65 summary: Web user list
66 description: Fetch a list of all web users
67 operationId: WebUsers.get
68 responses:
69 200:
70 description: List of web users
71 content:
72 application/json:
73 schema:
74 type: object
75 properties:
76 data:
77 $ref: '#/components/schemas/WebUserList'
78 meta:
79 $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
80 required:
81 - data
82 - meta
83 403:
84 $ref: './openapi.yaml#/components/responses/Unauthorized'
85 security:
86 - apiTokenName: [ ]
87 apiTokenSecret: [ ]
88 - sessionCookie: [ ]
89
90
91 /api/webusers/{userName}:
92 # get:
93 # tags:
94 # - Permissions
95 # summary: Marker show
96 # description: Fetch a single defined map marker
97 # operationId: blacklist.get.id
98 # parameters:
99 # - $ref: '#/components/parameters/MarkerIdParameter'
100 # responses:
101 # 200:
102 # description: Single found marker
103 # $ref: '#/components/responses/MarkersBodyOut'
104 # 404:
105 # description: Marker ID not found, errorCode will be 'ID_NOT_FOUND'
106 # $ref: '#/components/responses/HttpEmptyEnvelopedResponse'
107
108 post:
109 tags:
110 - Permissions
111 summary: Web user create
112 description: Create or update a web user
113 operationId: WebUsers.post.id
114 parameters:
115 - $ref: '#/components/parameters/WebUserNamePathParameter'
116 requestBody:
117 $ref: '#/components/requestBodies/WebUserBodyIn'
118 responses:
119 201:
120 description: User created or updated
121 $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
122 400:
123 description: Invalid request body, errorCode will be one of 'NO_USERNAME', 'NO_OR_INVALID_PASSWORD', 'NO_PLATFORM_USER_ID', 'INVALID_PLATFORM_USER_ID' or 'INVALID_CROSSPLATFORM_USER_ID'
124 $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
125 403:
126 $ref: './openapi.yaml#/components/responses/Unauthorized'
127 security:
128 - apiTokenName: [ ]
129 apiTokenSecret: [ ]
130 - sessionCookie: [ ]
131
132 delete:
133 tags:
134 - Permissions
135 summary: Web user delete
136 description: Delete a single web user
137 operationId: WebUsers.delete.id
138 parameters:
139 - $ref: '#/components/parameters/WebUserNamePathParameter'
140 responses:
141 204:
142 description: Deleted user
143 $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
144 400:
145 description: Invalid request body, errorCode will be 'NO_USERNAME'
146 $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
147 404:
148 description: User not found
149 $ref: './openapi.yaml#/components/responses/HttpEmptyEnvelopedResponse'
150 403:
151 $ref: './openapi.yaml#/components/responses/Unauthorized'
152 security:
153 - apiTokenName: [ ]
154 apiTokenSecret: [ ]
155 - sessionCookie: [ ]
Note: See TracBrowser for help on using the repository browser.