-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathopenapi.json
More file actions
2970 lines (2970 loc) · 109 KB
/
openapi.json
File metadata and controls
2970 lines (2970 loc) · 109 KB
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
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "Aignostics Platform API",
"description": "\nThe Aignostics Platform is a cloud-based service that enables organizations to access advanced computational pathology applications through a secure API. The platform provides standardized access to Aignostics' portfolio of computational pathology solutions, with Atlas H&E-TME serving as an example of the available API endpoints. \n\nTo begin using the platform, your organization must first be registered by our business support team. If you don't have an account yet, please contact your account manager or email support@aignostics.com to get started. \n\nMore information about our applications can be found on [https://platform.aignostics.com](https://platform.aignostics.com).\n\n**How to authorize and test API endpoints:**\n\n1. Click the \"Authorize\" button in the right corner below\n3. Click \"Authorize\" button in the dialog to log in with your Aignostics Platform credentials\n4. After successful login, you'll be redirected back and can use \"Try it out\" on any endpoint\n\n**Note**: You only need to authorize once per session. The lock icons next to endpoints will show green when authorized.\n\n",
"version": "1.4.0"
},
"servers": [
{
"url": "/api"
}
],
"paths": {
"/v1/applications": {
"get": {
"tags": [
"Public"
],
"summary": "List available applications",
"description": "Returns the list of the applications, available to the caller.\n\nThe application is available if any of the versions of the application is assigned to the caller's organization.\nThe response is paginated and sorted according to the provided parameters.",
"operationId": "list_applications_v1_applications_get",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 1,
"title": "Page"
}
},
{
"name": "page-size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 5,
"default": 50,
"title": "Page-Size"
}
},
{
"name": "sort",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Sort the results by one or more fields. Use `+` for ascending and `-` for descending order.\n\n**Available fields:**\n- `application_id`\n- `name`\n- `description`\n- `regulatory_classes`\n\n**Examples:**\n- `?sort=application_id` - Sort by application_id ascending\n- `?sort=-name` - Sort by name descending\n- `?sort=+description&sort=name` - Sort by description ascending, then name descending",
"title": "Sort"
},
"description": "Sort the results by one or more fields. Use `+` for ascending and `-` for descending order.\n\n**Available fields:**\n- `application_id`\n- `name`\n- `description`\n- `regulatory_classes`\n\n**Examples:**\n- `?sort=application_id` - Sort by application_id ascending\n- `?sort=-name` - Sort by name descending\n- `?sort=+description&sort=name` - Sort by description ascending, then name descending"
}
],
"responses": {
"200": {
"description": "A list of applications available to the caller",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ApplicationReadShortResponse"
},
"title": "Response List Applications V1 Applications Get"
},
"example": [
{
"application_id": "he-tme",
"name": "Atlas H&E-TME",
"regulatory_classes": [
"RUO"
],
"description": "The Atlas H&E TME is an AI application designed to examine FFPE (formalin-fixed, paraffin-embedded) tissues stained with H&E (hematoxylin and eosin), delivering comprehensive insights into the tumor microenvironment.",
"latest_version": {
"number": "1.0.0",
"released_at": "2025-09-01T19:01:05.401Z"
}
},
{
"application_id": "test-app",
"name": "Test Application",
"regulatory_classes": [
"RUO"
],
"description": "This is the test application with two algorithms: TissueQc and Tissue Segmentation",
"latest_version": {
"number": "2.0.0",
"released_at": "2025-09-02T19:01:05.401Z"
}
}
]
}
}
},
"401": {
"description": "Unauthorized - Invalid or missing authentication"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/applications/{application_id}": {
"get": {
"tags": [
"Public"
],
"summary": "Read Application By Id",
"description": "Retrieve details of a specific application by its ID.",
"operationId": "read_application_by_id_v1_applications__application_id__get",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "application_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Application Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApplicationReadResponse"
}
}
}
},
"403": {
"description": "Forbidden - You don't have permission to see this application"
},
"404": {
"description": "Not Found - Application with the given ID does not exist"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/applications/{application_id}/versions/{version}": {
"get": {
"tags": [
"Public"
],
"summary": "Application Version Details",
"description": "Get the application version details.\n\nAllows caller to retrieve information about application version based on provided application version ID.",
"operationId": "application_version_details_v1_applications__application_id__versions__version__get",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "application_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Application Id"
}
},
{
"name": "version",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"title": "Version"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VersionReadResponse"
},
"example": {
"version_number": "0.4.4",
"changelog": "New deployment",
"input_artifacts": [
{
"name": "whole_slide_image",
"mime_type": "image/tiff",
"metadata_schema": {
"type": "object",
"$defs": {
"LungCancerMetadata": {
"type": "object",
"title": "LungCancerMetadata",
"required": [
"type",
"tissue"
],
"properties": {
"type": {
"enum": [
"lung"
],
"type": "string",
"const": "lung",
"title": "Type"
},
"tissue": {
"enum": [
"lung",
"lymph node",
"liver",
"adrenal gland",
"bone",
"brain"
],
"type": "string",
"title": "Tissue"
}
},
"additionalProperties": false
}
},
"title": "ExternalImageMetadata",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"checksum_crc32c",
"base_mpp",
"width",
"height",
"cancer"
],
"properties": {
"stain": {
"enum": [
"H&E"
],
"type": "string",
"const": "H&E",
"title": "Stain",
"default": "H&E"
},
"width": {
"type": "integer",
"title": "Width",
"maximum": 150000,
"minimum": 1
},
"cancer": {
"anyOf": [
{
"$ref": "#/$defs/LungCancerMetadata"
}
],
"title": "Cancer"
},
"height": {
"type": "integer",
"title": "Height",
"maximum": 150000,
"minimum": 1
},
"base_mpp": {
"type": "number",
"title": "Base Mpp",
"maximum": 0.5,
"minimum": 0.125
},
"mime_type": {
"enum": [
"application/dicom",
"image/tiff"
],
"type": "string",
"title": "Mime Type",
"default": "image/tiff"
},
"checksum_crc32c": {
"type": "string",
"title": "Checksum Crc32C"
}
},
"description": "Metadata corresponding to an external image.",
"additionalProperties": false
}
}
],
"output_artifacts": [
{
"name": "tissue_qc:tiff_heatmap",
"mime_type": "image/tiff",
"metadata_schema": {
"type": "object",
"title": "HeatmapMetadata",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"checksum_crc32c",
"width",
"height",
"class_colors"
],
"properties": {
"width": {
"type": "integer",
"title": "Width"
},
"height": {
"type": "integer",
"title": "Height"
},
"base_mpp": {
"type": "number",
"title": "Base Mpp",
"maximum": 0.5,
"minimum": 0.125
},
"mime_type": {
"enum": [
"image/tiff"
],
"type": "string",
"const": "image/tiff",
"title": "Mime Type",
"default": "image/tiff"
},
"class_colors": {
"type": "object",
"title": "Class Colors",
"additionalProperties": {
"type": "array",
"maxItems": 3,
"minItems": 3,
"prefixItems": [
{
"type": "integer",
"maximum": 255,
"minimum": 0
},
{
"type": "integer",
"maximum": 255,
"minimum": 0
},
{
"type": "integer",
"maximum": 255,
"minimum": 0
}
]
}
},
"checksum_crc32c": {
"type": "string",
"title": "Checksum Crc32C"
}
},
"description": "Metadata corresponding to a segmentation heatmap file.",
"additionalProperties": false
},
"scope": "ITEM",
"visibility": "EXTERNAL"
}
],
"released_at": "2025-04-16T08:45:20.655972Z"
}
}
}
},
"403": {
"description": "Forbidden - You don't have permission to see this version"
},
"404": {
"description": "Not Found - Application version with given ID is not available to you or does not exist"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/runs": {
"get": {
"tags": [
"Public"
],
"summary": "List Runs",
"description": "List runs with filtering, sorting, and pagination capabilities.\n\nReturns paginated runs that were submitted by the user.",
"operationId": "list_runs_v1_runs_get",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "application_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional application ID filter",
"examples": [
"tissue-segmentation",
"heta"
],
"title": "Application Id"
},
"description": "Optional application ID filter"
},
{
"name": "application_version",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optional Version Name",
"examples": [
"1.0.2",
"1.0.1-beta2"
],
"title": "Application Version"
},
"description": "Optional Version Name"
},
{
"name": "external_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Optionally filter runs by items with this external ID",
"examples": [
"slide_001",
"patient_12345_sample_A"
],
"title": "External Id"
},
"description": "Optionally filter runs by items with this external ID"
},
{
"name": "custom_metadata",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
],
"description": "Use PostgreSQL JSONPath expressions to filter runs by their custom_metadata.\n#### URL Encoding Required\n**Important**: JSONPath expressions contain special characters that must be URL-encoded when used in query parameters. Most HTTP clients handle this automatically, but when constructing URLs manually, please ensure proper encoding.\n\n#### Examples (Clear Format):\n- **Field existence**: `$.study` - Runs that have a study field defined\n- **Exact value match**: `$.study ? (@ == \"high\")` - Runs with specific study value\n- **Numeric comparison**: `$.confidence_score ? (@ > 0.75)` - Runs with confidence score greater than 0.75\n- **Array operations**: `$.tags[*] ? (@ == \"draft\")` - Runs with tags array containing \"draft\"\n- **Complex conditions**: `$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)` - Runs with high resource requirements\n\n#### Examples (URL-Encoded Format):\n- **Field existence**: `%24.study`\n- **Exact value match**: `%24.study%20%3F%20(%40%20%3D%3D%20%22high%22)`\n- **Numeric comparison**: `%24.confidence_score%20%3F%20(%40%20%3E%200.75)`\n- **Array operations**: `%24.tags%5B*%5D%20%3F%20(%40%20%3D%3D%20%22draft%22)`\n- **Complex conditions**: `%24.resources%20%3F%20(%40.gpu_count%20%3E%202%20%26%26%20%40.memory_gb%20%3E%3D%2016)`\n\n#### Notes\n- JSONPath expressions are evaluated using PostgreSQL's `@?` operator\n- The `$.` prefix is automatically added to root-level field references if missing\n- String values in conditions must be enclosed in double quotes\n- Use `&&` for AND operations and `||` for OR operations\n- Regular expressions use `like_regex` with standard regex syntax\n- **Please remember to URL-encode the entire JSONPath expression when making HTTP requests**\n\n ",
"title": "Custom Metadata"
},
"description": "Use PostgreSQL JSONPath expressions to filter runs by their custom_metadata.\n#### URL Encoding Required\n**Important**: JSONPath expressions contain special characters that must be URL-encoded when used in query parameters. Most HTTP clients handle this automatically, but when constructing URLs manually, please ensure proper encoding.\n\n#### Examples (Clear Format):\n- **Field existence**: `$.study` - Runs that have a study field defined\n- **Exact value match**: `$.study ? (@ == \"high\")` - Runs with specific study value\n- **Numeric comparison**: `$.confidence_score ? (@ > 0.75)` - Runs with confidence score greater than 0.75\n- **Array operations**: `$.tags[*] ? (@ == \"draft\")` - Runs with tags array containing \"draft\"\n- **Complex conditions**: `$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)` - Runs with high resource requirements\n\n#### Examples (URL-Encoded Format):\n- **Field existence**: `%24.study`\n- **Exact value match**: `%24.study%20%3F%20(%40%20%3D%3D%20%22high%22)`\n- **Numeric comparison**: `%24.confidence_score%20%3F%20(%40%20%3E%200.75)`\n- **Array operations**: `%24.tags%5B*%5D%20%3F%20(%40%20%3D%3D%20%22draft%22)`\n- **Complex conditions**: `%24.resources%20%3F%20(%40.gpu_count%20%3E%202%20%26%26%20%40.memory_gb%20%3E%3D%2016)`\n\n#### Notes\n- JSONPath expressions are evaluated using PostgreSQL's `@?` operator\n- The `$.` prefix is automatically added to root-level field references if missing\n- String values in conditions must be enclosed in double quotes\n- Use `&&` for AND operations and `||` for OR operations\n- Regular expressions use `like_regex` with standard regex syntax\n- **Please remember to URL-encode the entire JSONPath expression when making HTTP requests**\n\n ",
"examples": {
"no_filter": {
"summary": "No filter (returns all)",
"description": "Returns all items without filtering by custom metadata",
"value": "$"
},
"field_exists": {
"summary": "Check if field exists",
"description": "Find applications that have a project field defined",
"value": "$.study"
},
"field_has_value": {
"summary": "Check if field has a certain value",
"description": "Compare a field value against a certain value",
"value": "$.study ? (@ == \"abc-1\")"
},
"numeric_comparisons": {
"summary": "Compare to a numeric value of a field",
"description": "Compare a field value against a numeric value of a field",
"value": "$.confidence_score ? (@ > 0.75)"
},
"array_operations": {
"summary": "Check if an array contains a certain value",
"description": "Check if an array contains a certain value",
"value": "$.tags[*] ? (@ == \"draft\")"
},
"complex_filters": {
"summary": "Combine multiple checks",
"description": "Combine multiple checks",
"value": "$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)"
}
}
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 1,
"title": "Page"
}
},
{
"name": "page_size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 5,
"default": 50,
"title": "Page Size"
}
},
{
"name": "for_organization",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Filter runs by organization ID. Available for superadmins (any org) and admins (own org only). When provided, returns all runs for the specified organization instead of only the caller's own runs.",
"title": "For Organization"
},
"description": "Filter runs by organization ID. Available for superadmins (any org) and admins (own org only). When provided, returns all runs for the specified organization instead of only the caller's own runs."
},
{
"name": "sort",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Sort the results by one or more fields. Use `+` for ascending and `-` for descending order.\n\n**Available fields:**\n- `run_id`\n- `application_id`\n- `version_number`\n- `custom_metadata`\n- `submitted_at`\n- `submitted_by`\n- `terminated_at`\n- `termination_reason`\n\n**Examples:**\n- `?sort=submitted_at` - Sort by creation time (ascending)\n- `?sort=-submitted_at` - Sort by creation time (descending)\n- `?sort=state&sort=-submitted_at` - Sort by state, then by time (descending)\n",
"title": "Sort"
},
"description": "Sort the results by one or more fields. Use `+` for ascending and `-` for descending order.\n\n**Available fields:**\n- `run_id`\n- `application_id`\n- `version_number`\n- `custom_metadata`\n- `submitted_at`\n- `submitted_by`\n- `terminated_at`\n- `termination_reason`\n\n**Examples:**\n- `?sort=submitted_at` - Sort by creation time (ascending)\n- `?sort=-submitted_at` - Sort by creation time (descending)\n- `?sort=state&sort=-submitted_at` - Sort by state, then by time (descending)\n"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RunReadResponse"
},
"title": "Response List Runs V1 Runs Get"
}
}
}
},
"404": {
"description": "Run not found"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"Public"
],
"summary": "Initiate Run",
"description": "This endpoint initiates a processing run for a selected application and version, and returns a `run_id` for tracking purposes.\n\nSlide processing occurs asynchronously, allowing you to retrieve results for individual slides as soon as they\ncomplete processing. The system typically processes slides in batches.\nBelow is an example of the required payload for initiating an Atlas H&E TME processing run.\n\n\n### Payload\n\nThe payload includes `application_id`, optional `version_number`, and `items` base fields.\n\n`application_id` is the unique identifier for the application.\n`version_number` is the semantic version to use. If not provided, the latest available version will be used.\n\n`items` includes the list of the items to process (slides, in case of HETA application).\nEvery item has a set of standard fields defined by the API, plus the custom_metadata, specific to the\nchosen application.\n\nExample payload structure with the comments:\n```\n{\n application_id: \"he-tme\",\n version_number: \"1.0.0-beta\",\n items: [{\n \"external_id\": \"slide_1\",\n \"custom_metadata\": {\"project\": \"sample-study\"},\n \"input_artifacts\": [{\n \"name\": \"user_slide\",\n \"download_url\": \"https://...\",\n \"metadata\": {\n \"specimen\": {\n \"disease\": \"LUNG_CANCER\",\n \"tissue\": \"LUNG\"\n },\n \"staining_method\": \"H&E\",\n \"width_px\": 136223,\n \"height_px\": 87761,\n \"resolution_mpp\": 0.2628238,\n \"media-type\":\"image/tiff\",\n \"checksum_base64_crc32c\": \"64RKKA==\"\n }\n }]\n }]\n}\n```\n\n| Parameter | Description |\n| :---- | :---- |\n| `application_id` required | Unique ID for the application |\n| `version_number` optional | Semantic version of the application. If not provided, the latest available version will be used |\n| `items` required | List of submitted items i.e. whole slide images (WSIs) with parameters described below. |\n| `external_id` required | Unique WSI name or ID for easy reference to items, provided by the caller. The `external_id` should be unique across all items of the run. |\n| `input_artifacts` required | List of provided artifacts for a WSI; at the moment Atlas H&E-TME receives only 1 artifact per slide (the slide itself), but for some other applications this can be a slide and a segmentation map |\n| `name` required | Type of artifact; Atlas H&E-TME supports only `\"input_slide\"` |\n| `download_url` required | Signed URL to the input file in the S3 or GCS; Should be valid for at least 6 days |\n| `specimen: disease` required | Supported cancer types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) |\n| `specimen: tissue` required | Supported tissue types for Atlas H&E-TME (see full list in Atlas H&E-TME manual) |\n| `staining_method` required | WSI stain bio-marker; Atlas H&E-TME supports only `\"H&E\"` |\n| `width_px` required | Integer value. Number of pixels of the WSI in the X dimension. |\n| `height_px` required | Integer value. Number of pixels of the WSI in the Y dimension. |\n| `resolution_mpp` required | Resolution of WSI in micrometers per pixel; check allowed range in Atlas H&E-TME manual |\n| `media-type` required | Supported media formats; available values are: image/tiff (for .tiff or .tif WSI), application/dicom (for DICOM ), application/zip (for zipped DICOM), and application/octet-stream (for .svs WSI) |\n| `checksum_base64_crc32c` required | Base64-encoded big-endian CRC32C checksum of the WSI image |\n\n\n\n### Response\n\nThe endpoint returns the run UUID. After that, the job is scheduled for the execution in the background.\n\nTo check the status of the run, call `GET v1/runs/{run_id}` endpoint with the returned run UUID.\n\n### Rejection\n\nApart from the authentication, authorization, and malformed input error, the request can be\nrejected when specific quota limit is exceeded. More details on quotas is described in the\ndocumentation",
"operationId": "create_run_v1_runs_post",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunCreationRequest"
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunCreationResponse"
}
}
}
},
"404": {
"description": "Application version not found"
},
"403": {
"description": "Forbidden - You don't have permission to create this run"
},
"400": {
"description": "Bad Request - Input validation failed"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/runs/{run_id}": {
"get": {
"tags": [
"Public"
],
"summary": "Get run details",
"description": "This endpoint allows the caller to retrieve the current status of a run along with other relevant run details.\n A run becomes available immediately after it is created through the `POST /v1/runs/` endpoint.\n\n To download the output results, use `GET /v1/runs/{run_id}/` items to get outputs for all slides.\nAccess to a run is restricted to the user who created it.",
"operationId": "get_run_v1_runs__run_id__get",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "run_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"description": "Run id, returned by `POST /v1/runs/` endpoint",
"title": "Run Id"
},
"description": "Run id, returned by `POST /v1/runs/` endpoint"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunReadResponse"
}
}
}
},
"404": {
"description": "Run not found because it was deleted."
},
"403": {
"description": "Forbidden - You don't have permission to see this run"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/runs/{run_id}/cancel": {
"post": {
"tags": [
"Public"
],
"summary": "Cancel Run",
"description": "The run can be canceled by the user who created the run.\n\nThe execution can be canceled any time while the run is not in the terminated state. The\npending items of a canceled run will not be processed and will not add to the cost.\n\nWhen the run is canceled, the already completed items remain available for download.",
"operationId": "cancel_run_v1_runs__run_id__cancel_post",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "run_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"description": "Run id, returned by `POST /runs/` endpoint",
"title": "Run Id"
},
"description": "Run id, returned by `POST /runs/` endpoint"
}
],
"responses": {
"202": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"404": {
"description": "Run not found"
},
"403": {
"description": "Forbidden - You don't have permission to cancel this run"
},
"409": {
"description": "Conflict - The Run is already cancelled"
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/runs/{run_id}/items": {
"get": {
"tags": [
"Public"
],
"summary": "List Run Items",
"description": "List items in a run with filtering, sorting, and pagination capabilities.\n\nReturns paginated items within a specific run. Results can be filtered\nby `item_id`, `external_ids`, `custom_metadata`, `terminated_at`, and `termination_reason` using JSONPath expressions.\n\n## JSONPath Metadata Filtering\nUse PostgreSQL JSONPath expressions to filter items using their custom_metadata.\n\n### Examples:\n- **Field existence**: `$.case_id` - Results that have a case_id field defined\n- **Exact value match**: `$.priority ? (@ == \"high\")` - Results with high priority\n- **Numeric comparison**: `$.confidence_score ? (@ > 0.95)` - Results with high confidence\n- **Array operations**: `$.flags[*] ? (@ == \"reviewed\")` - Results flagged as reviewed\n- **Complex conditions**: `$.metrics ? (@.accuracy > 0.9 && @.recall > 0.8)` - Results meeting performance thresholds\n\n## Notes\n- JSONPath expressions are evaluated using PostgreSQL's `@?` operator\n- The `$.` prefix is automatically added to root-level field references if missing\n- String values in conditions must be enclosed in double quotes\n- Use `&&` for AND operations and `||` for OR operations",
"operationId": "list_run_items_v1_runs__run_id__items_get",
"security": [
{
"OAuth2AuthorizationCodeBearer": []
}
],
"parameters": [
{
"name": "run_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"description": "Run id, returned by `POST /v1/runs/` endpoint",
"title": "Run Id"
},
"description": "Run id, returned by `POST /v1/runs/` endpoint"
},
{
"name": "item_id__in",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
{
"type": "null"
}
],
"description": "Filter for item ids",
"title": "Item Id In"
},
"description": "Filter for item ids"
},
{
"name": "external_id__in",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"description": "Filter for items by their external_id from the input payload",
"title": "External Id In"
},
"description": "Filter for items by their external_id from the input payload"
},
{
"name": "state",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/ItemState"
},
{
"type": "null"
}
],
"description": "Filter items by their state",
"title": "State"
},
"description": "Filter items by their state"
},
{
"name": "termination_reason",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/ItemTerminationReason"
},
{
"type": "null"
}
],
"description": "Filter items by their termination reason. Only applies to TERMINATED items.",
"title": "Termination Reason"
},
"description": "Filter items by their termination reason. Only applies to TERMINATED items."
},
{
"name": "custom_metadata",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
],
"description": "JSONPath expression to filter items by their custom_metadata",
"title": "Custom Metadata"
},
"description": "JSONPath expression to filter items by their custom_metadata",
"examples": {
"no_filter": {
"summary": "No filter (returns all)",
"description": "Returns all items without filtering by custom metadata",
"value": "$"
},
"field_exists": {
"summary": "Check if field exists",
"description": "Find items that have a project field defined",
"value": "$.project"
},
"field_has_value": {
"summary": "Check if field has a certain value",
"description": "Compare a field value against a certain value",
"value": "$.project ? (@ == \"cancer-research\")"
},
"numeric_comparisons": {
"summary": "Compare to a numeric value of a field",
"description": "Compare a field value against a numeric value of a field",
"value": "$.duration_hours ? (@ < 2)"
},
"array_operations": {
"summary": "Check if an array contains a certain value",
"description": "Check if an array contains a certain value",
"value": "$.tags[*] ? (@ == \"production\")"
},
"complex_filters": {
"summary": "Combine multiple checks",
"description": "Combine multiple checks",
"value": "$.resources ? (@.gpu_count > 2 && @.memory_gb >= 16)"
}
}
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 1,
"title": "Page"
}
},
{
"name": "page_size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 5,