-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenapi.yaml
More file actions
247 lines (244 loc) · 8.77 KB
/
openapi.yaml
File metadata and controls
247 lines (244 loc) · 8.77 KB
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
# Generated with protoc-gen-openapi
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
openapi: 3.0.3
info:
title: AdminService API
description: AdminService is the admin service definition.
version: 0.0.1
paths:
/v1/admins/create:
post:
tags:
- AdminService
description: CreateAdmin creates a new admin.
operationId: AdminService_CreateAdmin
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
/v1/admins/current:
get:
tags:
- AdminService
description: Current returns the currently logged-in user.
operationId: AdminService_Current
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
/v1/admins/list:
get:
tags:
- AdminService
description: ListAdmins returns a list of admins.
operationId: AdminService_ListAdmins
parameters:
- name: pageSize
in: query
description: Optional. The number of admins per page.
schema:
type: integer
format: int32
- name: pageToken
in: query
description: Optional. The page token.
schema:
type: string
- name: filter
in: query
description: |-
Optional. The standard list filter.
Supported fields:
* `name` (i.e. `name="John Doe"`)
* `create_time` range (i.e. `timestamp>="2025-01-31T11:30:00-04:00"` where
the timestamp is in RFC 3339 format)
More detail in [AIP-160](https://google.aip.dev/160).
schema:
type: string
- name: orderBy
in: query
description: |-
Optional. A comma-separated list of fields to order by, sorted in ascending
order. Use "desc" after a field name for descending. Supported fields:
- `create_time`
Example: `create_time desc`.
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.AdminSet'
/v1/admins/login:
post:
tags:
- AdminService
description: Login a user and return the username.
operationId: AdminService_Login
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.LoginRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
/v1/admins/logout:
post:
tags:
- AdminService
description: Logout the currently logged-in user.
operationId: AdminService_Logout
requestBody:
content:
application/json: {}
required: true
responses:
"200":
description: OK
content: {}
/v1/admins/update:
put:
tags:
- AdminService
description: UpdateAdmin updates an existing admin.
operationId: AdminService_UpdateAdmin
parameters:
- name: updateMask
in: query
description: Required. Mask of fields to update.
schema:
type: string
format: field-mask
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
/v1/admins/{id}:
get:
tags:
- AdminService
description: GetAdmin retrieves an admin by ID.
operationId: AdminService_GetAdmin
parameters:
- name: id
in: path
description: The ID of the admin to retrieve.
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
delete:
tags:
- AdminService
description: DeleteAdmin deletes an admin by ID.
operationId: AdminService_DeleteAdmin
parameters:
- name: id
in: path
description: Required. The ID of the admin to delete.
required: true
schema:
type: string
responses:
"200":
description: OK
content: {}
components:
schemas:
kratos.admin.v1.Admin:
type: object
properties:
id:
type: string
description: The unique ID of the user.
name:
type: string
description: The name of the user.
email:
type: string
description: The email of the user.
phone:
type: string
description: The phone number of the user.
avatar:
type: string
description: The avatar URL of the user.
access:
type: string
description: |-
The access level of the user.
Possible values are: "admin", "user", etc.
password:
type: string
description: The password of the user.
createTime:
type: string
description: The timestamp at which the user was created.
format: date-time
updateTime:
type: string
description: The latest timestamp at which the user was updated.
format: date-time
description: Admin is the admin message.
kratos.admin.v1.AdminSet:
type: object
properties:
admins:
type: array
items:
$ref: '#/components/schemas/kratos.admin.v1.Admin'
description: The set of admins.
nextPageToken:
type: string
description: The next page token.
description: AdminSet is the set of admins.
kratos.admin.v1.LoginRequest:
required:
- password
type: object
properties:
password:
type: string
description: Required. Password of the user.
username:
type: string
email:
type: string
description: LoginRequest is the request message for the Login method.
tags:
- name: AdminService