-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.json
234 lines (234 loc) · 6.49 KB
/
openapi.json
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
openapi: 3.0.0
info:
title: API Spec
version: 1.0.0
servers:
- url: 'http://localhost:8080'
paths:
/authorize:
post:
summary: Get authorization code
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
authorization_code:
type: string
state:
type: string
examples:
example:
value:
authorization_code: b4e8d551cd7cc8ed31769d462309ed5c44c935e6
state: 824f1300556d725ca0113cf6fd1a707a
'401':
description: Unauthorized
content:
application/json:
schema:
type: object
properties:
message:
type: string
examples:
example:
value:
message: Authorization failed
application/xml:
schema:
type: object
properties: {}
operationId: post-auth-login
requestBody:
content:
application/json:
schema:
type: object
properties:
client_id:
type: string
client_secret:
type: string
required:
- client_id
- client_secret
examples:
example:
value:
client_id: agam
client_secret: testpass
description: ''
security: []
/access_token:
post:
summary: Get access token by providing authorization code
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
description: ''
type: object
properties:
access_token:
type: string
minLength: 1
expires_in:
type: number
token_type:
type: string
minLength: 1
scope:
type: string
refresh_token:
type: string
minLength: 1
examples:
example:
value:
access_token: cc21d1e38e1b5c53b55f0d842fe39fceba701ccc
expires_in: 3600
token_type: Bearer
scope: null
refresh_token: f4be67261bf75490fe8dfbf30eb633aaf8ea6634
operationId: post-access_token
requestBody:
content:
application/json:
schema:
type: object
properties:
client_id:
type: string
client_secret:
type: string
code:
type: string
required:
- client_id
- client_secret
- code
examples:
example:
value:
client_id: agam
client_secret: testpass
code: ca741b1b84a80b7e3b1763c2c04803aaf6594fa3
/emails/send:
post:
summary: Send email
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
description: ''
type: object
properties:
message:
type: string
minLength: 1
required:
- message
examples:
example:
value:
message: Emails sent
'401':
description: Unauthorized
content:
application/json:
schema:
description: ''
type: object
properties:
error:
type: string
minLength: 1
error_description:
type: string
minLength: 1
required:
- error
- error_description
examples:
example:
value:
error: invalid_token
error_description: The access token provided is invalid
'422':
description: Unprocessable Entity (WebDAV)
content:
application/json:
schema:
description: ''
type: object
properties:
message:
type: string
minLength: 1
required:
- message
examples:
example:
value:
message: Emails cannot be empty
operationId: post-emails-send
requestBody:
content:
application/json:
schema:
description: ''
type: object
properties:
emails:
type: array
uniqueItems: true
minItems: 1
items:
required:
- to
- subject
- message
properties:
to:
type: string
minLength: 1
subject:
type: string
minLength: 1
message:
type: string
minLength: 1
required:
- emails
examples:
example:
value:
emails:
- to: [email protected]
subject: Sending email thru PHP
message: Wakandaboy
parameters: []
components:
securitySchemes:
Bearer:
type: oauth2
flows:
authorizationCode:
scopes: {}
authorizationUrl: /authorize
tokenUrl: /access_token
clientCredentials:
tokenUrl: /access_token
refreshUrl: ''
scopes: {}
description: ''