From 96e67db6d322993b78b85e88ec042ce55d6c0ac6 Mon Sep 17 00:00:00 2001 From: Victor San Kho Lin Date: Wed, 15 Feb 2023 14:29:04 +1100 Subject: [PATCH] Updated swagger and endpoints doc --- docs/ENDPOINTS.md | 19 ---- swagger/swagger.json | 255 ++++++++----------------------------------- 2 files changed, 48 insertions(+), 226 deletions(-) diff --git a/docs/ENDPOINTS.md b/docs/ENDPOINTS.md index 0875d0b0..452e1edb 100644 --- a/docs/ENDPOINTS.md +++ b/docs/ENDPOINTS.md @@ -235,25 +235,6 @@ curl -s -H "Authorization: Bearer $PORTAL_TOKEN" "https://api.data.prod.umccr.or Similarly, you can filter request parameters on `run_id`, `lane`. -### Reports Endpoint - -_(*potentially large JSON response)_ - -_List Report entries:_ -``` -curl -s -H "Authorization: Bearer $PORTAL_TOKEN" "https://api.data.prod.umccr.org/reports" | jq > reports.json -``` - -_Get a Report record by Subject:_ -``` -curl -s -H "Authorization: Bearer $PORTAL_TOKEN" "https://api.data.prod.umccr.org/reports?subject_id=SBJ01146" | jq > reports_SBJ01146.json -``` - -_Get a Report record by Subject, Report Type:_ -``` -curl -s -H "Authorization: Bearer $PORTAL_TOKEN" "https://api.data.prod.umccr.org/reports?subject_id=SBJ01146&type=hrd_hrdetect" | jq > reports_SBJ01146_hrd_hrdetect.json -``` - ### Pairing Endpoint _Create T/N Pairing by SequenceRuns:_ diff --git a/swagger/swagger.json b/swagger/swagger.json index 6e4d6ae3..60f1c73d 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -558,6 +558,51 @@ } ] }, + "/manops/": { + "get": { + "operationId": "manops_list", + "description": "You have hit GET /manops. This is placeholder only list endpoint. Nothing here yet.\nPlease use POST /manops endpoint and path with appropriate payload to run manual operations.", + "parameters": [], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "manops" + ] + }, + "post": { + "operationId": "manops_create", + "description": "Need more specific path, POST /manops endpoint does not exist.\nPlease hit with the correct path with appropriate payload to run the /manops endpoint.", + "parameters": [], + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "manops" + ] + }, + "parameters": [] + }, + "/manops/rnasum/": { + "post": { + "operationId": "manops_rnasum", + "description": "Expected payload:\n{\n \"wfr_id\": \"wfr.\",\n \"subject_id\": \"SBJ00000\",\n \"dataset\": \"BRCA\" See: https://github.com/umccr/RNAsum/blob/master/TCGA_projects_summary.md#pan-cancer-dataset\n}\nwfr_id takes precedence over subject_id", + "parameters": [], + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "manops" + ] + }, + "parameters": [] + }, "/metadata/": { "get": { "operationId": "metadata_list", @@ -823,105 +868,6 @@ }, "parameters": [] }, - "/reports/": { - "get": { - "operationId": "reports_list", - "description": "", - "parameters": [ - { - "name": "ordering", - "in": "query", - "description": "Which field to use when ordering the results.", - "required": false, - "type": "string" - }, - { - "name": "search", - "in": "query", - "description": "A search term.", - "required": false, - "type": "string" - }, - { - "name": "page", - "in": "query", - "description": "A page number within the paginated result set.", - "required": false, - "type": "integer" - }, - { - "name": "rowsPerPage", - "in": "query", - "description": "Number of results to return per page.", - "required": false, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "", - "schema": { - "required": [ - "count", - "results" - ], - "type": "object", - "properties": { - "count": { - "type": "integer" - }, - "next": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "previous": { - "type": "string", - "format": "uri", - "x-nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/Report" - } - } - } - } - } - }, - "tags": [ - "reports" - ] - }, - "parameters": [] - }, - "/reports/{id}/": { - "get": { - "operationId": "reports_read", - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "", - "schema": { - "$ref": "#/definitions/Report" - } - } - }, - "tags": [ - "reports" - ] - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ] - }, "/runs/": { "get": { "operationId": "runs_list", @@ -2155,7 +2101,6 @@ "LabMetadataModel": { "required": [ "library_id", - "sample_name", "sample_id", "phenotype", "quality", @@ -2181,7 +2126,7 @@ "title": "Sample name", "type": "string", "maxLength": 255, - "minLength": 1 + "x-nullable": true }, "sample_id": { "title": "Sample id", @@ -2366,7 +2311,8 @@ "2019", "2020", "2021", - "2022" + "2022", + "2023" ] }, "truncate": { @@ -2376,111 +2322,6 @@ } } }, - "Report": { - "required": [ - "subject_id", - "sample_id", - "library_id", - "type" - ], - "type": "object", - "properties": { - "id": { - "title": "Id", - "type": "string", - "format": "uuid", - "readOnly": true - }, - "subject_id": { - "title": "Subject id", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "sample_id": { - "title": "Sample id", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "library_id": { - "title": "Library id", - "type": "string", - "maxLength": 255, - "minLength": 1 - }, - "type": { - "title": "Type", - "type": "string", - "enum": [ - "msi", - "tmb", - "tmb_trace", - "fusion_caller_metrics", - "failed_exon_coverage_qc", - "sample_analysis_results", - "target_region_coverage", - "qc_summary", - "multiqc", - "report_inputs", - "hrd_chord", - "hrd_hrdetect", - "purple_cnv_germ", - "purple_cnv_som", - "purple_cnv_som_gene", - "sigs_dbs", - "sigs_indel", - "sigs_snv_2015", - "sigs_snv_2020", - "sv_unmelted", - "sv_melted", - "sv_bnd_main", - "sv_bnd_purpleinf", - "sv_nobnd_main", - "sv_nobnd_other", - "sv_nobnd_manygenes", - "sv_nobnd_manytranscripts" - ] - }, - "created_by": { - "title": "Created by", - "type": "string", - "maxLength": 255, - "x-nullable": true - }, - "data": { - "title": "Data", - "type": "object", - "x-nullable": true - }, - "s3_object_id": { - "title": "S3 object id", - "type": "integer", - "maximum": 9223372036854776000, - "minimum": -9223372036854776000, - "x-nullable": true - }, - "gds_file_id": { - "title": "Gds file id", - "type": "integer", - "maximum": 9223372036854776000, - "minimum": -9223372036854776000, - "x-nullable": true - }, - "report_uri": { - "title": "Report uri", - "type": "string", - "minLength": 1 - }, - "unique_hash": { - "title": "Unique hash", - "type": "string", - "maxLength": 64, - "minLength": 1, - "x-nullable": true - } - } - }, "S3ObjectModel": { "required": [ "bucket",