-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
484 lines (472 loc) · 19.1 KB
/
openapi.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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
openapi: "3.1.0"
info:
version: "0.1.0"
title: Grafana k6 Extension Registry Service
summary: Query the Grafana k6 Extension Registry database.
description: |
The **Grafana k6 Extension Registry Service** enables read-only access to the Grafana k6 Extension Registry database.
The Grafana k6 Extension Registry database contains **up-to-date information about registered extensions**. The basic data of the extensions (e.g. go module path, JavaScript import path, description) are registered manually, the other data (e.g. available versions, number of stars) are retrieved automatically via the **repository manager API** (GitHub, GitLab, etc.).
Detailed information about response schemas can be found in the [schema documentation](https://registry.k6.io/schema). Schemas are defined in [registry.schema.json](https://registry.k6.io/registry.schema.json)
The source code of extensions is automatically **statically analyzed**. The result of the analysis is the **compliance level** of the best practices of Grafana k6 extensions (0-100%). Based on the compliance level, a **compliance grade** is also calculated (A-F). Based on the compliance grade, an SVG **compliance badge** is created for each extension. Example badge:

The k6 Extension **Catalog** is an **alternative representation** of the k6 Extension **Registry**. Most queries have an alternative counterpart that returns a catalog instead of a registry.
You can [try the k6 Extension Registry Service](https://registry.k6.io/ui)!
Information about modifying the registry (register new extensions, modify or delete existing registrations) can be found in the [grafana/k6-extension-registry](https://github.com/grafana/k6-extension-registry) GitHub repository.
termsOfService: https://grafana.com/legal/terms/
license:
name: AGPL-3.0-only
url: https://www.gnu.org/licenses/agpl-3.0.html
externalDocs:
description: Find out more about Grafana k6 extensions
url: https://grafana.com/docs/k6/latest/extensions/
servers:
- url: https://registry.k6.io
tags:
- name: global
description: Access to the entire registry
- name: module
description: Query a specific extension
- name: catalog
description: Extension catalog queries
- name: subset
description: Query subsets of the registry
- name: metrics
description: Registry metrics queries
paths:
/registry.json:
get:
tags:
- global
summary: Entire registry
description: Download the entire registry as a single JSON file
operationId: entireRegistry
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
/catalog.json:
get:
tags:
- catalog
summary: Entire catalog
description: Download the entire catalog as a single JSON file
operationId: entireCatalog
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/catalog"
/metrics.json:
get:
tags:
- metrics
summary: Registry metrics
description: Download the registry metrics as a single JSON file
operationId: getMetrics
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/metrics"
/metrics.txt:
get:
tags:
- metrics
summary: Registry metrics in Prometheus text format.
description: Download the registry metrics as a single TXT file in Prometheus text format
operationId: getMetricsPrometheus
responses:
"200":
description: successful operation
content:
text/plain:
schema:
type: string
examples:
simple:
summary: Simple example
value: |
# HELP registry_tier_official_count Number of extensions in the 'official' tier.
# TYPE registry_tier_official_count counter
registry_tier_official_count 14 1733941259568
# HELP registry_type_javascript_count Number of JavaScript extension.
# TYPE registry_type_javascript_count counter
registry_type_javascript_count 56 1733941259568
# HELP registry_type_output_count Number of Output extension.
# TYPE registry_type_output_count counter
registry_type_output_count 16 1733941259568
# HELP registry_grade_d_count Number of D-grade extensions.
# TYPE registry_grade_d_count counter
registry_grade_d_count 2 1733941259568
# HELP registry_issue_examples_count Number of extensions without examples directory.
# TYPE registry_issue_examples_count counter
registry_issue_examples_count 14 1733941259568
# HELP registry_tier_community_count Number of extension in the community' tier.
# TYPE registry_tier_community_count counter
registry_tier_community_count 57 1733941259568
# HELP registry_grade_a_count Number of A-grade extensions.
# TYPE registry_grade_a_count counter
registry_grade_a_count 22 1733941259568
# HELP registry_grade_c_count Number of C-grade extensions.
# TYPE registry_grade_c_count counter
registry_grade_c_count 44 1733941259568
# HELP registry_product_cloud_count Number of extensions available in Grafana Cloud k6.
# TYPE registry_product_cloud_count counter
registry_product_cloud_count 4 1733941259568
# HELP registry_category_observability_count Number of extensions in the 'observability' category.
# TYPE registry_category_observability_count counter
registry_category_observability_count 12 1733941259568
# HELP registry_extension_count The total number of extensions.
# TYPE registry_extension_count counter
registry_extension_count 71 1733941259568
# HELP registry_issue_smoke_count Number of extensions without smoke test script.
# TYPE registry_issue_smoke_count counter
registry_issue_smoke_count 49 1733941259568
# HELP registry_category_misc_count Number of extensions in the 'misc' category.
# TYPE registry_category_misc_count counter
registry_category_misc_count 14 1733941259568
# HELP registry_tier_unofficial_count Number of unofficial extensions.
# TYPE registry_tier_unofficial_count counter
registry_tier_unofficial_count 11 1733941259568
# HELP registry_category_kubernetes_count Number of extensions in the 'kubernetes' category.
# TYPE registry_category_kubernetes_count counter
registry_category_kubernetes_count 2 1733941259568
# HELP registry_category_reporting_count Number of extensions in the 'reporting' category.
# TYPE registry_category_reporting_count counter
registry_category_reporting_count 13 1733941259568
# HELP registry_issue_build_count Number of extensions not buildable with the latest k6 version.
# TYPE registry_issue_build_count counter
registry_issue_build_count 3 1733941259568
# HELP registry_category_browser_count Number of extensions in the 'browser' category.
# TYPE registry_category_browser_count counter
registry_category_browser_count 1 1733941259568
# HELP registry_category_data_count Number of extensions in the 'data' category.
# TYPE registry_category_data_count counter
registry_category_data_count 24 1733941259568
# HELP registry_grade_b_count Number of B-grade extensions.
# TYPE registry_grade_b_count counter
registry_grade_b_count 2 1733941259568
# HELP registry_grade_e_count Number of E-grade extensions.
# TYPE registry_grade_e_count counter
registry_grade_e_count 1 1733941259568
# HELP registry_product_oss_count Number of extensions available in Grafana k6.
# TYPE registry_product_oss_count counter
registry_product_oss_count 70 1733941259568
# HELP registry_product_synthetic_count Number of extensions available in Synthetic Monitoring.
# TYPE registry_product_synthetic_count counter
registry_product_synthetic_count 2 1733941259568
# HELP registry_cgo_count Number of extensions requiring cgo.
# TYPE registry_cgo_count counter
registry_cgo_count 1 1733941259568
# HELP registry_issue_replace_count Number of extensions with replace directive in go.mod.
# TYPE registry_issue_replace_count counter
registry_issue_replace_count 2 1733941259568
# HELP registry_issue_types_count Number of extensions without API declaration file.
# TYPE registry_issue_types_count counter
registry_issue_types_count 42 1733941259568
# HELP registry_category_authentication_count Number of extensions in the 'authentication' category.
# TYPE registry_category_authentication_count counter
registry_category_authentication_count 2 1733941259568
# HELP registry_category_messaging_count Number of extensions in the 'messaging' category.
# TYPE registry_category_messaging_count counter
registry_category_messaging_count 11 1733941259568
# HELP registry_category_protocol_count Number of extensions in the 'protocol' category.
# TYPE registry_category_protocol_count counter
registry_category_protocol_count 10 1733941259568
/module/{module}/extension.json:
get:
tags:
- module
summary: Query an extension
description: Query the data of a specific extension as a single JSON file
operationId: getExtension
parameters:
- $ref: "#/components/parameters/module"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/extension"
"404":
description: module not found
/module/{module}/badge.svg:
get:
tags:
- module
summary: Download a badge
description: |
Download an extension's badge as an SVG image
Example:

operationId: getBadge
parameters:
- $ref: "#/components/parameters/module"
produces:
- image/svg+xml
responses:
"200":
description: successful operation
"404":
description: module not found
/module/{module}/grade.svg:
get:
tags:
- module
summary: Download a grade badge
description: |
Download an extension's grade badge as an SVG image
Example:

operationId: getGradeBadge
parameters:
- $ref: "#/components/parameters/module"
produces:
- image/svg+xml
responses:
"200":
description: successful operation
"404":
description: module not found
/product/{product}.json:
get:
tags:
- subset
summary: Suubset by product
description: Querying the subset of the registry containing the extensions available in the product specified in the parameter
operationId: subsetByProduct
parameters:
- $ref: "#/components/parameters/product"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
"404":
description: product not found
/product/{product}-catalog.json:
get:
tags:
- catalog
summary: Catalog by product
description: Query the catalog containing extensions available in a given product.
operationId: catalogByProduct
parameters:
- $ref: "#/components/parameters/product"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/catalog"
"404":
description: product not found
/tier/{tier}.json:
get:
tags:
- subset
summary: Subset by support
description: Querying the subset of the registry containing the extensions with support specified in the parameter
operationId: subsetByTier
parameters:
- $ref: "#/components/parameters/tier"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
"404":
description: tier not found
/tier/{tier}-catalog.json:
get:
tags:
- catalog
summary: Catalog by support
description: Query the catalog containing extensions available with a given support.
operationId: catalogByTier
parameters:
- $ref: "#/components/parameters/tier"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/catalog"
"404":
description: tier not found
/tier/{tier}-metrics.json:
get:
tags:
- metrics
summary: Subset of registry metrics for tier.
description: Download the registry metrics for tier as a single JSON file
operationId: getTierMetrics
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/metrics"
/tier/at-least/{tier}.json:
get:
tags:
- subset
summary: Subset by min support
description: Query the subset of the registry that contains the extensions whose support is at least the level specified as a parameter.
operationId: subsetByMinTier
parameters:
- $ref: "#/components/parameters/tier"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
"404":
description: tier not found
/tier/at-least/{tier}-catalog.json:
get:
tags:
- catalog
summary: Catalog by min support
description: Query the catalog containing extensions available with at least the support specified as a parameter.
operationId: catalogByMinTier
parameters:
- $ref: "#/components/parameters/tier"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/catalog"
"404":
description: tier not found
/category/{category}.json:
get:
tags:
- subset
summary: Subset by category
description: Querying the subset of the registry containing extensions belonging to the category specified in the parameter
operationId: subsetByCategory
parameters:
- $ref: "#/components/parameters/category"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
"404":
description: category not found
/grade/{grade}.json:
get:
tags:
- subset
summary: Subset by grade
description: Querying the subset of the registry containing the extensions with the compliance grade specified in the parameter
operationId: subsetByGrade
parameters:
- $ref: "#/components/parameters/grade"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
"404":
description: grade not found
/grade/at-least/{grade}.json:
get:
tags:
- subset
summary: Subset by min grade
description: Querying the subset of the registry containing extensions with at least compliance grade specified in the parameter
operationId: subsetByMinGrade
parameters:
- $ref: "#/components/parameters/grade"
responses:
"200":
description: successful operation
content:
application/json:
schema:
$ref: "registry.schema.json#/$defs/registry"
"404":
description: grade not found
components:
parameters:
module:
in: path
name: module
required: true
description: go module path of the extension
examples:
xk6-dashboard:
value: "github.com/grafana/xk6-dashboard"
xk6-sql:
value: "github.com/grafana/xk6-sql"
schema:
type: string
grade:
in: path
name: grade
required: true
description: grade to be queried
examples:
A:
value: "A"
C:
value: "C"
schema:
$ref: "registry.schema.json#/$defs/grade"
category:
in: path
name: category
required: true
description: category to be queried
example: "data"
schema:
$ref: "registry.schema.json#/$defs/category"
tier:
in: path
name: tier
required: true
description: tier to be queried
examples:
official:
value: "official"
community:
value: "community"
schema:
$ref: "registry.schema.json#/$defs/tier"
product:
in: path
name: product
required: true
description: product to be queried
examples:
oss:
value: "oss"
cloud:
value: "cloud"
schema:
$ref: "registry.schema.json#/$defs/product"