@@ -679,6 +679,79 @@ paths:
679
679
$ref : ' #/components/responses/422UnprocessableEntity'
680
680
# NB: This would be returned if source cannot be deleted bc has a sample assigned to it
681
681
682
+ ' /accounts/{account_id}/sources/{source_id}/external_reports ' :
683
+ get :
684
+ operationId : microsetta_private_api.api.get_external_reports
685
+ tags :
686
+ - Sources
687
+ summary : Get external reports attached to the source
688
+ description : Get external reports attached to the source
689
+ parameters :
690
+ - $ref : ' #/components/parameters/account_id'
691
+ - $ref : ' #/components/parameters/source_id'
692
+ - $ref : ' #/components/parameters/language_tag'
693
+ responses :
694
+ ' 200 ' :
695
+ description : Successfully returned list of external reports
696
+ content :
697
+ application/json :
698
+ schema :
699
+ type : array
700
+ items :
701
+ $ref : ' #/components/schemas/external_report'
702
+ ' 401 ' :
703
+ $ref : ' #/components/responses/401Unauthorized'
704
+ ' 403 ' :
705
+ $ref : ' #/components/responses/403Forbidden'
706
+
707
+ ' /accounts/{account_id}/sources/{source_id}/external_reports/{external_report_id} ' :
708
+ get :
709
+ operationId : microsetta_private_api.api.get_external_report
710
+ tags :
711
+ - Sources
712
+ summary : Get full contents of external report
713
+ description : Get full contents of external report
714
+ parameters :
715
+ - $ref : ' #/components/parameters/account_id'
716
+ - $ref : ' #/components/parameters/source_id'
717
+ - $ref : ' #/components/parameters/external_report_id'
718
+ - $ref : ' #/components/parameters/language_tag'
719
+ responses :
720
+ ' 200 ' :
721
+ description : Successfully returned external report information
722
+ content :
723
+ application/json :
724
+ schema :
725
+ type : " object"
726
+ ' 401 ' :
727
+ $ref : ' #/components/responses/401Unauthorized'
728
+ ' 403 ' :
729
+ $ref : ' #/components/responses/403Forbidden'
730
+ ' 404 ' :
731
+ $ref : ' #/components/responses/404NotFound'
732
+
733
+ ' /accounts/{account_id}/sources/{source_id}/external_reports/{external_report_id}/bytes ' :
734
+ get :
735
+ operationId : microsetta_private_api.api.get_external_report_bytes
736
+ tags :
737
+ - Sources
738
+ summary : Get full contents of external report
739
+ description : Get full contents of external report
740
+ parameters :
741
+ - $ref : ' #/components/parameters/account_id'
742
+ - $ref : ' #/components/parameters/source_id'
743
+ - $ref : ' #/components/parameters/external_report_id'
744
+ - $ref : ' #/components/parameters/language_tag'
745
+ responses :
746
+ ' 200 ' :
747
+ description : Successfully returned contents of an external report
748
+ ' 401 ' :
749
+ $ref : ' #/components/responses/401Unauthorized'
750
+ ' 403 ' :
751
+ $ref : ' #/components/responses/403Forbidden'
752
+ ' 404 ' :
753
+ $ref : ' #/components/responses/404NotFound'
754
+
682
755
' /accounts/{account_id}/sources/{source_id}/check_ffq_prereqs ' :
683
756
get :
684
757
operationId : microsetta_private_api.api.check_source_ffq_prereqs
@@ -3049,6 +3122,12 @@ components:
3049
3122
description : Type of consent
3050
3123
schema :
3051
3124
$ref : ' #/components/schemas/consent_type'
3125
+ external_report_id :
3126
+ name : external_report_id
3127
+ in : path
3128
+ description : Unique identifier of external report
3129
+ schema :
3130
+ $ref : ' #/components/schemas/external_report_id'
3052
3131
3053
3132
# query parameters
3054
3133
activation_code :
@@ -3470,6 +3549,18 @@ components:
3470
3549
type : string
3471
3550
assent_content :
3472
3551
type : string
3552
+ external_report_id :
3553
+ type : string
3554
+ file_name :
3555
+ type : string
3556
+ file_title :
3557
+ type : string
3558
+ file_type :
3559
+ type : string
3560
+ file_contents :
3561
+ type : string
3562
+ report_type :
3563
+ enum : ["kit", "ffq"]
3473
3564
nonhuman_source :
3474
3565
type : object
3475
3566
properties :
@@ -3517,6 +3608,27 @@ components:
3517
3608
type : string
3518
3609
additionalProperties : false
3519
3610
additionalProperties : false
3611
+ external_report :
3612
+ type : object
3613
+ properties :
3614
+ external_report_id :
3615
+ $ref : ' #/components/schemas/external_report_id'
3616
+ source_id :
3617
+ $ref : ' #/components/schemas/source_id'
3618
+ file_name :
3619
+ $ref : ' #/components/schemas/file_name'
3620
+ file_title :
3621
+ $ref : ' #/components/schemas/file_title'
3622
+ file_type :
3623
+ $ref : ' #/components/schemas/file_type'
3624
+ file_contents :
3625
+ $ref : ' #/components/schemas/file_contents'
3626
+ report_type :
3627
+ $ref : ' #/components/schemas/report_type'
3628
+ required :
3629
+ - external_report_id
3630
+ - source_id
3631
+ - report_type
3520
3632
3521
3633
# survey template section
3522
3634
survey_template_id :
0 commit comments