-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
executable file
·217 lines (216 loc) · 6.03 KB
/
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
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
openapi: 3.0.1
info:
title: This API is the database interface for datasets and run results.
description: This API is the database interface for datasets and run results.
version: "1.0"
servers:
- url: 'https://feed-uvl.ifi.uni-heidelberg.de'
paths:
/hitec/repository/concepts/store/dataset/:
post:
summary: Store a dataset
description: Store a dataset.
operationId: postDataset
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
required: true
responses:
200:
description: Dataset successfully stored.
content: {}
400:
description: Bad input parameter or invalid data.
content: {}
x-codegen-request-body-name: dataset
/hitec/repository/concepts/store/groundtruth/:
post:
summary: Stores groundtruth data for a dataset
description: Accept an empty dataset when the dataset name is already in database adds the groundtruth.
operationId: postAddGroundTruth
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
required: true
responses:
200:
description: Groundtruth successfully added.
content: {}
400:
description: Bad input parameter or dataset name invalid/non-existent.
content: {}
x-codegen-request-body-name: Dataset
/hitec/repository/concepts/store/detection/result/:
post:
summary: Stores a result in the database
description: Stores a result in the database.
operationId: postDetectionResult
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Result'
required: true
responses:
200:
description: Result successfully stored.
content: {}
400:
description: Bad input parameter.
content: {}
x-codegen-request-body-name: Result
/hitec/repository/concepts/store/detection/result/name:
post:
summary: Changes the name of a result
description: Changes the name of a result, takes a result object with a valid timestamp for a result in the database.
operationId: postUpdateResultName
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Result'
required: true
responses:
200:
description: Result name successfully changed.
content: {}
400:
description: Bad input parameter or name could not be changed.
content: {}
x-codegen-request-body-name: Result
/hitec/repository/concepts/detection/result/all:
get:
summary: Returns all results
description: Returns all results.
operationId: getAllDetectionResults
responses:
200:
description: List of results
content:
'*/*':
schema:
$ref: '#/components/schemas/Results'
500:
description: Server error when retrieving results.
content: {}
/hitec/repository/concepts/dataset/all:
get:
summary: Get all datasets.
description: Get all datasets.
operationId: getAllDatasets
responses:
200:
description: List of datasets
content:
'*/*':
schema:
$ref: '#/components/schemas/Datasets'
500:
description: Server error when retrieving datasets.
content: {}
/hitec/repository/concepts/dataset/name/dataset:
get:
summary: Get a dataset by name
description: Get a dataset by name.
operationId: getDataset
responses:
200:
description: Dataset with matching name or empty dataset.
content:
application/json:
schema:
$ref: '#/components/schemas/Dataset'
400:
description: Bad input parameter.
content: {}
delete:
summary: Delete a dataset by name
description: Delete a dataset by name.
operationId: deleteDataset
responses:
200:
description: Dataset successfully deleted.
content: {}
400:
description: Bad input parameter or could not delete dataset.
content: {}
/hitec/repository/concepts/detection/result/result:
delete:
summary: Delete result with timestamp
description: Delete result with timestamp.
operationId: deleteResult
responses:
200:
description: Result successfully deleted.
content: {}
400:
description: Bad input parameter or could not delete result.
content: {}
components:
schemas:
Datasets:
type: array
items:
$ref: '#/components/schemas/Dataset'
Results:
type: array
items:
$ref: '#/components/schemas/Result'
Dataset:
type: object
properties:
uploaded_at:
type: string
name:
type: string
size:
type: integer
documents:
type: array
items:
$ref: '#/components/schemas/Document'
ground_truth:
type: array
items:
$ref: '#/components/schemas/TruthElement'
Result:
type: object
properties:
method:
type: string
status:
type: string
started_at:
type: string
name:
type: string
dataset_name:
type: string
params:
type: object
topics:
type: object
doc_topic:
type: object
metrics:
type: object
TruthElement:
type: object
properties:
id:
type: string
value:
type: string
Document:
type: object
properties:
id:
type: string
text:
type: string
number:
type: integer