Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated swagger and endpoints doc #549

Merged
merged 1 commit into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions docs/ENDPOINTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:_
Expand Down
255 changes: 48 additions & 207 deletions swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.<umccrise_wfr_id>\",\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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -2155,7 +2101,6 @@
"LabMetadataModel": {
"required": [
"library_id",
"sample_name",
"sample_id",
"phenotype",
"quality",
Expand All @@ -2181,7 +2126,7 @@
"title": "Sample name",
"type": "string",
"maxLength": 255,
"minLength": 1
"x-nullable": true
},
"sample_id": {
"title": "Sample id",
Expand Down Expand Up @@ -2366,7 +2311,8 @@
"2019",
"2020",
"2021",
"2022"
"2022",
"2023"
]
},
"truncate": {
Expand All @@ -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",
Expand Down