This repository has been archived by the owner on Aug 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapidVerifyAPIKey-api.yaml
337 lines (331 loc) · 8.68 KB
/
apidVerifyAPIKey-api.yaml
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
host: playground.apistudio.io
swagger: "2.0"
info:
version: "0.0.1"
title: Swagger API
basePath: /try/35cd6835-f2ed-4582-a1ae-d10ed29d062b
schemes:
- http
- https
consumes:
- application/json
produces:
- application/json
paths:
/apikey:
post:
tags:
- VerifyApiKey
summary: Validates the consumer key and returns the attributes associated with apikey,developer,app and apiproduct. Http method is POST but it doesnt mutates any data. POST is used for sending content in the http request.
description: 'Verify api key '
produces:
- application/json
consumes:
- application/json
parameters:
- name: Authorization
description: credentials to authenticate with apid
in: header
required: true
type: string
- name: gateway
in: header
type: string
- name: _
in: body
required: true
schema:
$ref: '#/definitions/VerifyAPIKeyRequest'
responses:
'200':
description: Success. ApiKey was verified successfully.
schema:
$ref: '#/definitions/VerifyApiKeySuccessResponse'
'401':
description: Either clientId,app or developer or company is not valid or status is not approved or entity is not found
schema:
$ref: '#/definitions/ErrorResponse'
'403':
description: ClientId is not authorized to access the resourceUri,environment or proxy.
schema:
$ref: '#/definitions/ErrorResponse'
default:
description: Unexpected error.
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
VerifyAPIKeyRequest:
type: object
required:
- action
- key
- uriPath
- organizationName
- environmentName
- apiProxyName
properties:
action:
type: string
key:
type: string
uriPath:
type: string
organizationName:
type: string
environmentName:
type: string
apiProxyName:
type: string
validateAgainstApiProxiesAndEnvs:
type: boolean
description: when this flag is false, authentication of key and authorization for uripath is done and authorization for apiproxies and environments is skipped. Default is true.
VerifyApiKeySuccessResponse:
type: object
description: 'Response object for the verification of apikey. Verification of apikey response contains details such as developer-id,developer-email-id, other fields and attributes ; app-id,app-name, other fields and attributes; apiproduct-name, fields and attributes ; '
properties:
self:
type: string
organization:
description: Organization Identifier/Name
type: string
environment:
description: Environment Identifier/Name
type: string
clientId:
description: fields and attributes related to clientId
type: object
$ref: '#/definitions/ClientIdDetails'
developer:
description: fields and attributes related to developer
type: object
$ref: '#/definitions/DeveloperDetails'
company:
description: fields and attributes related to company
type: object
$ref: '#/definitions/CompanyDetails'
app:
description: fields and attributes related to app
type: object
$ref: '#/definitions/AppDetails'
apiProduct:
description: fields and attributes related to apiProduct
type: object
$ref: '#/definitions/ApiProductDetails'
identifier:
description: Identifier of the authorization code. This will be unique for each request.
type: string
kind:
type: string
ErrorResponse:
type: object
description: Error response returned
properties:
response_code:
type: string
response_message:
type: string
kind:
type: string
Attribute:
type: object
description: Attribute details
properties:
Name:
type: string
Value:
type: string
kind:
type: string
ClientIdDetails:
type: object
description: Fields related to consumer key
properties:
clientId:
type: string
clientSecret:
type: string
redirectURIs:
type: array
items:
type: string
status:
type: string
attributes:
description: Attributes associated with the client Id.
type: array
items:
$ref: '#/definitions/Attribute'
DeveloperDetails:
type: object
description: Fields related to developer
properties:
id:
type: string
userName:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
status:
type: string
apps:
type: array
items:
type: string
created_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
created_by:
type: string
lastmodified_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
lastmodified_by:
type: string
company:
type: string
attributes:
description: Attributes associated with the developer.
type: array
items:
$ref: '#/definitions/Attribute'
CompanyDetails:
type: object
description: Fields related to company
properties:
id:
type: string
name:
type: string
displayName:
type: string
status:
type: string
apps:
type: array
items:
type: string
created_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
created_by:
type: string
lastmodified_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
lastmodified_by:
type: string
attributes:
description: Attributes associated with the company.
type: array
items:
$ref: '#/definitions/Attribute'
AppDetails:
type: object
description: Fields related to app
properties:
id:
type: string
name:
type: string
accessType:
type: string
callbackUrl:
type: string
displayName:
type: string
status:
type: string
apiproducts:
type: array
items:
type: string
appFamily:
type: string
created_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
created_by:
type: string
lastmodified_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
lastmodified_by:
type: string
company:
type: string
attributes:
description: Attributes associated with the app.
type: array
items:
$ref: '#/definitions/Attribute'
ApiProductDetails:
type: object
description: Fields related to app
properties:
id:
type: string
name:
type: string
displayName:
type: string
quota.limit:
type: integer
format: int64
quota.interval:
type: integer
format: int64
quota.timeunit:
type: integer
format: int64
status:
type: string
created_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
created_by:
type: string
lastmodified_at:
type: string
format: date-time
description: "ISO-8601 timestamp"
lastmodified_by:
type: string
company:
type: string
environments:
type: array
items:
type: string
apiproxies:
type: array
items:
type: string
attributes:
description: Attributes associated with the apiproduct.
type: array
items:
$ref: '#/definitions/Attribute'