-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata-provider-API.yaml
676 lines (671 loc) · 22.5 KB
/
data-provider-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
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
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
openapi: 3.0.0
info:
title: DebiAI data provider API
version: 0.25.3
description: >-
This API describe what the endpoints a service that want to be a DebiAI data
provider need to have
contact:
name: DebiAI Team
email: [email protected]
servers:
- url: http://localhost:3010
tags:
- name: Info
- name: Projects
- name: Data
- name: Models
- name: Selections
paths:
###### ---------------------- INFO ---------------------- ######
/debiai/info:
get:
x-eov-operation-id: info
x-eov-operation-handler: controllers/debiai/info.js
description: Get some general information about how DebiAI can use this service
tags:
- Info
responses:
"200":
description: Success, Return information about data Provider requests limits
content:
application/json:
schema:
type: object
description: Information to deal with data provider data requests
properties:
version:
type: string
description: The version of the data provider
example: "1.0.0"
maxSampleIdByRequest:
type: integer
description: Optional number of samples id that can be provided by the project for display purpose
default: 10000
maxSampleDataByRequest:
type: integer
description: Optional number of samples data that can be provided by the project for display purpose
default: 2000
maxResultByRequest:
type: integer
description: Optional number of samples results that can be provided by the project for display purpose
default: 5000
canDelete:
type: object
description: Information about what can be deleted by DebiAI
properties:
projects:
type: boolean
description: Can DebiAI delete projects
default: true
selections:
type: boolean
description: Can DebiAI delete selections
default: true
models:
type: boolean
description: Can DebiAI delete models
default: true
###### ---------------------- PROJECTS ---------------------- ######
/debiai/projects:
get:
x-eov-operation-id: getProjectsOverview
x-eov-operation-handler: controllers/debiai/projects.js
description: Get some general information about project accessible from this data provider
tags:
- Projects
responses:
"200":
description: Projects information
content:
application/json:
schema:
type: object
description: Project that can be selected by a DebiAI User, each key is a project ID
additionalProperties:
type: object
description: A project overview
properties:
name:
type: string
description: Project name, the project ID by default
minLength: 1
nullable: true
nbSamples:
type: integer
description: Optional number of samples that can be provided by the project for display purpose
default: null
nullable: true
nbModels:
type: integer
description: Optional number of models that can be provided by the project for display purpose
default: null
nullable: true
nbSelections:
type: integer
description: Optional number of selections that can be provided by the project for display purpose
default: null
nullable: true
creationDate:
type: integer
description: Timestamp of the project creation
example: 1697814247211
nullable: true
updateDate:
type: integer
description: Timestamp of the project last update
example: 1697814247211
nullable: true
/debiai/projects/{projectId}:
parameters:
- in: path
schema:
type: string
minLength: 1
example: Project 1
name: projectId
description: Project To research
required: true
get:
x-eov-operation-id: getProject
x-eov-operation-handler: controllers/debiai/projects.js
description: Get information about project
tags:
- Projects
responses:
"200":
description: Projects information
content:
application/json:
schema:
type: object
description: Structural information about a project like the columns and the expected results
properties:
name:
type: string
description: Project name, the project ID by default
nullable: true
columns:
type: array
description: Columns that DebiAI will be expecting for the project data
items:
type: object
properties:
name:
type: string
minLength: 1
example: Image name
category:
type: string
description: >-
Category of the column that will be used to select
the column more easily
default: other
enum:
- other
- context
- input
- groundtruth
minLength: 1
example: Groundtruth
type:
type: string
enum:
- auto
- text
- number
- boolean
- list
- dict
default: auto
description: >-
The type of the column values, it will be guessed by
default by DebiAI, but it can be forced. Forcing a
type can be useful if we want to consider numbers
like 10, 100, 1000 as categories.
group:
type: string
description: >-
Group of the column, can be used for display purpose
default: ""
example: Image
required:
- name
expectedResults:
type: array
description: Columns that DebiAI will be expecting for the project model results
items:
type: object
properties:
name:
type: string
minLength: 1
example: Model prediction
type:
type: string
enum:
- auto
- text
- number
- boolean
default: auto
group:
type: string
description: >-
Group of the column, can be used for display purpose
default: ""
example: Image
required:
- name
nbSamples:
type: integer
description: Optional number of samples that can be provided by the project for display purpose
default: null
nullable: true
creationDate:
type: integer
description: Timestamp of the project creation
example: 1697814247211
nullable: true
updateDate:
type: integer
description: Timestamp of the project last update
example: 1697814247211
nullable: true
delete:
x-eov-operation-id: deleteProject
x-eov-operation-handler: controllers/debiai/projects.js
description: Delete a project
tags:
- Projects
responses:
"200":
description: Project deleted
/debiai/projects/{projectId}/data-id-list:
parameters:
- in: path
schema:
type: string
minLength: 1
example: Project 1
name: projectId
description: Project id
required: true
- in: query
schema:
type: integer
name: from
description: Starting point to fetch data Ids
required: false
- in: query
schema:
type: integer
name: to
description: Ending point to fetch data Ids
required: false
- in: query
schema:
type: string
name: analysisId
description: Analysis ID unique identifier, it will be the same for all requests of an analysis
required: false
- in: query
schema:
type: boolean
name: analysisStart
description: True if it's the first request of an analysis
required: false
- in: query
schema:
type: boolean
name: analysisEnd
description: True if it's the last request of an analysis
required: false
get:
x-eov-operation-id: dataIdList
x-eov-operation-handler: controllers/debiai/projects.js
description: >-
Get a ID list of all available data in the project, this endpoint need to
work with the project list provided in the info endpoint
A those ID will be used by DebiAI to request data or results later
tags:
- Data
responses:
"200":
description: ""
content:
application/json:
schema:
type: array
items:
anyOf:
- type: string
- type: number
description: "The project full list of data ID, each ID must be unique "
examples:
example:
value:
- MyDataId_1
- MyDataId_2
- ...
/debiai/projects/{projectId}/data:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id
required: true
- in: query
schema:
type: string
name: analysisId
description: Analysis ID unique identifier, it will be the same for all requests of an analysis
required: false
- in: query
schema:
type: boolean
name: analysisStart
description: True if it's the first request of an analysis
required: false
- in: query
schema:
type: boolean
name: analysisEnd
description: True if it's the last request of an analysis
required: false
post:
x-eov-operation-id: data
x-eov-operation-handler: controllers/debiai/projects.js
description: >-
Get the data to be displayed into DebiAI from the given data ID list,
the requested IDs will be those given by the endpoint dataIdList. The
number of data asked won't exceed the "dataUploadPatchSize" if it was
specified in the debiai/info endpoint
tags:
- Data
responses:
"200":
description: |
The project data for each requested id.
content:
application/json:
schema:
type: object
description: Each key of the object is a dataId
additionalProperties:
type: array
description: >-
The number or items in the array need to be equal to
the number of column provided with the info path. Each n value will be mapped to
the n'th column.
Null values aren't allowed at the moment, but any type can be used
requestBody:
content:
application/json:
schema:
type: array
description: List of requested dataId
items:
anyOf:
- type: string
- type: number
- type: integer
###### ---------------------- MODELS ---------------------- ######
/debiai/projects/{projectId}/models:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id to get the model list
required: true
get:
x-eov-operation-id: modelList
x-eov-operation-handler: controllers/debiai/models.js
description: Tell DebiAI which models are available for the given project
tags:
- Models
responses:
"200":
description: A model list
content:
application/json:
schema:
type: array
items:
type: object
required:
- id
properties:
id:
type: string
description: Model ID
name:
type: string
description: Model name, the model ID by default
nbResults:
type: number
description: Number of results that the model can provide
default: 0
nullable: true
creationDate:
type: integer
description: Timestamp of the model creation
example: 1697814247211
nullable: true
/debiai/projects/{projectId}/models/{modelId}/evaluated-data-id-list:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id
required: true
- schema:
type: string
minLength: 1
example: Model 1
name: modelId
in: path
description: Model id
required: true
get:
x-eov-operation-id: modelEvaluatedDataIdList
x-eov-operation-handler: controllers/debiai/models.js
description: Tell DebiAI which models are available for the given project
tags:
- Models
responses:
"200":
description: The model data id list that the model has been evaluated on
content:
application/json:
schema:
type: array
items:
anyOf:
- type: string
- type: number
- type: integer
/debiai/projects/{projectId}/models/{modelId}/results:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id
required: true
- schema:
type: string
minLength: 1
example: Model 1
name: modelId
in: path
description: Model id
required: true
post:
x-eov-operation-id: modelResults
x-eov-operation-handler: controllers/debiai/models.js
description: Gives the results of a model from a given data ID list
tags:
- Models
responses:
"200":
description: The model results for each requested data ID
content:
application/json:
schema:
type: object
description: Each key of the object is a dataId
additionalProperties:
type: array
description: >-
The number or items in the array need to be equal to
the number of expected model results provided with the info path.
Each n value will be mapped to the n'th column.
Null values aren't allowed at the moment
items:
anyOf:
- type: string
- type: number
- type: integer
- type: boolean
requestBody:
content:
application/json:
schema:
type: array
description: List of requested dataId
items:
anyOf:
- type: string
- type: number
- type: integer
/debiai/projects/{projectId}/models/{modelId}:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id
required: true
- schema:
type: string
minLength: 1
example: Model 1
name: modelId
in: path
description: Model id
required: true
delete:
x-eov-operation-id: deleteModel
x-eov-operation-handler: controllers/debiai/models.js
description: Delete a model
tags:
- Models
responses:
"204":
description: The model has been deleted
###### ---------------------- SELECTIONS ---------------------- ######
/debiai/projects/{projectId}/selections:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id to get the selection list
required: true
get:
x-eov-operation-id: selectionList
x-eov-operation-handler: controllers/debiai/selections.js
description: Tell DebiAI which selections are available for the given project
tags:
- Selections
responses:
"200":
description: A selection list
content:
application/json:
schema:
type: array
items:
type: object
required:
- id
properties:
id:
type: string
description: Selection ID
name:
type: string
description: Selection name, the selection ID by default
nbSamples:
type: number
description: Number of samples in the selection
default: 0
nullable: true
creationDate:
type: integer
description: Timestamp of the selection creation
example: 1697814247211
nullable: true
post:
x-eov-operation-id: createSelection
x-eov-operation-handler: controllers/debiai/selections.js
description: Create a selection with id List send in body
tags:
- Selections
responses:
"204":
description: "Selection created successfully"
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
idList:
type: array
items:
type: string
required:
- name
- idList
/debiai/projects/{projectId}/selections/{selectionId}/selected-data-id-list:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id
required: true
- schema:
type: string
minLength: 1
example: Selection 1
name: selectionId
in: path
description: Selection id to get the selected data ID list from
required: true
get:
x-eov-operation-id: selectionDataIdList
x-eov-operation-handler: controllers/debiai/selections.js
description: Tell DebiAI the samples selected by the a selection
tags:
- Selections
responses:
"200":
description: The selection data id list
content:
application/json:
schema:
type: array
items:
anyOf:
- type: string
- type: number
- type: integer
/debiai/projects/{projectId}/selections/{selectionId}:
parameters:
- schema:
type: string
minLength: 1
example: Project 1
name: projectId
in: path
description: project id to get the selection to delete
required: true
- schema:
type: string
minLength: 1
example: Selection 1
name: selectionId
in: path
description: Selection id to be deleted
required: true
delete:
x-eov-operation-id: deleteSelection
x-eov-operation-handler: controllers/debiai/selections.js
description: Delete a single selection
tags:
- Selections
responses:
"204":
description: "Selection successfully deleted"