-
Notifications
You must be signed in to change notification settings - Fork 0
/
metrics_swagger.yaml
166 lines (166 loc) · 3.88 KB
/
metrics_swagger.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
openapi: 3.0.3
info:
title: Metrics data API
description: Retrieve metric data with optional filtering and sorting.
version: 1.0.0
tags:
- name: Metrics data retrieval
description: Retrieve metric data
paths:
/api/{model}/data/:
get:
description: Retrieve metric data for a specified model.
summary: Find metrics by model
operationId: getMetricsByModel
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Metrics'
'400':
description: Invalid query string
'404':
description: Model not found
parameters:
- name: model
in: path
description: Type of object to get metrics of
required: true
schema:
type: string
- name: page
in: query
required: false
description: Specific page.
schema:
type: string
- name: page_size
in: query
required: false
description: Number of results per page.
schema:
type: string
- name: sort ascending
in: query
required: false
description: column__sort=asc
schema:
type: string
- name: sort descending
in: query
required: false
description: column__sort=desc
schema:
type: string
- name: exact
in: query
required: false
description: column__exact=value
schema:
type: string
- name: contains
in: query
required: false
description: column__contains=value
schema:
type: string
- name: less
in: query
required: false
description: column__less=value
schema:
type: string
- name: greater
in: query
required: false
description: column__greater=value
schema:
type: string
/api/{model}/data/csv/:
get:
description: Retrieve metric data for a specified model as a CSV file.
summary: Find metrics by model as CSV
operationId: getMetricsByModelCSV
responses:
'200':
description: successful operation
content:
text/csv: {}
'400':
description: Invalid query string
'404':
description: Model not found
parameters:
- name: model
in: path
description: Type of object to get metrics of
required: true
schema:
type: string
- name: page
in: query
required: false
description: Specific page.
schema:
type: string
- name: page_size
in: query
required: false
description: Number of results per page.
schema:
type: string
- name: sort ascending
in: query
required: false
description: column__sort=asc
schema:
type: string
- name: sort descending
in: query
required: false
description: column__sort=desc
schema:
type: string
- name: exact
in: query
required: false
description: column__exact=value
schema:
type: string
- name: contains
in: query
required: false
description: column__contains=value
schema:
type: string
- name: less
in: query
required: false
description: column__less=value
schema:
type: string
- name: greater
in: query
required: false
description: column__greater=value
schema:
type: string
/health/:
get:
description: Ping endpoint to ensure health of metrics service.
summary: Service's health endpoint
operationId: getMetricsHealth
responses:
'200':
description: successful operation
components:
schemas:
Metrics:
type: object
properties:
id:
type: integer
name:
type: string