From b16299361c4bbe16aa1e848b950c92f44cfd444a Mon Sep 17 00:00:00 2001 From: zxenia Date: Thu, 2 Jun 2022 23:30:33 -0400 Subject: [PATCH 01/59] add swagger schema file 2.11.0 version --- swagger_schema.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 swagger_schema.json diff --git a/swagger_schema.json b/swagger_schema.json new file mode 100644 index 000000000..13b214110 --- /dev/null +++ b/swagger_schema.json @@ -0,0 +1 @@ +{"swagger": "2.0", "info": {"title": "Katsu Metadata Service API", "description": "A metadata service for clinical/phenotypical and experiment metadata", "version": "2.11.0"}, "host": "localhost:8000", "schemes": ["http"], "paths": {"/": {"get": {"operationId": "_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": [""]}}, "/api/biosamples": {"get": {"operationId": "api_biosamples_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_biosamples_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, "procedure": {"description": "", "type": "object"}, "description": {"description": "Human-readable, unstructured text describing the biosample or providing additional information.", "type": "string"}, "sampled_tissue": {"description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", "type": "object"}, "taxonomy": {"description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", "type": "object"}, "individual_age_at_collection": {"description": "individual_age_at_collection", "type": "object"}, "histological_diagnosis": {"description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", "type": "object"}, "tumor_progression": {"description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", "type": "object"}, "tumor_grade": {"description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", "type": "object"}, "diagnostic_markers": {"description": "A list of ontology terms representing clinically-relevant bio-markers.", "type": "object"}, "is_control_sample": {"description": "Whether the sample is being used as a normal control.", "type": "boolean"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "Identifier for the individual this biosample was sampled from.", "type": "string"}, "hts_files": {"description": "A list of HTS files derived from the biosample.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure", "sampled_tissue"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/biosamples/{id}": {"get": {"operationId": "api_biosamples_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_biosamples_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, "procedure": {"description": "", "type": "object"}, "description": {"description": "Human-readable, unstructured text describing the biosample or providing additional information.", "type": "string"}, "sampled_tissue": {"description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", "type": "object"}, "taxonomy": {"description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", "type": "object"}, "individual_age_at_collection": {"description": "individual_age_at_collection", "type": "object"}, "histological_diagnosis": {"description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", "type": "object"}, "tumor_progression": {"description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", "type": "object"}, "tumor_grade": {"description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", "type": "object"}, "diagnostic_markers": {"description": "A list of ontology terms representing clinically-relevant bio-markers.", "type": "object"}, "is_control_sample": {"description": "Whether the sample is being used as a normal control.", "type": "boolean"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "Identifier for the individual this biosample was sampled from.", "type": "string"}, "hts_files": {"description": "A list of HTS files derived from the biosample.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure", "sampled_tissue"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_biosamples_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, "procedure": {"description": "", "type": "object"}, "description": {"description": "Human-readable, unstructured text describing the biosample or providing additional information.", "type": "string"}, "sampled_tissue": {"description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", "type": "object"}, "taxonomy": {"description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", "type": "object"}, "individual_age_at_collection": {"description": "individual_age_at_collection", "type": "object"}, "histological_diagnosis": {"description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", "type": "object"}, "tumor_progression": {"description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", "type": "object"}, "tumor_grade": {"description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", "type": "object"}, "diagnostic_markers": {"description": "A list of ontology terms representing clinically-relevant bio-markers.", "type": "object"}, "is_control_sample": {"description": "Whether the sample is being used as a normal control.", "type": "boolean"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "Identifier for the individual this biosample was sampled from.", "type": "string"}, "hts_files": {"description": "A list of HTS files derived from the biosample.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_biosamples_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/cancerconditions": {"get": {"operationId": "api_cancerconditions_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_cancerconditions_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer condition.", "type": "string"}, "condition_type": {"description": "Cancer condition type: primary or secondary.", "type": "string"}, "body_site": {"description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "clinical_status": {"description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", "type": "object"}, "code": {"description": "A code describing the type of primary or secondary malignant neoplastic disease.", "type": "object"}, "date_of_diagnosis": {"description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", "type": "string"}, "histology_morphology_behavior": {"description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "verification_status": {"description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "condition_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/cancerconditions/{id}": {"get": {"operationId": "api_cancerconditions_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_cancerconditions_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer condition.", "type": "string"}, "condition_type": {"description": "Cancer condition type: primary or secondary.", "type": "string"}, "body_site": {"description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "clinical_status": {"description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", "type": "object"}, "code": {"description": "A code describing the type of primary or secondary malignant neoplastic disease.", "type": "object"}, "date_of_diagnosis": {"description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", "type": "string"}, "histology_morphology_behavior": {"description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "verification_status": {"description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "condition_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_cancerconditions_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer condition.", "type": "string"}, "condition_type": {"description": "Cancer condition type: primary or secondary.", "type": "string"}, "body_site": {"description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "clinical_status": {"description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", "type": "object"}, "code": {"description": "A code describing the type of primary or secondary malignant neoplastic disease.", "type": "object"}, "date_of_diagnosis": {"description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", "type": "string"}, "histology_morphology_behavior": {"description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "verification_status": {"description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_cancerconditions_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/cancergeneticvariants": {"get": {"operationId": "api_cancergeneticvariants_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_cancergeneticvariants_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, "data_value": {"description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", "type": "object"}, "method": {"description": "The method used to perform the genetic test.", "type": "object"}, "amino_acid_change": {"description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", "type": "object"}, "amino_acid_change_type": {"description": "The type of change related to the amino acid variant.", "type": "object"}, "cytogenetic_location": {"description": "The cytogenetic (chromosome) location.", "type": "object"}, "cytogenetic_nomenclature": {"description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", "type": "object"}, "genomic_dna_change": {"description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", "type": "object"}, "genomic_source_class": {"description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", "type": "object"}, "variation_code": {"description": "The variation ID assigned by ClinVar.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "gene_studied": {"description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", "type": "array", "items": {"type": "string"}}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/cancergeneticvariants/{id}": {"get": {"operationId": "api_cancergeneticvariants_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_cancergeneticvariants_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, "data_value": {"description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", "type": "object"}, "method": {"description": "The method used to perform the genetic test.", "type": "object"}, "amino_acid_change": {"description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", "type": "object"}, "amino_acid_change_type": {"description": "The type of change related to the amino acid variant.", "type": "object"}, "cytogenetic_location": {"description": "The cytogenetic (chromosome) location.", "type": "object"}, "cytogenetic_nomenclature": {"description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", "type": "object"}, "genomic_dna_change": {"description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", "type": "object"}, "genomic_source_class": {"description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", "type": "object"}, "variation_code": {"description": "The variation ID assigned by ClinVar.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "gene_studied": {"description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", "type": "array", "items": {"type": "string"}}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_cancergeneticvariants_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, "data_value": {"description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", "type": "object"}, "method": {"description": "The method used to perform the genetic test.", "type": "object"}, "amino_acid_change": {"description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", "type": "object"}, "amino_acid_change_type": {"description": "The type of change related to the amino acid variant.", "type": "object"}, "cytogenetic_location": {"description": "The cytogenetic (chromosome) location.", "type": "object"}, "cytogenetic_nomenclature": {"description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", "type": "object"}, "genomic_dna_change": {"description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", "type": "object"}, "genomic_source_class": {"description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", "type": "object"}, "variation_code": {"description": "The variation ID assigned by ClinVar.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "gene_studied": {"description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_cancergeneticvariants_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/cancerrelatedprocedures": {"get": {"operationId": "api_cancerrelatedprocedures_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_cancerrelatedprocedures_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the procedure.", "type": "string"}, "procedure_type": {"description": "Type of cancer related procedure: radiation or surgical.", "type": "string"}, "code": {"description": "Code for the procedure performed.", "type": "object"}, "body_site": {"description": "The body location(s) where the procedure was performed.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment.", "type": "object"}, "reason_code": {"description": "The explanation or justification for why the surgical procedure was performed.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "reason_reference": {"description": "Reference to a primary or secondary cancer condition.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/cancerrelatedprocedures/{id}": {"get": {"operationId": "api_cancerrelatedprocedures_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_cancerrelatedprocedures_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the procedure.", "type": "string"}, "procedure_type": {"description": "Type of cancer related procedure: radiation or surgical.", "type": "string"}, "code": {"description": "Code for the procedure performed.", "type": "object"}, "body_site": {"description": "The body location(s) where the procedure was performed.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment.", "type": "object"}, "reason_code": {"description": "The explanation or justification for why the surgical procedure was performed.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "reason_reference": {"description": "Reference to a primary or secondary cancer condition.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_cancerrelatedprocedures_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the procedure.", "type": "string"}, "procedure_type": {"description": "Type of cancer related procedure: radiation or surgical.", "type": "string"}, "code": {"description": "Code for the procedure performed.", "type": "object"}, "body_site": {"description": "The body location(s) where the procedure was performed.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment.", "type": "object"}, "reason_code": {"description": "The explanation or justification for why the surgical procedure was performed.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "reason_reference": {"description": "Reference to a primary or secondary cancer condition.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_cancerrelatedprocedures_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/chord_phenopacket_schema": {"get": {"operationId": "api_chord_phenopacket_schema_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Chord phenopacket schema that can be shared with data providers.", "summary": "Chord phenopacket schema that can be shared with data providers.", "tags": ["api"]}}, "/api/datasets": {"get": {"operationId": "api_datasets_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_datasets_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}, "contact_info": {"description": "", "type": "string"}, "data_use": {"description": "", "type": "object"}, "linked_field_sets": {"description": "Data type fields which are linked together.", "type": "object"}, "alternate_identifiers": {"description": "Alternate identifiers for the dataset.", "type": "object"}, "related_identifiers": {"description": "Related identifiers for the dataset.", "type": "object"}, "dates": {"description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", "type": "object"}, "stored_in": {"description": "The data repository hosting the dataset.", "type": "object"}, "spatial_coverage": {"description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", "type": "object"}, "types": {"description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", "type": "object"}, "availability": {"description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", "type": "string"}, "refinement": {"description": "A qualifier to describe the level of data processing of the dataset and its distributions.", "type": "string"}, "aggregation": {"description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", "type": "string"}, "privacy": {"description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", "type": "string"}, "distributions": {"description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", "type": "object"}, "dimensions": {"description": "The different dimensions (granular components) making up a dataset.", "type": "object"}, "primary_publications": {"description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", "type": "object"}, "citations": {"description": "The publication(s) that cite this dataset.", "type": "object"}, "citation_count": {"description": "The number of publications that cite this dataset (enumerated in the citations property).", "type": "integer"}, "produced_by": {"description": "A study process which generated a given dataset, if any.", "type": "object"}, "creators": {"description": "The person(s) or organization(s) which contributed to the creation of the dataset.", "type": "object"}, "licenses": {"description": "The terms of use of the dataset.", "type": "object"}, "acknowledges": {"description": "The grant(s) which funded and supported the work reported by the dataset.", "type": "object"}, "keywords": {"description": "Tags associated with the dataset, which will help in its discovery.", "type": "object"}, "version": {"description": "A release point for the dataset when applicable.", "type": "string"}, "extra_properties": {"description": "Extra properties that do not fit in the previous specified attributes.", "type": "object"}, "project": {"description": "", "type": "string"}, "additional_resources": {"description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", "type": "array", "items": {"type": "string"}}, "has_part": {"description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", "type": "array", "items": {"type": "string"}}}, "required": ["title", "data_use", "project"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/datasets/{identifier}": {"get": {"operationId": "api_datasets_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_datasets_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}, "contact_info": {"description": "", "type": "string"}, "data_use": {"description": "", "type": "object"}, "linked_field_sets": {"description": "Data type fields which are linked together.", "type": "object"}, "alternate_identifiers": {"description": "Alternate identifiers for the dataset.", "type": "object"}, "related_identifiers": {"description": "Related identifiers for the dataset.", "type": "object"}, "dates": {"description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", "type": "object"}, "stored_in": {"description": "The data repository hosting the dataset.", "type": "object"}, "spatial_coverage": {"description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", "type": "object"}, "types": {"description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", "type": "object"}, "availability": {"description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", "type": "string"}, "refinement": {"description": "A qualifier to describe the level of data processing of the dataset and its distributions.", "type": "string"}, "aggregation": {"description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", "type": "string"}, "privacy": {"description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", "type": "string"}, "distributions": {"description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", "type": "object"}, "dimensions": {"description": "The different dimensions (granular components) making up a dataset.", "type": "object"}, "primary_publications": {"description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", "type": "object"}, "citations": {"description": "The publication(s) that cite this dataset.", "type": "object"}, "citation_count": {"description": "The number of publications that cite this dataset (enumerated in the citations property).", "type": "integer"}, "produced_by": {"description": "A study process which generated a given dataset, if any.", "type": "object"}, "creators": {"description": "The person(s) or organization(s) which contributed to the creation of the dataset.", "type": "object"}, "licenses": {"description": "The terms of use of the dataset.", "type": "object"}, "acknowledges": {"description": "The grant(s) which funded and supported the work reported by the dataset.", "type": "object"}, "keywords": {"description": "Tags associated with the dataset, which will help in its discovery.", "type": "object"}, "version": {"description": "A release point for the dataset when applicable.", "type": "string"}, "extra_properties": {"description": "Extra properties that do not fit in the previous specified attributes.", "type": "object"}, "project": {"description": "", "type": "string"}, "additional_resources": {"description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", "type": "array", "items": {"type": "string"}}, "has_part": {"description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", "type": "array", "items": {"type": "string"}}}, "required": ["title", "data_use", "project"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_datasets_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}, "contact_info": {"description": "", "type": "string"}, "data_use": {"description": "", "type": "object"}, "linked_field_sets": {"description": "Data type fields which are linked together.", "type": "object"}, "alternate_identifiers": {"description": "Alternate identifiers for the dataset.", "type": "object"}, "related_identifiers": {"description": "Related identifiers for the dataset.", "type": "object"}, "dates": {"description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", "type": "object"}, "stored_in": {"description": "The data repository hosting the dataset.", "type": "object"}, "spatial_coverage": {"description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", "type": "object"}, "types": {"description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", "type": "object"}, "availability": {"description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", "type": "string"}, "refinement": {"description": "A qualifier to describe the level of data processing of the dataset and its distributions.", "type": "string"}, "aggregation": {"description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", "type": "string"}, "privacy": {"description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", "type": "string"}, "distributions": {"description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", "type": "object"}, "dimensions": {"description": "The different dimensions (granular components) making up a dataset.", "type": "object"}, "primary_publications": {"description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", "type": "object"}, "citations": {"description": "The publication(s) that cite this dataset.", "type": "object"}, "citation_count": {"description": "The number of publications that cite this dataset (enumerated in the citations property).", "type": "integer"}, "produced_by": {"description": "A study process which generated a given dataset, if any.", "type": "object"}, "creators": {"description": "The person(s) or organization(s) which contributed to the creation of the dataset.", "type": "object"}, "licenses": {"description": "The terms of use of the dataset.", "type": "object"}, "acknowledges": {"description": "The grant(s) which funded and supported the work reported by the dataset.", "type": "object"}, "keywords": {"description": "Tags associated with the dataset, which will help in its discovery.", "type": "object"}, "version": {"description": "A release point for the dataset when applicable.", "type": "string"}, "extra_properties": {"description": "Extra properties that do not fit in the previous specified attributes.", "type": "object"}, "project": {"description": "", "type": "string"}, "additional_resources": {"description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", "type": "array", "items": {"type": "string"}}, "has_part": {"description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_datasets_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}], "tags": ["api"]}}, "/api/diagnoses": {"get": {"operationId": "api_diagnoses_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_diagnoses_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "disease": {"description": "The diagnosed condition.", "type": "integer"}, "genomic_interpretations": {"description": "The genomic elements assessed as being responsible for the disease.", "type": "array", "items": {"type": "string"}}}, "required": ["disease"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/diagnoses/{id}": {"get": {"operationId": "api_diagnoses_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_diagnoses_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "disease": {"description": "The diagnosed condition.", "type": "integer"}, "genomic_interpretations": {"description": "The genomic elements assessed as being responsible for the disease.", "type": "array", "items": {"type": "string"}}}, "required": ["disease"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_diagnoses_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "disease": {"description": "The diagnosed condition.", "type": "integer"}, "genomic_interpretations": {"description": "The genomic elements assessed as being responsible for the disease.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_diagnoses_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/diseases": {"get": {"operationId": "api_diseases_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_diseases_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"term": {"description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", "type": "object"}, "onset": {"description": "A representation of the age of onset of the disease", "type": "object"}, "disease_stage": {"description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", "type": "object"}, "tnm_finding": {"description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["term"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/diseases/{id}": {"get": {"operationId": "api_diseases_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_diseases_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"term": {"description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", "type": "object"}, "onset": {"description": "A representation of the age of onset of the disease", "type": "object"}, "disease_stage": {"description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", "type": "object"}, "tnm_finding": {"description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["term"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_diseases_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"term": {"description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", "type": "object"}, "onset": {"description": "A representation of the age of onset of the disease", "type": "object"}, "disease_stage": {"description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", "type": "object"}, "tnm_finding": {"description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_diseases_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/experiment_schema": {"get": {"operationId": "api_experiment_schema_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Experiment schema", "summary": "Experiment schema", "tags": ["api"]}}, "/api/experimentresults": {"get": {"operationId": "api_experimentresults_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_experimentresults_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"identifier": {"description": "An arbitrary identifier for an experiment result.", "type": "string"}, "description": {"description": "Description of an experiment result.", "type": "string"}, "filename": {"description": "The name of the file containing the result.", "type": "string"}, "genome_assembly_id": {"description": "Reference genome assembly ID.", "type": "string"}, "file_format": {"description": "(Controlled Vocabulary) File format.", "type": "string"}, "data_output_type": {"description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", "type": "string"}, "usage": {"description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", "type": "string"}, "creation_date": {"description": "The date when the experiment result file was created.", "type": "string"}, "created_by": {"description": "Name/Username/Code of the person who prepared the sequencing data.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/experimentresults/{id}": {"get": {"operationId": "api_experimentresults_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_experimentresults_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"identifier": {"description": "An arbitrary identifier for an experiment result.", "type": "string"}, "description": {"description": "Description of an experiment result.", "type": "string"}, "filename": {"description": "The name of the file containing the result.", "type": "string"}, "genome_assembly_id": {"description": "Reference genome assembly ID.", "type": "string"}, "file_format": {"description": "(Controlled Vocabulary) File format.", "type": "string"}, "data_output_type": {"description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", "type": "string"}, "usage": {"description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", "type": "string"}, "creation_date": {"description": "The date when the experiment result file was created.", "type": "string"}, "created_by": {"description": "Name/Username/Code of the person who prepared the sequencing data.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_experimentresults_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"identifier": {"description": "An arbitrary identifier for an experiment result.", "type": "string"}, "description": {"description": "Description of an experiment result.", "type": "string"}, "filename": {"description": "The name of the file containing the result.", "type": "string"}, "genome_assembly_id": {"description": "Reference genome assembly ID.", "type": "string"}, "file_format": {"description": "(Controlled Vocabulary) File format.", "type": "string"}, "data_output_type": {"description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", "type": "string"}, "usage": {"description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", "type": "string"}, "creation_date": {"description": "The date when the experiment result file was created.", "type": "string"}, "created_by": {"description": "Name/Username/Code of the person who prepared the sequencing data.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_experimentresults_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/experiments": {"get": {"operationId": "api_experiments_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_experiments_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the experiment.", "type": "string"}, "instrument": {"description": "", "type": "object"}, "study_type": {"description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", "type": "string"}, "experiment_type": {"description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", "type": "string"}, "experiment_ontology": {"description": "Links to experiment ontology information (e.g. via the OBI ontology.).", "type": "object"}, "molecule": {"description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", "type": "string"}, "molecule_ontology": {"description": "Links to molecule ontology information (e.g. via the SO ontology.).", "type": "object"}, "library_strategy": {"description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", "type": "string"}, "library_source": {"description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", "type": "string"}, "library_selection": {"description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", "type": "string"}, "library_layout": {"description": "The library layout. E.g. Single, Paired.", "type": "string"}, "extraction_protocol": {"description": "The protocol used to isolate the extract material.", "type": "string"}, "reference_registry_id": {"description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", "type": "string"}, "qc_flags": {"description": "", "type": "array", "items": {"type": "string"}}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "Biosample on which this experiment was done.", "type": "string"}, "table": {"description": "", "type": "string"}}, "required": ["id", "instrument", "experiment_type", "biosample"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/experiments/{id}": {"get": {"operationId": "api_experiments_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_experiments_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the experiment.", "type": "string"}, "instrument": {"description": "", "type": "object"}, "study_type": {"description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", "type": "string"}, "experiment_type": {"description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", "type": "string"}, "experiment_ontology": {"description": "Links to experiment ontology information (e.g. via the OBI ontology.).", "type": "object"}, "molecule": {"description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", "type": "string"}, "molecule_ontology": {"description": "Links to molecule ontology information (e.g. via the SO ontology.).", "type": "object"}, "library_strategy": {"description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", "type": "string"}, "library_source": {"description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", "type": "string"}, "library_selection": {"description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", "type": "string"}, "library_layout": {"description": "The library layout. E.g. Single, Paired.", "type": "string"}, "extraction_protocol": {"description": "The protocol used to isolate the extract material.", "type": "string"}, "reference_registry_id": {"description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", "type": "string"}, "qc_flags": {"description": "", "type": "array", "items": {"type": "string"}}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "Biosample on which this experiment was done.", "type": "string"}, "table": {"description": "", "type": "string"}}, "required": ["id", "instrument", "experiment_type", "biosample"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_experiments_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the experiment.", "type": "string"}, "instrument": {"description": "", "type": "object"}, "study_type": {"description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", "type": "string"}, "experiment_type": {"description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", "type": "string"}, "experiment_ontology": {"description": "Links to experiment ontology information (e.g. via the OBI ontology.).", "type": "object"}, "molecule": {"description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", "type": "string"}, "molecule_ontology": {"description": "Links to molecule ontology information (e.g. via the SO ontology.).", "type": "object"}, "library_strategy": {"description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", "type": "string"}, "library_source": {"description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", "type": "string"}, "library_selection": {"description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", "type": "string"}, "library_layout": {"description": "The library layout. E.g. Single, Paired.", "type": "string"}, "extraction_protocol": {"description": "The protocol used to isolate the extract material.", "type": "string"}, "reference_registry_id": {"description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", "type": "string"}, "qc_flags": {"description": "", "type": "array", "items": {"type": "string"}}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "Biosample on which this experiment was done.", "type": "string"}, "table": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_experiments_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genes": {"get": {"operationId": "api_genes_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genes_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, "alternate_ids": {"description": "", "type": "array", "items": {"type": "string"}}, "symbol": {"description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "symbol"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genes/{id}": {"get": {"operationId": "api_genes_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genes_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, "alternate_ids": {"description": "", "type": "array", "items": {"type": "string"}}, "symbol": {"description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "symbol"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genes_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, "alternate_ids": {"description": "", "type": "array", "items": {"type": "string"}}, "symbol": {"description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genes_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/geneticspecimens": {"get": {"operationId": "api_geneticspecimens_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_geneticspecimens_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, "specimen_type": {"description": "The kind of material that forms the specimen.", "type": "object"}, "collection_body": {"description": "The anatomical collection site.", "type": "object"}, "laterality": {"description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "specimen_type"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/geneticspecimens/{id}": {"get": {"operationId": "api_geneticspecimens_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_geneticspecimens_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, "specimen_type": {"description": "The kind of material that forms the specimen.", "type": "object"}, "collection_body": {"description": "The anatomical collection site.", "type": "object"}, "laterality": {"description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "specimen_type"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_geneticspecimens_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, "specimen_type": {"description": "The kind of material that forms the specimen.", "type": "object"}, "collection_body": {"description": "The anatomical collection site.", "type": "object"}, "laterality": {"description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_geneticspecimens_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genomicinterpretations": {"get": {"operationId": "api_genomicinterpretations_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genomicinterpretations_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"status": {"description": "How the call of this GenomicInterpretation was interpreted.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "gene": {"description": "The gene contributing to the diagnosis.", "type": "string"}, "variant": {"description": "The variant contributing to the diagnosis.", "type": "integer"}}, "required": ["status"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genomicinterpretations/{id}": {"get": {"operationId": "api_genomicinterpretations_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genomicinterpretations_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"status": {"description": "How the call of this GenomicInterpretation was interpreted.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "gene": {"description": "The gene contributing to the diagnosis.", "type": "string"}, "variant": {"description": "The variant contributing to the diagnosis.", "type": "integer"}}, "required": ["status"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genomicinterpretations_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"status": {"description": "How the call of this GenomicInterpretation was interpreted.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "gene": {"description": "The gene contributing to the diagnosis.", "type": "string"}, "variant": {"description": "The variant contributing to the diagnosis.", "type": "integer"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genomicinterpretations_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genomicregionsstudied": {"get": {"operationId": "api_genomicregionsstudied_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genomicregionsstudied_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, "dna_ranges_examined": {"description": "The range(s) of the DNA sequence examined.", "type": "object"}, "dna_region_description": {"description": "", "type": "array", "items": {"type": "string"}}, "gene_mutation": {"description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", "type": "object"}, "gene_studied": {"description": "The ID for the gene studied.", "type": "object"}, "genomic_reference_sequence_id": {"description": "Range(s) of DNA sequence examined.", "type": "object"}, "genomic_region_coordinate_system": {"description": "The method of counting along the genome.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genomicregionsstudied/{id}": {"get": {"operationId": "api_genomicregionsstudied_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genomicregionsstudied_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, "dna_ranges_examined": {"description": "The range(s) of the DNA sequence examined.", "type": "object"}, "dna_region_description": {"description": "", "type": "array", "items": {"type": "string"}}, "gene_mutation": {"description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", "type": "object"}, "gene_studied": {"description": "The ID for the gene studied.", "type": "object"}, "genomic_reference_sequence_id": {"description": "Range(s) of DNA sequence examined.", "type": "object"}, "genomic_region_coordinate_system": {"description": "The method of counting along the genome.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genomicregionsstudied_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, "dna_ranges_examined": {"description": "The range(s) of the DNA sequence examined.", "type": "object"}, "dna_region_description": {"description": "", "type": "array", "items": {"type": "string"}}, "gene_mutation": {"description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", "type": "object"}, "gene_studied": {"description": "The ID for the gene studied.", "type": "object"}, "genomic_reference_sequence_id": {"description": "Range(s) of DNA sequence examined.", "type": "object"}, "genomic_region_coordinate_system": {"description": "The method of counting along the genome.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genomicregionsstudied_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genomicsreports": {"get": {"operationId": "api_genomicsreports_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genomicsreports_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetics report.", "type": "string"}, "genetic_variant": {"description": "", "type": "object"}, "genomic_region_studied": {"description": "", "type": "object"}, "code": {"description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", "type": "object"}, "performing_organization_name": {"description": "The name of the organization producing the genomics report.", "type": "string"}, "issued": {"description": "The date/time this report was issued.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "genetic_variant", "genomic_region_studied", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genomicsreports/{id}": {"get": {"operationId": "api_genomicsreports_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genomicsreports_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetics report.", "type": "string"}, "genetic_variant": {"description": "", "type": "object"}, "genomic_region_studied": {"description": "", "type": "object"}, "code": {"description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", "type": "object"}, "performing_organization_name": {"description": "The name of the organization producing the genomics report.", "type": "string"}, "issued": {"description": "The date/time this report was issued.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "genetic_variant", "genomic_region_studied", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genomicsreports_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetics report.", "type": "string"}, "genetic_variant": {"description": "", "type": "object"}, "genomic_region_studied": {"description": "", "type": "object"}, "code": {"description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", "type": "object"}, "performing_organization_name": {"description": "The name of the organization producing the genomics report.", "type": "string"}, "issued": {"description": "The date/time this report was issued.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genomicsreports_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/htsfiles": {"get": {"operationId": "api_htsfiles_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_htsfiles_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"uri": {"description": "A valid URI to the file", "type": "string"}, "description": {"description": "Human-readable text describing the file.", "type": "string"}, "hts_format": {"description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", "type": "string"}, "genome_assembly": {"description": "Genome assembly ID for the file, e.g. GRCh38.", "type": "string"}, "individual_to_sample_identifiers": {"description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["uri", "hts_format", "genome_assembly"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/htsfiles/{uri}": {"get": {"operationId": "api_htsfiles_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_htsfiles_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"uri": {"description": "A valid URI to the file", "type": "string"}, "description": {"description": "Human-readable text describing the file.", "type": "string"}, "hts_format": {"description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", "type": "string"}, "genome_assembly": {"description": "Genome assembly ID for the file, e.g. GRCh38.", "type": "string"}, "individual_to_sample_identifiers": {"description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["uri", "hts_format", "genome_assembly"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_htsfiles_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"uri": {"description": "A valid URI to the file", "type": "string"}, "description": {"description": "Human-readable text describing the file.", "type": "string"}, "hts_format": {"description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", "type": "string"}, "genome_assembly": {"description": "Genome assembly ID for the file, e.g. GRCh38.", "type": "string"}, "individual_to_sample_identifiers": {"description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_htsfiles_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/individuals": {"get": {"operationId": "api_individuals_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_individuals_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the individual.", "type": "string"}, "alternate_ids": {"description": "A list of alternative identifiers for the individual.", "type": "array", "items": {"type": "string"}}, "date_of_birth": {"description": "A timestamp either exact or imprecise.", "type": "string"}, "age": {"description": "The age or age range of the individual.", "type": "object"}, "age_numeric": {"description": "The age of the individual as number.", "type": "number"}, "age_unit": {"description": "The unit for measuring age.", "type": "string"}, "sex": {"description": "Observed apparent sex of the individual.", "type": "string"}, "karyotypic_sex": {"description": "The karyotypic sex of the individual.", "type": "string"}, "taxonomy": {"description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", "type": "object"}, "active": {"description": "Whether this patient's record is in active use.", "type": "boolean"}, "deceased": {"description": "Indicates if the individual is deceased or not.", "type": "boolean"}, "comorbid_condition": {"description": "One or more conditions that occur with primary condition.", "type": "object"}, "ecog_performance_status": {"description": "Value representing the Eastern Cooperative Oncology Group performance status.", "type": "object"}, "karnofsky": {"description": "Value representing the Karnofsky Performance status.", "type": "object"}, "race": {"description": "A code for the person's race.", "type": "string"}, "ethnicity": {"description": "A code for the person's ethnicity.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/individuals/{id}": {"get": {"operationId": "api_individuals_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_individuals_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the individual.", "type": "string"}, "alternate_ids": {"description": "A list of alternative identifiers for the individual.", "type": "array", "items": {"type": "string"}}, "date_of_birth": {"description": "A timestamp either exact or imprecise.", "type": "string"}, "age": {"description": "The age or age range of the individual.", "type": "object"}, "age_numeric": {"description": "The age of the individual as number.", "type": "number"}, "age_unit": {"description": "The unit for measuring age.", "type": "string"}, "sex": {"description": "Observed apparent sex of the individual.", "type": "string"}, "karyotypic_sex": {"description": "The karyotypic sex of the individual.", "type": "string"}, "taxonomy": {"description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", "type": "object"}, "active": {"description": "Whether this patient's record is in active use.", "type": "boolean"}, "deceased": {"description": "Indicates if the individual is deceased or not.", "type": "boolean"}, "comorbid_condition": {"description": "One or more conditions that occur with primary condition.", "type": "object"}, "ecog_performance_status": {"description": "Value representing the Eastern Cooperative Oncology Group performance status.", "type": "object"}, "karnofsky": {"description": "Value representing the Karnofsky Performance status.", "type": "object"}, "race": {"description": "A code for the person's race.", "type": "string"}, "ethnicity": {"description": "A code for the person's ethnicity.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_individuals_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the individual.", "type": "string"}, "alternate_ids": {"description": "A list of alternative identifiers for the individual.", "type": "array", "items": {"type": "string"}}, "date_of_birth": {"description": "A timestamp either exact or imprecise.", "type": "string"}, "age": {"description": "The age or age range of the individual.", "type": "object"}, "age_numeric": {"description": "The age of the individual as number.", "type": "number"}, "age_unit": {"description": "The unit for measuring age.", "type": "string"}, "sex": {"description": "Observed apparent sex of the individual.", "type": "string"}, "karyotypic_sex": {"description": "The karyotypic sex of the individual.", "type": "string"}, "taxonomy": {"description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", "type": "object"}, "active": {"description": "Whether this patient's record is in active use.", "type": "boolean"}, "deceased": {"description": "Indicates if the individual is deceased or not.", "type": "boolean"}, "comorbid_condition": {"description": "One or more conditions that occur with primary condition.", "type": "object"}, "ecog_performance_status": {"description": "Value representing the Eastern Cooperative Oncology Group performance status.", "type": "object"}, "karnofsky": {"description": "Value representing the Karnofsky Performance status.", "type": "object"}, "race": {"description": "A code for the person's race.", "type": "string"}, "ethnicity": {"description": "A code for the person's ethnicity.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_individuals_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}], "tags": ["api"]}}, "/api/interpretations": {"get": {"operationId": "api_interpretations_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_interpretations_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the interpretation.", "type": "string"}, "resolution_status": {"description": "The current status of work on the case.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "phenopacket": {"description": "The subject of this interpretation.", "type": "string"}, "meta_data": {"description": "Metadata about this interpretation.", "type": "integer"}, "diagnosis": {"description": "One or more diagnoses, if made.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "phenopacket", "meta_data", "diagnosis"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/interpretations/{id}": {"get": {"operationId": "api_interpretations_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_interpretations_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the interpretation.", "type": "string"}, "resolution_status": {"description": "The current status of work on the case.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "phenopacket": {"description": "The subject of this interpretation.", "type": "string"}, "meta_data": {"description": "Metadata about this interpretation.", "type": "integer"}, "diagnosis": {"description": "One or more diagnoses, if made.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "phenopacket", "meta_data", "diagnosis"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_interpretations_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the interpretation.", "type": "string"}, "resolution_status": {"description": "The current status of work on the case.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "phenopacket": {"description": "The subject of this interpretation.", "type": "string"}, "meta_data": {"description": "Metadata about this interpretation.", "type": "integer"}, "diagnosis": {"description": "One or more diagnoses, if made.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_interpretations_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/labsvital": {"get": {"operationId": "api_labsvital_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_labsvital_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, "tumor_marker_code": {"description": "A code identifying the type of tumor marker test.", "type": "object"}, "tumor_marker_data_value": {"description": "The result of a tumor marker test.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "The individual who is the subject of the tests.", "type": "string"}}, "required": ["id", "tumor_marker_code", "individual"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/labsvital/{id}": {"get": {"operationId": "api_labsvital_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_labsvital_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, "tumor_marker_code": {"description": "A code identifying the type of tumor marker test.", "type": "object"}, "tumor_marker_data_value": {"description": "The result of a tumor marker test.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "The individual who is the subject of the tests.", "type": "string"}}, "required": ["id", "tumor_marker_code", "individual"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_labsvital_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, "tumor_marker_code": {"description": "A code identifying the type of tumor marker test.", "type": "object"}, "tumor_marker_data_value": {"description": "The result of a tumor marker test.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "The individual who is the subject of the tests.", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_labsvital_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/mcode_overview": {"get": {"operationId": "api_mcode_overview_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Overview of all mCode data in the database", "summary": "Overview of all mCode data in the database", "tags": ["api"]}}, "/api/mcode_schema": {"get": {"operationId": "api_mcode_schema_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Mcodepacket schema", "summary": "Mcodepacket schema", "tags": ["api"]}}, "/api/mcodepackets": {"get": {"operationId": "api_mcodepackets_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_mcodepackets_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, "date_of_death": {"description": "An indication that the patient is no longer living, given by a date of death or boolean.", "type": "string"}, "cancer_disease_status": {"description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "An individual who is a subject of mcodepacket.", "type": "string"}, "genomics_report": {"description": "A genomics report associated with an Individual.", "type": "string"}, "table": {"description": "", "type": "string"}, "cancer_condition": {"description": "An Individual's cancer condition.", "type": "array", "items": {"type": "string"}}, "cancer_related_procedures": {"description": "A radiological or surgical procedures addressing a cancer condition.", "type": "array", "items": {"type": "string"}}, "medication_statement": {"description": "Medication treatment addressed to an Individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/mcodepackets/{id}": {"get": {"operationId": "api_mcodepackets_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_mcodepackets_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, "date_of_death": {"description": "An indication that the patient is no longer living, given by a date of death or boolean.", "type": "string"}, "cancer_disease_status": {"description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "An individual who is a subject of mcodepacket.", "type": "string"}, "genomics_report": {"description": "A genomics report associated with an Individual.", "type": "string"}, "table": {"description": "", "type": "string"}, "cancer_condition": {"description": "An Individual's cancer condition.", "type": "array", "items": {"type": "string"}}, "cancer_related_procedures": {"description": "A radiological or surgical procedures addressing a cancer condition.", "type": "array", "items": {"type": "string"}}, "medication_statement": {"description": "Medication treatment addressed to an Individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_mcodepackets_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, "date_of_death": {"description": "An indication that the patient is no longer living, given by a date of death or boolean.", "type": "string"}, "cancer_disease_status": {"description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "An individual who is a subject of mcodepacket.", "type": "string"}, "genomics_report": {"description": "A genomics report associated with an Individual.", "type": "string"}, "table": {"description": "", "type": "string"}, "cancer_condition": {"description": "An Individual's cancer condition.", "type": "array", "items": {"type": "string"}}, "cancer_related_procedures": {"description": "A radiological or surgical procedures addressing a cancer condition.", "type": "array", "items": {"type": "string"}}, "medication_statement": {"description": "Medication treatment addressed to an Individual.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_mcodepackets_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/medicationstatements": {"get": {"operationId": "api_medicationstatements_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_medicationstatements_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the medication statement.", "type": "string"}, "medication_code": {"description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", "type": "object"}, "termination_reason": {"description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", "type": "object"}, "start_date": {"description": "The start date/time of the medication.", "type": "string"}, "end_date": {"description": "The end date/time of the medication.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "medication_code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/medicationstatements/{id}": {"get": {"operationId": "api_medicationstatements_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_medicationstatements_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the medication statement.", "type": "string"}, "medication_code": {"description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", "type": "object"}, "termination_reason": {"description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", "type": "object"}, "start_date": {"description": "The start date/time of the medication.", "type": "string"}, "end_date": {"description": "The end date/time of the medication.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "medication_code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_medicationstatements_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the medication statement.", "type": "string"}, "medication_code": {"description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", "type": "object"}, "termination_reason": {"description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", "type": "object"}, "start_date": {"description": "The start date/time of the medication.", "type": "string"}, "end_date": {"description": "The end date/time of the medication.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_medicationstatements_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/metadata": {"get": {"operationId": "api_metadata_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_metadata_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"created": {"description": "Timestamp specifying when when this object was created.", "type": "string"}, "created_by": {"description": "Name of the person who created the phenopacket.", "type": "string"}, "submitted_by": {"description": "Name of the person who submitted the phenopacket.", "type": "string"}, "updates": {"description": "A list of updates to the phenopacket.", "type": "object"}, "phenopacket_schema_version": {"description": "Schema version of the current phenopacket.", "type": "string"}, "external_references": {"description": "A list of external (non-resource) references.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["created_by"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/metadata/{id}": {"get": {"operationId": "api_metadata_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_metadata_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"created": {"description": "Timestamp specifying when when this object was created.", "type": "string"}, "created_by": {"description": "Name of the person who created the phenopacket.", "type": "string"}, "submitted_by": {"description": "Name of the person who submitted the phenopacket.", "type": "string"}, "updates": {"description": "A list of updates to the phenopacket.", "type": "object"}, "phenopacket_schema_version": {"description": "Schema version of the current phenopacket.", "type": "string"}, "external_references": {"description": "A list of external (non-resource) references.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["created_by"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_metadata_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"created": {"description": "Timestamp specifying when when this object was created.", "type": "string"}, "created_by": {"description": "Name of the person who created the phenopacket.", "type": "string"}, "submitted_by": {"description": "Name of the person who submitted the phenopacket.", "type": "string"}, "updates": {"description": "A list of updates to the phenopacket.", "type": "object"}, "phenopacket_schema_version": {"description": "Schema version of the current phenopacket.", "type": "string"}, "external_references": {"description": "A list of external (non-resource) references.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_metadata_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/overview": {"get": {"operationId": "api_overview_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Overview of all Phenopackets in the database", "summary": "Overview of all Phenopackets in the database", "tags": ["api"]}}, "/api/phenopackets": {"get": {"operationId": "api_phenopackets_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_phenopackets_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "A subject of a phenopacket, representing either a human (typically) or another organism.", "type": "string"}, "meta_data": {"description": "A structured definition of the resources and ontologies used within a phenopacket.", "type": "integer"}, "table": {"description": "", "type": "string"}, "biosamples": {"description": "Samples (e.g. biopsies) taken from the individual, if any.", "type": "array", "items": {"type": "string"}}, "genes": {"description": "Genes deemed to be relevant to the case; application-specific.", "type": "array", "items": {"type": "string"}}, "variants": {"description": "A list of variants identified in the proband.", "type": "array", "items": {"type": "string"}}, "diseases": {"description": "A list of diseases diagnosed in the proband.", "type": "array", "items": {"type": "string"}}, "hts_files": {"description": "A list of HTS files derived from the individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject", "meta_data"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/phenopackets/{id}": {"get": {"operationId": "api_phenopackets_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_phenopackets_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "A subject of a phenopacket, representing either a human (typically) or another organism.", "type": "string"}, "meta_data": {"description": "A structured definition of the resources and ontologies used within a phenopacket.", "type": "integer"}, "table": {"description": "", "type": "string"}, "biosamples": {"description": "Samples (e.g. biopsies) taken from the individual, if any.", "type": "array", "items": {"type": "string"}}, "genes": {"description": "Genes deemed to be relevant to the case; application-specific.", "type": "array", "items": {"type": "string"}}, "variants": {"description": "A list of variants identified in the proband.", "type": "array", "items": {"type": "string"}}, "diseases": {"description": "A list of diseases diagnosed in the proband.", "type": "array", "items": {"type": "string"}}, "hts_files": {"description": "A list of HTS files derived from the individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject", "meta_data"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_phenopackets_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "A subject of a phenopacket, representing either a human (typically) or another organism.", "type": "string"}, "meta_data": {"description": "A structured definition of the resources and ontologies used within a phenopacket.", "type": "integer"}, "table": {"description": "", "type": "string"}, "biosamples": {"description": "Samples (e.g. biopsies) taken from the individual, if any.", "type": "array", "items": {"type": "string"}}, "genes": {"description": "Genes deemed to be relevant to the case; application-specific.", "type": "array", "items": {"type": "string"}}, "variants": {"description": "A list of variants identified in the proband.", "type": "array", "items": {"type": "string"}}, "diseases": {"description": "A list of diseases diagnosed in the proband.", "type": "array", "items": {"type": "string"}}, "hts_files": {"description": "A list of HTS files derived from the individual.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_phenopackets_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/phenotypicfeatures": {"get": {"operationId": "api_phenotypicfeatures_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_phenotypicfeatures_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"type": {"description": "", "type": "object"}, "description": {"description": "Human-readable text describing the phenotypic feature; NOT for structured text.", "type": "string"}, "negated": {"description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", "type": "boolean"}, "severity": {"description": "An ontology term that describes the severity of the condition.", "type": "object"}, "modifier": {"description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", "type": "object"}, "onset": {"description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", "type": "object"}, "evidence": {"description": "One or more pieces of evidence that specify how the phenotype was determined.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "", "type": "string"}, "phenopacket": {"description": "", "type": "string"}}, "required": ["type"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/phenotypicfeatures/{id}": {"get": {"operationId": "api_phenotypicfeatures_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_phenotypicfeatures_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"type": {"description": "", "type": "object"}, "description": {"description": "Human-readable text describing the phenotypic feature; NOT for structured text.", "type": "string"}, "negated": {"description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", "type": "boolean"}, "severity": {"description": "An ontology term that describes the severity of the condition.", "type": "object"}, "modifier": {"description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", "type": "object"}, "onset": {"description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", "type": "object"}, "evidence": {"description": "One or more pieces of evidence that specify how the phenotype was determined.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "", "type": "string"}, "phenopacket": {"description": "", "type": "string"}}, "required": ["type"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_phenotypicfeatures_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"type": {"description": "", "type": "object"}, "description": {"description": "Human-readable text describing the phenotypic feature; NOT for structured text.", "type": "string"}, "negated": {"description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", "type": "boolean"}, "severity": {"description": "An ontology term that describes the severity of the condition.", "type": "object"}, "modifier": {"description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", "type": "object"}, "onset": {"description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", "type": "object"}, "evidence": {"description": "One or more pieces of evidence that specify how the phenotype was determined.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "", "type": "string"}, "phenopacket": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_phenotypicfeatures_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/procedures": {"get": {"operationId": "api_procedures_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_procedures_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"code": {"description": "An ontology term that represents a clinical procedure performed on a subject.", "type": "object"}, "body_site": {"description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/procedures/{id}": {"get": {"operationId": "api_procedures_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_procedures_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"code": {"description": "An ontology term that represents a clinical procedure performed on a subject.", "type": "object"}, "body_site": {"description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_procedures_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"code": {"description": "An ontology term that represents a clinical procedure performed on a subject.", "type": "object"}, "body_site": {"description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_procedures_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/projects": {"get": {"operationId": "api_projects_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_projects_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}}, "required": ["title"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/projects/{identifier}": {"get": {"operationId": "api_projects_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_projects_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}}, "required": ["title"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_projects_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_projects_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}], "tags": ["api"]}}, "/api/public": {"get": {"operationId": "api_public_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "age_range_min", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "age_range_max", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "description": "View to return only count of all individuals after filtering.", "summary": "View to return only count of all individuals after filtering.", "tags": ["api"]}}, "/api/public_overview": {"get": {"operationId": "api_public_overview_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Overview of all public data in the database", "summary": "Overview of all public data in the database", "tags": ["api"]}}, "/api/public_search_fields": {"get": {"operationId": "api_public_search_fields_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Return public search fields", "summary": "Return public search fields", "tags": ["api"]}}, "/api/resources": {"get": {"operationId": "api_resources_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_resources_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, "name": {"description": "The full name of the resource or ontology referred to by the id element.", "type": "string"}, "namespace_prefix": {"description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", "type": "string"}, "url": {"description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", "type": "string"}, "version": {"description": "The version of the resource or ontology used to make the annotation.", "type": "string"}, "iri_prefix": {"description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "name", "namespace_prefix", "url", "version", "iri_prefix"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/resources/{id}": {"get": {"operationId": "api_resources_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_resources_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, "name": {"description": "The full name of the resource or ontology referred to by the id element.", "type": "string"}, "namespace_prefix": {"description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", "type": "string"}, "url": {"description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", "type": "string"}, "version": {"description": "The version of the resource or ontology used to make the annotation.", "type": "string"}, "iri_prefix": {"description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "name", "namespace_prefix", "url", "version", "iri_prefix"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_resources_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, "name": {"description": "The full name of the resource or ontology referred to by the id element.", "type": "string"}, "namespace_prefix": {"description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", "type": "string"}, "url": {"description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", "type": "string"}, "version": {"description": "The version of the resource or ontology used to make the annotation.", "type": "string"}, "iri_prefix": {"description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_resources_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/table_ownership": {"get": {"operationId": "api_table_ownership_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_table_ownership_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"table_id": {"description": "", "type": "string"}, "service_id": {"description": "", "type": "string"}, "service_artifact": {"description": "", "type": "string"}, "dataset": {"description": "", "type": "string"}}, "required": ["table_id", "service_id", "dataset"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/table_ownership/{table_id}": {"get": {"operationId": "api_table_ownership_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_table_ownership_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"table_id": {"description": "", "type": "string"}, "service_id": {"description": "", "type": "string"}, "service_artifact": {"description": "", "type": "string"}, "dataset": {"description": "", "type": "string"}}, "required": ["table_id", "service_id", "dataset"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_table_ownership_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"table_id": {"description": "", "type": "string"}, "service_id": {"description": "", "type": "string"}, "service_artifact": {"description": "", "type": "string"}, "dataset": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_table_ownership_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}], "tags": ["api"]}}, "/api/tables": {"get": {"operationId": "api_tables_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_tables_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"ownership_record": {"description": "", "type": "string"}, "name": {"description": "", "type": "string"}, "data_type": {"description": "", "type": "string"}}, "required": ["ownership_record", "name", "data_type"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/tables/{ownership_record}": {"get": {"operationId": "api_tables_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_tables_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"ownership_record": {"description": "", "type": "string"}, "name": {"description": "", "type": "string"}, "data_type": {"description": "", "type": "string"}}, "required": ["ownership_record", "name", "data_type"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_tables_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"ownership_record": {"description": "", "type": "string"}, "name": {"description": "", "type": "string"}, "data_type": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_tables_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}], "tags": ["api"]}}, "/api/tnmstaging": {"get": {"operationId": "api_tnmstaging_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_tnmstaging_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the TNM staging.", "type": "string"}, "tnm_type": {"description": "TNM type: clinical or pathological.", "type": "string"}, "stage_group": {"description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "primary_tumor_category": {"description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "regional_nodes_category": {"description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "distant_metastases_category": {"description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "cancer_condition": {"description": "Cancer condition.", "type": "string"}}, "required": ["id", "tnm_type", "stage_group", "primary_tumor_category", "regional_nodes_category", "distant_metastases_category", "cancer_condition"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/tnmstaging/{id}": {"get": {"operationId": "api_tnmstaging_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_tnmstaging_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the TNM staging.", "type": "string"}, "tnm_type": {"description": "TNM type: clinical or pathological.", "type": "string"}, "stage_group": {"description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "primary_tumor_category": {"description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "regional_nodes_category": {"description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "distant_metastases_category": {"description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "cancer_condition": {"description": "Cancer condition.", "type": "string"}}, "required": ["id", "tnm_type", "stage_group", "primary_tumor_category", "regional_nodes_category", "distant_metastases_category", "cancer_condition"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_tnmstaging_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the TNM staging.", "type": "string"}, "tnm_type": {"description": "TNM type: clinical or pathological.", "type": "string"}, "stage_group": {"description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "primary_tumor_category": {"description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "regional_nodes_category": {"description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "distant_metastases_category": {"description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "cancer_condition": {"description": "Cancer condition.", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_tnmstaging_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/variants": {"get": {"operationId": "api_variants_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_variants_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"allele_type": {"description": "One of four allele types.", "type": "string"}, "allele": {"description": "The variant's corresponding allele", "type": "object"}, "zygosity": {"description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["allele_type", "allele"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/variants/{id}": {"get": {"operationId": "api_variants_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_variants_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"allele_type": {"description": "One of four allele types.", "type": "string"}, "allele": {"description": "The variant's corresponding allele", "type": "object"}, "zygosity": {"description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["allele_type", "allele"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_variants_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"allele_type": {"description": "One of four allele types.", "type": "string"}, "allele": {"description": "The variant's corresponding allele", "type": "object"}, "zygosity": {"description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_variants_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/data-types": {"get": {"operationId": "data-types_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["data-types"]}}, "/data-types/{data_type}": {"get": {"operationId": "data-types_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "data_type", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["data-types"]}}, "/data-types/{data_type}/metadata_schema": {"get": {"operationId": "data-types_metadata_schema_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "data_type", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["data-types"]}}, "/data-types/{data_type}/schema": {"get": {"operationId": "data-types_schema_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "data_type", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["data-types"]}}, "/fhir-search": {"get": {"operationId": "fhir-search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["fhir-search"]}, "post": {"operationId": "fhir-search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["fhir-search"]}}, "/private/export": {"post": {"operationId": "private_export_create", "responses": {"201": {"description": ""}}, "parameters": [], "description": "Export data from Katsu\n\nExports the requested data object (e.g. a Dataset or a Project) in the given\nformat.\nNote that the generated files will be either written locally if a path is\nprovided, or downloaded as a tar gzipped attachment otherwise.", "summary": "Export data from Katsu", "tags": ["private"]}}, "/private/fhir-search": {"get": {"operationId": "private_fhir-search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["private"]}, "post": {"operationId": "private_fhir-search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["private"]}}, "/private/ingest": {"post": {"operationId": "private_ingest_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["private"]}}, "/private/search": {"get": {"operationId": "private_search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["private"]}, "post": {"operationId": "private_search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["private"]}}, "/private/tables/{table_id}/search": {"get": {"operationId": "private_tables_search_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["private"]}, "post": {"operationId": "private_tables_search_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["private"]}}, "/search": {"get": {"operationId": "search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["search"]}, "post": {"operationId": "search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["search"]}}, "/service-info": {"get": {"operationId": "service-info_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Return service info", "summary": "Return service info", "tags": ["service-info"]}}, "/tables": {"get": {"operationId": "tables_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["tables"]}, "post": {"operationId": "tables_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["tables"]}}, "/tables/{table_id}": {"get": {"operationId": "tables_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}, "delete": {"operationId": "tables_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}}, "/tables/{table_id}/search": {"get": {"operationId": "tables_search_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}, "post": {"operationId": "tables_search_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}}, "/tables/{table_id}/summary": {"get": {"operationId": "tables_summary_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}}, "/workflows": {"get": {"operationId": "workflows_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["workflows"]}}, "/workflows/{workflow_id}": {"get": {"operationId": "workflows_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "workflow_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["workflows"]}}, "/workflows/{workflow_id}.wdl": {"get": {"operationId": "workflows_read_0", "responses": {"200": {"description": ""}}, "parameters": [{"name": "workflow_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["workflows"]}}}, "securityDefinitions": {"basic": {"type": "basic"}}} \ No newline at end of file From da4144d1c0d2824ed24df2b7f663a768dd3a56e2 Mon Sep 17 00:00:00 2001 From: zxenia Date: Thu, 2 Jun 2022 23:34:25 -0400 Subject: [PATCH 02/59] add indentation --- swagger_schema.json | 14413 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 14412 insertions(+), 1 deletion(-) diff --git a/swagger_schema.json b/swagger_schema.json index 13b214110..9cefb26f5 100644 --- a/swagger_schema.json +++ b/swagger_schema.json @@ -1 +1,14412 @@ -{"swagger": "2.0", "info": {"title": "Katsu Metadata Service API", "description": "A metadata service for clinical/phenotypical and experiment metadata", "version": "2.11.0"}, "host": "localhost:8000", "schemes": ["http"], "paths": {"/": {"get": {"operationId": "_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": [""]}}, "/api/biosamples": {"get": {"operationId": "api_biosamples_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_biosamples_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, "procedure": {"description": "", "type": "object"}, "description": {"description": "Human-readable, unstructured text describing the biosample or providing additional information.", "type": "string"}, "sampled_tissue": {"description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", "type": "object"}, "taxonomy": {"description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", "type": "object"}, "individual_age_at_collection": {"description": "individual_age_at_collection", "type": "object"}, "histological_diagnosis": {"description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", "type": "object"}, "tumor_progression": {"description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", "type": "object"}, "tumor_grade": {"description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", "type": "object"}, "diagnostic_markers": {"description": "A list of ontology terms representing clinically-relevant bio-markers.", "type": "object"}, "is_control_sample": {"description": "Whether the sample is being used as a normal control.", "type": "boolean"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "Identifier for the individual this biosample was sampled from.", "type": "string"}, "hts_files": {"description": "A list of HTS files derived from the biosample.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure", "sampled_tissue"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/biosamples/{id}": {"get": {"operationId": "api_biosamples_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_biosamples_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, "procedure": {"description": "", "type": "object"}, "description": {"description": "Human-readable, unstructured text describing the biosample or providing additional information.", "type": "string"}, "sampled_tissue": {"description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", "type": "object"}, "taxonomy": {"description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", "type": "object"}, "individual_age_at_collection": {"description": "individual_age_at_collection", "type": "object"}, "histological_diagnosis": {"description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", "type": "object"}, "tumor_progression": {"description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", "type": "object"}, "tumor_grade": {"description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", "type": "object"}, "diagnostic_markers": {"description": "A list of ontology terms representing clinically-relevant bio-markers.", "type": "object"}, "is_control_sample": {"description": "Whether the sample is being used as a normal control.", "type": "boolean"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "Identifier for the individual this biosample was sampled from.", "type": "string"}, "hts_files": {"description": "A list of HTS files derived from the biosample.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure", "sampled_tissue"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_biosamples_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, "procedure": {"description": "", "type": "object"}, "description": {"description": "Human-readable, unstructured text describing the biosample or providing additional information.", "type": "string"}, "sampled_tissue": {"description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", "type": "object"}, "taxonomy": {"description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", "type": "object"}, "individual_age_at_collection": {"description": "individual_age_at_collection", "type": "object"}, "histological_diagnosis": {"description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", "type": "object"}, "tumor_progression": {"description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", "type": "object"}, "tumor_grade": {"description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", "type": "object"}, "diagnostic_markers": {"description": "A list of ontology terms representing clinically-relevant bio-markers.", "type": "object"}, "is_control_sample": {"description": "Whether the sample is being used as a normal control.", "type": "boolean"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "Identifier for the individual this biosample was sampled from.", "type": "string"}, "hts_files": {"description": "A list of HTS files derived from the biosample.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_biosamples_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique arbitrary, researcher-specified identifier for the biosample.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "procedure", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "is_control_sample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sampled_tissue", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "taxonomy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "histological_diagnosis", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_progression", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "tumor_grade", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/cancerconditions": {"get": {"operationId": "api_cancerconditions_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_cancerconditions_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer condition.", "type": "string"}, "condition_type": {"description": "Cancer condition type: primary or secondary.", "type": "string"}, "body_site": {"description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "clinical_status": {"description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", "type": "object"}, "code": {"description": "A code describing the type of primary or secondary malignant neoplastic disease.", "type": "object"}, "date_of_diagnosis": {"description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", "type": "string"}, "histology_morphology_behavior": {"description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "verification_status": {"description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "condition_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/cancerconditions/{id}": {"get": {"operationId": "api_cancerconditions_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_cancerconditions_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer condition.", "type": "string"}, "condition_type": {"description": "Cancer condition type: primary or secondary.", "type": "string"}, "body_site": {"description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "clinical_status": {"description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", "type": "object"}, "code": {"description": "A code describing the type of primary or secondary malignant neoplastic disease.", "type": "object"}, "date_of_diagnosis": {"description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", "type": "string"}, "histology_morphology_behavior": {"description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "verification_status": {"description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "condition_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_cancerconditions_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer condition.", "type": "string"}, "condition_type": {"description": "Cancer condition type: primary or secondary.", "type": "string"}, "body_site": {"description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "clinical_status": {"description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", "type": "object"}, "code": {"description": "A code describing the type of primary or secondary malignant neoplastic disease.", "type": "object"}, "date_of_diagnosis": {"description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", "type": "string"}, "histology_morphology_behavior": {"description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", "type": "object"}, "verification_status": {"description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_cancerconditions_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer condition.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/cancergeneticvariants": {"get": {"operationId": "api_cancergeneticvariants_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_cancergeneticvariants_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, "data_value": {"description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", "type": "object"}, "method": {"description": "The method used to perform the genetic test.", "type": "object"}, "amino_acid_change": {"description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", "type": "object"}, "amino_acid_change_type": {"description": "The type of change related to the amino acid variant.", "type": "object"}, "cytogenetic_location": {"description": "The cytogenetic (chromosome) location.", "type": "object"}, "cytogenetic_nomenclature": {"description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", "type": "object"}, "genomic_dna_change": {"description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", "type": "object"}, "genomic_source_class": {"description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", "type": "object"}, "variation_code": {"description": "The variation ID assigned by ClinVar.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "gene_studied": {"description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", "type": "array", "items": {"type": "string"}}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/cancergeneticvariants/{id}": {"get": {"operationId": "api_cancergeneticvariants_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_cancergeneticvariants_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, "data_value": {"description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", "type": "object"}, "method": {"description": "The method used to perform the genetic test.", "type": "object"}, "amino_acid_change": {"description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", "type": "object"}, "amino_acid_change_type": {"description": "The type of change related to the amino acid variant.", "type": "object"}, "cytogenetic_location": {"description": "The cytogenetic (chromosome) location.", "type": "object"}, "cytogenetic_nomenclature": {"description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", "type": "object"}, "genomic_dna_change": {"description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", "type": "object"}, "genomic_source_class": {"description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", "type": "object"}, "variation_code": {"description": "The variation ID assigned by ClinVar.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "gene_studied": {"description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", "type": "array", "items": {"type": "string"}}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_cancergeneticvariants_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, "data_value": {"description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", "type": "object"}, "method": {"description": "The method used to perform the genetic test.", "type": "object"}, "amino_acid_change": {"description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", "type": "object"}, "amino_acid_change_type": {"description": "The type of change related to the amino acid variant.", "type": "object"}, "cytogenetic_location": {"description": "The cytogenetic (chromosome) location.", "type": "object"}, "cytogenetic_nomenclature": {"description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", "type": "object"}, "genomic_dna_change": {"description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", "type": "object"}, "genomic_source_class": {"description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", "type": "object"}, "variation_code": {"description": "The variation ID assigned by ClinVar.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "gene_studied": {"description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_cancergeneticvariants_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the cancer genetic variant.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/cancerrelatedprocedures": {"get": {"operationId": "api_cancerrelatedprocedures_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_cancerrelatedprocedures_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the procedure.", "type": "string"}, "procedure_type": {"description": "Type of cancer related procedure: radiation or surgical.", "type": "string"}, "code": {"description": "Code for the procedure performed.", "type": "object"}, "body_site": {"description": "The body location(s) where the procedure was performed.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment.", "type": "object"}, "reason_code": {"description": "The explanation or justification for why the surgical procedure was performed.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "reason_reference": {"description": "Reference to a primary or secondary cancer condition.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/cancerrelatedprocedures/{id}": {"get": {"operationId": "api_cancerrelatedprocedures_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_cancerrelatedprocedures_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the procedure.", "type": "string"}, "procedure_type": {"description": "Type of cancer related procedure: radiation or surgical.", "type": "string"}, "code": {"description": "Code for the procedure performed.", "type": "object"}, "body_site": {"description": "The body location(s) where the procedure was performed.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment.", "type": "object"}, "reason_code": {"description": "The explanation or justification for why the surgical procedure was performed.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "reason_reference": {"description": "Reference to a primary or secondary cancer condition.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "procedure_type", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_cancerrelatedprocedures_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the procedure.", "type": "string"}, "procedure_type": {"description": "Type of cancer related procedure: radiation or surgical.", "type": "string"}, "code": {"description": "Code for the procedure performed.", "type": "object"}, "body_site": {"description": "The body location(s) where the procedure was performed.", "type": "object"}, "laterality": {"description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment.", "type": "object"}, "reason_code": {"description": "The explanation or justification for why the surgical procedure was performed.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "reason_reference": {"description": "Reference to a primary or secondary cancer condition.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_cancerrelatedprocedures_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the procedure.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/chord_phenopacket_schema": {"get": {"operationId": "api_chord_phenopacket_schema_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Chord phenopacket schema that can be shared with data providers.", "summary": "Chord phenopacket schema that can be shared with data providers.", "tags": ["api"]}}, "/api/datasets": {"get": {"operationId": "api_datasets_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_datasets_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}, "contact_info": {"description": "", "type": "string"}, "data_use": {"description": "", "type": "object"}, "linked_field_sets": {"description": "Data type fields which are linked together.", "type": "object"}, "alternate_identifiers": {"description": "Alternate identifiers for the dataset.", "type": "object"}, "related_identifiers": {"description": "Related identifiers for the dataset.", "type": "object"}, "dates": {"description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", "type": "object"}, "stored_in": {"description": "The data repository hosting the dataset.", "type": "object"}, "spatial_coverage": {"description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", "type": "object"}, "types": {"description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", "type": "object"}, "availability": {"description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", "type": "string"}, "refinement": {"description": "A qualifier to describe the level of data processing of the dataset and its distributions.", "type": "string"}, "aggregation": {"description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", "type": "string"}, "privacy": {"description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", "type": "string"}, "distributions": {"description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", "type": "object"}, "dimensions": {"description": "The different dimensions (granular components) making up a dataset.", "type": "object"}, "primary_publications": {"description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", "type": "object"}, "citations": {"description": "The publication(s) that cite this dataset.", "type": "object"}, "citation_count": {"description": "The number of publications that cite this dataset (enumerated in the citations property).", "type": "integer"}, "produced_by": {"description": "A study process which generated a given dataset, if any.", "type": "object"}, "creators": {"description": "The person(s) or organization(s) which contributed to the creation of the dataset.", "type": "object"}, "licenses": {"description": "The terms of use of the dataset.", "type": "object"}, "acknowledges": {"description": "The grant(s) which funded and supported the work reported by the dataset.", "type": "object"}, "keywords": {"description": "Tags associated with the dataset, which will help in its discovery.", "type": "object"}, "version": {"description": "A release point for the dataset when applicable.", "type": "string"}, "extra_properties": {"description": "Extra properties that do not fit in the previous specified attributes.", "type": "object"}, "project": {"description": "", "type": "string"}, "additional_resources": {"description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", "type": "array", "items": {"type": "string"}}, "has_part": {"description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", "type": "array", "items": {"type": "string"}}}, "required": ["title", "data_use", "project"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/datasets/{identifier}": {"get": {"operationId": "api_datasets_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_datasets_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}, "contact_info": {"description": "", "type": "string"}, "data_use": {"description": "", "type": "object"}, "linked_field_sets": {"description": "Data type fields which are linked together.", "type": "object"}, "alternate_identifiers": {"description": "Alternate identifiers for the dataset.", "type": "object"}, "related_identifiers": {"description": "Related identifiers for the dataset.", "type": "object"}, "dates": {"description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", "type": "object"}, "stored_in": {"description": "The data repository hosting the dataset.", "type": "object"}, "spatial_coverage": {"description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", "type": "object"}, "types": {"description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", "type": "object"}, "availability": {"description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", "type": "string"}, "refinement": {"description": "A qualifier to describe the level of data processing of the dataset and its distributions.", "type": "string"}, "aggregation": {"description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", "type": "string"}, "privacy": {"description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", "type": "string"}, "distributions": {"description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", "type": "object"}, "dimensions": {"description": "The different dimensions (granular components) making up a dataset.", "type": "object"}, "primary_publications": {"description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", "type": "object"}, "citations": {"description": "The publication(s) that cite this dataset.", "type": "object"}, "citation_count": {"description": "The number of publications that cite this dataset (enumerated in the citations property).", "type": "integer"}, "produced_by": {"description": "A study process which generated a given dataset, if any.", "type": "object"}, "creators": {"description": "The person(s) or organization(s) which contributed to the creation of the dataset.", "type": "object"}, "licenses": {"description": "The terms of use of the dataset.", "type": "object"}, "acknowledges": {"description": "The grant(s) which funded and supported the work reported by the dataset.", "type": "object"}, "keywords": {"description": "Tags associated with the dataset, which will help in its discovery.", "type": "object"}, "version": {"description": "A release point for the dataset when applicable.", "type": "string"}, "extra_properties": {"description": "Extra properties that do not fit in the previous specified attributes.", "type": "object"}, "project": {"description": "", "type": "string"}, "additional_resources": {"description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", "type": "array", "items": {"type": "string"}}, "has_part": {"description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", "type": "array", "items": {"type": "string"}}}, "required": ["title", "data_use", "project"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_datasets_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}, "contact_info": {"description": "", "type": "string"}, "data_use": {"description": "", "type": "object"}, "linked_field_sets": {"description": "Data type fields which are linked together.", "type": "object"}, "alternate_identifiers": {"description": "Alternate identifiers for the dataset.", "type": "object"}, "related_identifiers": {"description": "Related identifiers for the dataset.", "type": "object"}, "dates": {"description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", "type": "object"}, "stored_in": {"description": "The data repository hosting the dataset.", "type": "object"}, "spatial_coverage": {"description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", "type": "object"}, "types": {"description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", "type": "object"}, "availability": {"description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", "type": "string"}, "refinement": {"description": "A qualifier to describe the level of data processing of the dataset and its distributions.", "type": "string"}, "aggregation": {"description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", "type": "string"}, "privacy": {"description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", "type": "string"}, "distributions": {"description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", "type": "object"}, "dimensions": {"description": "The different dimensions (granular components) making up a dataset.", "type": "object"}, "primary_publications": {"description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", "type": "object"}, "citations": {"description": "The publication(s) that cite this dataset.", "type": "object"}, "citation_count": {"description": "The number of publications that cite this dataset (enumerated in the citations property).", "type": "integer"}, "produced_by": {"description": "A study process which generated a given dataset, if any.", "type": "object"}, "creators": {"description": "The person(s) or organization(s) which contributed to the creation of the dataset.", "type": "object"}, "licenses": {"description": "The terms of use of the dataset.", "type": "object"}, "acknowledges": {"description": "The grant(s) which funded and supported the work reported by the dataset.", "type": "object"}, "keywords": {"description": "Tags associated with the dataset, which will help in its discovery.", "type": "object"}, "version": {"description": "A release point for the dataset when applicable.", "type": "string"}, "extra_properties": {"description": "Extra properties that do not fit in the previous specified attributes.", "type": "object"}, "project": {"description": "", "type": "string"}, "additional_resources": {"description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", "type": "array", "items": {"type": "string"}}, "has_part": {"description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_datasets_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this dataset.", "type": "string"}], "tags": ["api"]}}, "/api/diagnoses": {"get": {"operationId": "api_diagnoses_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_diagnoses_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "disease": {"description": "The diagnosed condition.", "type": "integer"}, "genomic_interpretations": {"description": "The genomic elements assessed as being responsible for the disease.", "type": "array", "items": {"type": "string"}}}, "required": ["disease"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/diagnoses/{id}": {"get": {"operationId": "api_diagnoses_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_diagnoses_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "disease": {"description": "The diagnosed condition.", "type": "integer"}, "genomic_interpretations": {"description": "The genomic elements assessed as being responsible for the disease.", "type": "array", "items": {"type": "string"}}}, "required": ["disease"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_diagnoses_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "disease": {"description": "The diagnosed condition.", "type": "integer"}, "genomic_interpretations": {"description": "The genomic elements assessed as being responsible for the disease.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_diagnoses_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this diagnosis.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "disease_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/diseases": {"get": {"operationId": "api_diseases_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_diseases_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"term": {"description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", "type": "object"}, "onset": {"description": "A representation of the age of onset of the disease", "type": "object"}, "disease_stage": {"description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", "type": "object"}, "tnm_finding": {"description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["term"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/diseases/{id}": {"get": {"operationId": "api_diseases_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_diseases_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"term": {"description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", "type": "object"}, "onset": {"description": "A representation of the age of onset of the disease", "type": "object"}, "disease_stage": {"description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", "type": "object"}, "tnm_finding": {"description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["term"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_diseases_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"term": {"description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", "type": "object"}, "onset": {"description": "A representation of the age of onset of the disease", "type": "object"}, "disease_stage": {"description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", "type": "object"}, "tnm_finding": {"description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_diseases_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this disease.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "term", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_comorbidities_group", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/experiment_schema": {"get": {"operationId": "api_experiment_schema_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Experiment schema", "summary": "Experiment schema", "tags": ["api"]}}, "/api/experimentresults": {"get": {"operationId": "api_experimentresults_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_experimentresults_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"identifier": {"description": "An arbitrary identifier for an experiment result.", "type": "string"}, "description": {"description": "Description of an experiment result.", "type": "string"}, "filename": {"description": "The name of the file containing the result.", "type": "string"}, "genome_assembly_id": {"description": "Reference genome assembly ID.", "type": "string"}, "file_format": {"description": "(Controlled Vocabulary) File format.", "type": "string"}, "data_output_type": {"description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", "type": "string"}, "usage": {"description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", "type": "string"}, "creation_date": {"description": "The date when the experiment result file was created.", "type": "string"}, "created_by": {"description": "Name/Username/Code of the person who prepared the sequencing data.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/experimentresults/{id}": {"get": {"operationId": "api_experimentresults_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_experimentresults_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"identifier": {"description": "An arbitrary identifier for an experiment result.", "type": "string"}, "description": {"description": "Description of an experiment result.", "type": "string"}, "filename": {"description": "The name of the file containing the result.", "type": "string"}, "genome_assembly_id": {"description": "Reference genome assembly ID.", "type": "string"}, "file_format": {"description": "(Controlled Vocabulary) File format.", "type": "string"}, "data_output_type": {"description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", "type": "string"}, "usage": {"description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", "type": "string"}, "creation_date": {"description": "The date when the experiment result file was created.", "type": "string"}, "created_by": {"description": "Name/Username/Code of the person who prepared the sequencing data.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_experimentresults_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"identifier": {"description": "An arbitrary identifier for an experiment result.", "type": "string"}, "description": {"description": "Description of an experiment result.", "type": "string"}, "filename": {"description": "The name of the file containing the result.", "type": "string"}, "genome_assembly_id": {"description": "Reference genome assembly ID.", "type": "string"}, "file_format": {"description": "(Controlled Vocabulary) File format.", "type": "string"}, "data_output_type": {"description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", "type": "string"}, "usage": {"description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", "type": "string"}, "creation_date": {"description": "The date when the experiment result file was created.", "type": "string"}, "created_by": {"description": "Name/Username/Code of the person who prepared the sequencing data.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_experimentresults_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this experiment result.", "type": "integer"}, {"name": "identifier", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "filename", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "file_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data_output_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "usage", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/experiments": {"get": {"operationId": "api_experiments_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_experiments_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the experiment.", "type": "string"}, "instrument": {"description": "", "type": "object"}, "study_type": {"description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", "type": "string"}, "experiment_type": {"description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", "type": "string"}, "experiment_ontology": {"description": "Links to experiment ontology information (e.g. via the OBI ontology.).", "type": "object"}, "molecule": {"description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", "type": "string"}, "molecule_ontology": {"description": "Links to molecule ontology information (e.g. via the SO ontology.).", "type": "object"}, "library_strategy": {"description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", "type": "string"}, "library_source": {"description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", "type": "string"}, "library_selection": {"description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", "type": "string"}, "library_layout": {"description": "The library layout. E.g. Single, Paired.", "type": "string"}, "extraction_protocol": {"description": "The protocol used to isolate the extract material.", "type": "string"}, "reference_registry_id": {"description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", "type": "string"}, "qc_flags": {"description": "", "type": "array", "items": {"type": "string"}}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "Biosample on which this experiment was done.", "type": "string"}, "table": {"description": "", "type": "string"}}, "required": ["id", "instrument", "experiment_type", "biosample"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/experiments/{id}": {"get": {"operationId": "api_experiments_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_experiments_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the experiment.", "type": "string"}, "instrument": {"description": "", "type": "object"}, "study_type": {"description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", "type": "string"}, "experiment_type": {"description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", "type": "string"}, "experiment_ontology": {"description": "Links to experiment ontology information (e.g. via the OBI ontology.).", "type": "object"}, "molecule": {"description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", "type": "string"}, "molecule_ontology": {"description": "Links to molecule ontology information (e.g. via the SO ontology.).", "type": "object"}, "library_strategy": {"description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", "type": "string"}, "library_source": {"description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", "type": "string"}, "library_selection": {"description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", "type": "string"}, "library_layout": {"description": "The library layout. E.g. Single, Paired.", "type": "string"}, "extraction_protocol": {"description": "The protocol used to isolate the extract material.", "type": "string"}, "reference_registry_id": {"description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", "type": "string"}, "qc_flags": {"description": "", "type": "array", "items": {"type": "string"}}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "Biosample on which this experiment was done.", "type": "string"}, "table": {"description": "", "type": "string"}}, "required": ["id", "instrument", "experiment_type", "biosample"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_experiments_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the experiment.", "type": "string"}, "instrument": {"description": "", "type": "object"}, "study_type": {"description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", "type": "string"}, "experiment_type": {"description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", "type": "string"}, "experiment_ontology": {"description": "Links to experiment ontology information (e.g. via the OBI ontology.).", "type": "object"}, "molecule": {"description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", "type": "string"}, "molecule_ontology": {"description": "Links to molecule ontology information (e.g. via the SO ontology.).", "type": "object"}, "library_strategy": {"description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", "type": "string"}, "library_source": {"description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", "type": "string"}, "library_selection": {"description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", "type": "string"}, "library_layout": {"description": "The library layout. E.g. Single, Paired.", "type": "string"}, "extraction_protocol": {"description": "The protocol used to isolate the extract material.", "type": "string"}, "reference_registry_id": {"description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", "type": "string"}, "qc_flags": {"description": "", "type": "array", "items": {"type": "string"}}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "Biosample on which this experiment was done.", "type": "string"}, "table": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_experiments_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the experiment.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "reference_registry_id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "study_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "experiment_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "molecule", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_strategy", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_source", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_selection", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "library_layout", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extraction_protocol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genes": {"get": {"operationId": "api_genes_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genes_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, "alternate_ids": {"description": "", "type": "array", "items": {"type": "string"}}, "symbol": {"description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "symbol"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genes/{id}": {"get": {"operationId": "api_genes_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genes_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, "alternate_ids": {"description": "", "type": "array", "items": {"type": "string"}}, "symbol": {"description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "symbol"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genes_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, "alternate_ids": {"description": "", "type": "array", "items": {"type": "string"}}, "symbol": {"description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genes_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "symbol", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/geneticspecimens": {"get": {"operationId": "api_geneticspecimens_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_geneticspecimens_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, "specimen_type": {"description": "The kind of material that forms the specimen.", "type": "object"}, "collection_body": {"description": "The anatomical collection site.", "type": "object"}, "laterality": {"description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "specimen_type"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/geneticspecimens/{id}": {"get": {"operationId": "api_geneticspecimens_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_geneticspecimens_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, "specimen_type": {"description": "The kind of material that forms the specimen.", "type": "object"}, "collection_body": {"description": "The anatomical collection site.", "type": "object"}, "laterality": {"description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "specimen_type"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_geneticspecimens_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, "specimen_type": {"description": "The kind of material that forms the specimen.", "type": "object"}, "collection_body": {"description": "The anatomical collection site.", "type": "object"}, "laterality": {"description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_geneticspecimens_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetic specimen.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genomicinterpretations": {"get": {"operationId": "api_genomicinterpretations_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genomicinterpretations_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"status": {"description": "How the call of this GenomicInterpretation was interpreted.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "gene": {"description": "The gene contributing to the diagnosis.", "type": "string"}, "variant": {"description": "The variant contributing to the diagnosis.", "type": "integer"}}, "required": ["status"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genomicinterpretations/{id}": {"get": {"operationId": "api_genomicinterpretations_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genomicinterpretations_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"status": {"description": "How the call of this GenomicInterpretation was interpreted.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "gene": {"description": "The gene contributing to the diagnosis.", "type": "string"}, "variant": {"description": "The variant contributing to the diagnosis.", "type": "integer"}}, "required": ["status"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genomicinterpretations_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"status": {"description": "How the call of this GenomicInterpretation was interpreted.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "gene": {"description": "The gene contributing to the diagnosis.", "type": "string"}, "variant": {"description": "The variant contributing to the diagnosis.", "type": "integer"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genomicinterpretations_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this genomic interpretation.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "gene", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variant", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genomicregionsstudied": {"get": {"operationId": "api_genomicregionsstudied_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genomicregionsstudied_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, "dna_ranges_examined": {"description": "The range(s) of the DNA sequence examined.", "type": "object"}, "dna_region_description": {"description": "", "type": "array", "items": {"type": "string"}}, "gene_mutation": {"description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", "type": "object"}, "gene_studied": {"description": "The ID for the gene studied.", "type": "object"}, "genomic_reference_sequence_id": {"description": "Range(s) of DNA sequence examined.", "type": "object"}, "genomic_region_coordinate_system": {"description": "The method of counting along the genome.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genomicregionsstudied/{id}": {"get": {"operationId": "api_genomicregionsstudied_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genomicregionsstudied_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, "dna_ranges_examined": {"description": "The range(s) of the DNA sequence examined.", "type": "object"}, "dna_region_description": {"description": "", "type": "array", "items": {"type": "string"}}, "gene_mutation": {"description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", "type": "object"}, "gene_studied": {"description": "The ID for the gene studied.", "type": "object"}, "genomic_reference_sequence_id": {"description": "Range(s) of DNA sequence examined.", "type": "object"}, "genomic_region_coordinate_system": {"description": "The method of counting along the genome.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genomicregionsstudied_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, "dna_ranges_examined": {"description": "The range(s) of the DNA sequence examined.", "type": "object"}, "dna_region_description": {"description": "", "type": "array", "items": {"type": "string"}}, "gene_mutation": {"description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", "type": "object"}, "gene_studied": {"description": "The ID for the gene studied.", "type": "object"}, "genomic_reference_sequence_id": {"description": "Range(s) of DNA sequence examined.", "type": "object"}, "genomic_region_coordinate_system": {"description": "The method of counting along the genome.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genomicregionsstudied_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genomic region studied.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/genomicsreports": {"get": {"operationId": "api_genomicsreports_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_genomicsreports_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetics report.", "type": "string"}, "genetic_variant": {"description": "", "type": "object"}, "genomic_region_studied": {"description": "", "type": "object"}, "code": {"description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", "type": "object"}, "performing_organization_name": {"description": "The name of the organization producing the genomics report.", "type": "string"}, "issued": {"description": "The date/time this report was issued.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "genetic_variant", "genomic_region_studied", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/genomicsreports/{id}": {"get": {"operationId": "api_genomicsreports_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_genomicsreports_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetics report.", "type": "string"}, "genetic_variant": {"description": "", "type": "object"}, "genomic_region_studied": {"description": "", "type": "object"}, "code": {"description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", "type": "object"}, "performing_organization_name": {"description": "The name of the organization producing the genomics report.", "type": "string"}, "issued": {"description": "The date/time this report was issued.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "genetic_variant", "genomic_region_studied", "code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_genomicsreports_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the genetics report.", "type": "string"}, "genetic_variant": {"description": "", "type": "object"}, "genomic_region_studied": {"description": "", "type": "object"}, "code": {"description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", "type": "object"}, "performing_organization_name": {"description": "The name of the organization producing the genomics report.", "type": "string"}, "issued": {"description": "The date/time this report was issued.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_genomicsreports_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the genetics report.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/htsfiles": {"get": {"operationId": "api_htsfiles_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_htsfiles_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"uri": {"description": "A valid URI to the file", "type": "string"}, "description": {"description": "Human-readable text describing the file.", "type": "string"}, "hts_format": {"description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", "type": "string"}, "genome_assembly": {"description": "Genome assembly ID for the file, e.g. GRCh38.", "type": "string"}, "individual_to_sample_identifiers": {"description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["uri", "hts_format", "genome_assembly"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/htsfiles/{uri}": {"get": {"operationId": "api_htsfiles_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_htsfiles_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"uri": {"description": "A valid URI to the file", "type": "string"}, "description": {"description": "Human-readable text describing the file.", "type": "string"}, "hts_format": {"description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", "type": "string"}, "genome_assembly": {"description": "Genome assembly ID for the file, e.g. GRCh38.", "type": "string"}, "individual_to_sample_identifiers": {"description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["uri", "hts_format", "genome_assembly"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_htsfiles_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"uri": {"description": "A valid URI to the file", "type": "string"}, "description": {"description": "Human-readable text describing the file.", "type": "string"}, "hts_format": {"description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", "type": "string"}, "genome_assembly": {"description": "Genome assembly ID for the file, e.g. GRCh38.", "type": "string"}, "individual_to_sample_identifiers": {"description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_htsfiles_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "uri", "required": true, "in": "path", "description": "A valid URI to the file", "type": "string"}, {"name": "uri", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_format", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genome_assembly", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/individuals": {"get": {"operationId": "api_individuals_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_individuals_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the individual.", "type": "string"}, "alternate_ids": {"description": "A list of alternative identifiers for the individual.", "type": "array", "items": {"type": "string"}}, "date_of_birth": {"description": "A timestamp either exact or imprecise.", "type": "string"}, "age": {"description": "The age or age range of the individual.", "type": "object"}, "age_numeric": {"description": "The age of the individual as number.", "type": "number"}, "age_unit": {"description": "The unit for measuring age.", "type": "string"}, "sex": {"description": "Observed apparent sex of the individual.", "type": "string"}, "karyotypic_sex": {"description": "The karyotypic sex of the individual.", "type": "string"}, "taxonomy": {"description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", "type": "object"}, "active": {"description": "Whether this patient's record is in active use.", "type": "boolean"}, "deceased": {"description": "Indicates if the individual is deceased or not.", "type": "boolean"}, "comorbid_condition": {"description": "One or more conditions that occur with primary condition.", "type": "object"}, "ecog_performance_status": {"description": "Value representing the Eastern Cooperative Oncology Group performance status.", "type": "object"}, "karnofsky": {"description": "Value representing the Karnofsky Performance status.", "type": "object"}, "race": {"description": "A code for the person's race.", "type": "string"}, "ethnicity": {"description": "A code for the person's ethnicity.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/individuals/{id}": {"get": {"operationId": "api_individuals_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_individuals_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the individual.", "type": "string"}, "alternate_ids": {"description": "A list of alternative identifiers for the individual.", "type": "array", "items": {"type": "string"}}, "date_of_birth": {"description": "A timestamp either exact or imprecise.", "type": "string"}, "age": {"description": "The age or age range of the individual.", "type": "object"}, "age_numeric": {"description": "The age of the individual as number.", "type": "number"}, "age_unit": {"description": "The unit for measuring age.", "type": "string"}, "sex": {"description": "Observed apparent sex of the individual.", "type": "string"}, "karyotypic_sex": {"description": "The karyotypic sex of the individual.", "type": "string"}, "taxonomy": {"description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", "type": "object"}, "active": {"description": "Whether this patient's record is in active use.", "type": "boolean"}, "deceased": {"description": "Indicates if the individual is deceased or not.", "type": "boolean"}, "comorbid_condition": {"description": "One or more conditions that occur with primary condition.", "type": "object"}, "ecog_performance_status": {"description": "Value representing the Eastern Cooperative Oncology Group performance status.", "type": "object"}, "karnofsky": {"description": "Value representing the Karnofsky Performance status.", "type": "object"}, "race": {"description": "A code for the person's race.", "type": "string"}, "ethnicity": {"description": "A code for the person's ethnicity.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}}, "required": ["id"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_individuals_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the individual.", "type": "string"}, "alternate_ids": {"description": "A list of alternative identifiers for the individual.", "type": "array", "items": {"type": "string"}}, "date_of_birth": {"description": "A timestamp either exact or imprecise.", "type": "string"}, "age": {"description": "The age or age range of the individual.", "type": "object"}, "age_numeric": {"description": "The age of the individual as number.", "type": "number"}, "age_unit": {"description": "The unit for measuring age.", "type": "string"}, "sex": {"description": "Observed apparent sex of the individual.", "type": "string"}, "karyotypic_sex": {"description": "The karyotypic sex of the individual.", "type": "string"}, "taxonomy": {"description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", "type": "object"}, "active": {"description": "Whether this patient's record is in active use.", "type": "boolean"}, "deceased": {"description": "Indicates if the individual is deceased or not.", "type": "boolean"}, "comorbid_condition": {"description": "One or more conditions that occur with primary condition.", "type": "object"}, "ecog_performance_status": {"description": "Value representing the Eastern Cooperative Oncology Group performance status.", "type": "object"}, "karnofsky": {"description": "Value representing the Karnofsky Performance status.", "type": "object"}, "race": {"description": "A code for the person's race.", "type": "string"}, "ethnicity": {"description": "A code for the person's ethnicity.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_individuals_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the individual.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "alternate_ids", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "active", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "deceased", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets__biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopackets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "karyotypic_sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ethnicity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "race", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "date_of_birth", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "search", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "ordering", "required": false, "in": "query", "description": "Which field to use when ordering the results.", "type": "string"}], "tags": ["api"]}}, "/api/interpretations": {"get": {"operationId": "api_interpretations_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_interpretations_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the interpretation.", "type": "string"}, "resolution_status": {"description": "The current status of work on the case.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "phenopacket": {"description": "The subject of this interpretation.", "type": "string"}, "meta_data": {"description": "Metadata about this interpretation.", "type": "integer"}, "diagnosis": {"description": "One or more diagnoses, if made.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "phenopacket", "meta_data", "diagnosis"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/interpretations/{id}": {"get": {"operationId": "api_interpretations_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_interpretations_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the interpretation.", "type": "string"}, "resolution_status": {"description": "The current status of work on the case.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "phenopacket": {"description": "The subject of this interpretation.", "type": "string"}, "meta_data": {"description": "Metadata about this interpretation.", "type": "integer"}, "diagnosis": {"description": "One or more diagnoses, if made.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "phenopacket", "meta_data", "diagnosis"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_interpretations_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the interpretation.", "type": "string"}, "resolution_status": {"description": "The current status of work on the case.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema", "type": "object"}, "phenopacket": {"description": "The subject of this interpretation.", "type": "string"}, "meta_data": {"description": "Metadata about this interpretation.", "type": "integer"}, "diagnosis": {"description": "One or more diagnoses, if made.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_interpretations_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the interpretation.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "resolution_status", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/labsvital": {"get": {"operationId": "api_labsvital_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_labsvital_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, "tumor_marker_code": {"description": "A code identifying the type of tumor marker test.", "type": "object"}, "tumor_marker_data_value": {"description": "The result of a tumor marker test.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "The individual who is the subject of the tests.", "type": "string"}}, "required": ["id", "tumor_marker_code", "individual"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/labsvital/{id}": {"get": {"operationId": "api_labsvital_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_labsvital_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, "tumor_marker_code": {"description": "A code identifying the type of tumor marker test.", "type": "object"}, "tumor_marker_data_value": {"description": "The result of a tumor marker test.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "The individual who is the subject of the tests.", "type": "string"}}, "required": ["id", "tumor_marker_code", "individual"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_labsvital_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, "tumor_marker_code": {"description": "A code identifying the type of tumor marker test.", "type": "object"}, "tumor_marker_data_value": {"description": "The result of a tumor marker test.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "individual": {"description": "The individual who is the subject of the tests.", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_labsvital_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the labs/vital tests.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/mcode_overview": {"get": {"operationId": "api_mcode_overview_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Overview of all mCode data in the database", "summary": "Overview of all mCode data in the database", "tags": ["api"]}}, "/api/mcode_schema": {"get": {"operationId": "api_mcode_schema_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Mcodepacket schema", "summary": "Mcodepacket schema", "tags": ["api"]}}, "/api/mcodepackets": {"get": {"operationId": "api_mcodepackets_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_mcodepackets_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, "date_of_death": {"description": "An indication that the patient is no longer living, given by a date of death or boolean.", "type": "string"}, "cancer_disease_status": {"description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "An individual who is a subject of mcodepacket.", "type": "string"}, "genomics_report": {"description": "A genomics report associated with an Individual.", "type": "string"}, "table": {"description": "", "type": "string"}, "cancer_condition": {"description": "An Individual's cancer condition.", "type": "array", "items": {"type": "string"}}, "cancer_related_procedures": {"description": "A radiological or surgical procedures addressing a cancer condition.", "type": "array", "items": {"type": "string"}}, "medication_statement": {"description": "Medication treatment addressed to an Individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/mcodepackets/{id}": {"get": {"operationId": "api_mcodepackets_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_mcodepackets_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, "date_of_death": {"description": "An indication that the patient is no longer living, given by a date of death or boolean.", "type": "string"}, "cancer_disease_status": {"description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "An individual who is a subject of mcodepacket.", "type": "string"}, "genomics_report": {"description": "A genomics report associated with an Individual.", "type": "string"}, "table": {"description": "", "type": "string"}, "cancer_condition": {"description": "An Individual's cancer condition.", "type": "array", "items": {"type": "string"}}, "cancer_related_procedures": {"description": "A radiological or surgical procedures addressing a cancer condition.", "type": "array", "items": {"type": "string"}}, "medication_statement": {"description": "Medication treatment addressed to an Individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_mcodepackets_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, "date_of_death": {"description": "An indication that the patient is no longer living, given by a date of death or boolean.", "type": "string"}, "cancer_disease_status": {"description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "An individual who is a subject of mcodepacket.", "type": "string"}, "genomics_report": {"description": "A genomics report associated with an Individual.", "type": "string"}, "table": {"description": "", "type": "string"}, "cancer_condition": {"description": "An Individual's cancer condition.", "type": "array", "items": {"type": "string"}}, "cancer_related_procedures": {"description": "A radiological or surgical procedures addressing a cancer condition.", "type": "array", "items": {"type": "string"}}, "medication_statement": {"description": "Medication treatment addressed to an Individual.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_mcodepackets_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the mcodepacket.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/medicationstatements": {"get": {"operationId": "api_medicationstatements_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_medicationstatements_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the medication statement.", "type": "string"}, "medication_code": {"description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", "type": "object"}, "termination_reason": {"description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", "type": "object"}, "start_date": {"description": "The start date/time of the medication.", "type": "string"}, "end_date": {"description": "The end date/time of the medication.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "medication_code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/medicationstatements/{id}": {"get": {"operationId": "api_medicationstatements_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_medicationstatements_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the medication statement.", "type": "string"}, "medication_code": {"description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", "type": "object"}, "termination_reason": {"description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", "type": "object"}, "start_date": {"description": "The start date/time of the medication.", "type": "string"}, "end_date": {"description": "The end date/time of the medication.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "medication_code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_medicationstatements_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the medication statement.", "type": "string"}, "medication_code": {"description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", "type": "object"}, "termination_reason": {"description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", "type": "object"}, "treatment_intent": {"description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", "type": "object"}, "start_date": {"description": "The start date/time of the medication.", "type": "string"}, "end_date": {"description": "The end date/time of the medication.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_medicationstatements_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the medication statement.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/metadata": {"get": {"operationId": "api_metadata_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_metadata_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"created": {"description": "Timestamp specifying when when this object was created.", "type": "string"}, "created_by": {"description": "Name of the person who created the phenopacket.", "type": "string"}, "submitted_by": {"description": "Name of the person who submitted the phenopacket.", "type": "string"}, "updates": {"description": "A list of updates to the phenopacket.", "type": "object"}, "phenopacket_schema_version": {"description": "Schema version of the current phenopacket.", "type": "string"}, "external_references": {"description": "A list of external (non-resource) references.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["created_by"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/metadata/{id}": {"get": {"operationId": "api_metadata_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_metadata_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"created": {"description": "Timestamp specifying when when this object was created.", "type": "string"}, "created_by": {"description": "Name of the person who created the phenopacket.", "type": "string"}, "submitted_by": {"description": "Name of the person who submitted the phenopacket.", "type": "string"}, "updates": {"description": "A list of updates to the phenopacket.", "type": "object"}, "phenopacket_schema_version": {"description": "Schema version of the current phenopacket.", "type": "string"}, "external_references": {"description": "A list of external (non-resource) references.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["created_by"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_metadata_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"created": {"description": "Timestamp specifying when when this object was created.", "type": "string"}, "created_by": {"description": "Name of the person who created the phenopacket.", "type": "string"}, "submitted_by": {"description": "Name of the person who submitted the phenopacket.", "type": "string"}, "updates": {"description": "A list of updates to the phenopacket.", "type": "object"}, "phenopacket_schema_version": {"description": "Schema version of the current phenopacket.", "type": "string"}, "external_references": {"description": "A list of external (non-resource) references.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_metadata_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this meta data.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "created_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "submitted_by", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket_schema_version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/overview": {"get": {"operationId": "api_overview_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Overview of all Phenopackets in the database", "summary": "Overview of all Phenopackets in the database", "tags": ["api"]}}, "/api/phenopackets": {"get": {"operationId": "api_phenopackets_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_phenopackets_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "A subject of a phenopacket, representing either a human (typically) or another organism.", "type": "string"}, "meta_data": {"description": "A structured definition of the resources and ontologies used within a phenopacket.", "type": "integer"}, "table": {"description": "", "type": "string"}, "biosamples": {"description": "Samples (e.g. biopsies) taken from the individual, if any.", "type": "array", "items": {"type": "string"}}, "genes": {"description": "Genes deemed to be relevant to the case; application-specific.", "type": "array", "items": {"type": "string"}}, "variants": {"description": "A list of variants identified in the proband.", "type": "array", "items": {"type": "string"}}, "diseases": {"description": "A list of diseases diagnosed in the proband.", "type": "array", "items": {"type": "string"}}, "hts_files": {"description": "A list of HTS files derived from the individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject", "meta_data"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/phenopackets/{id}": {"get": {"operationId": "api_phenopackets_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_phenopackets_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "A subject of a phenopacket, representing either a human (typically) or another organism.", "type": "string"}, "meta_data": {"description": "A structured definition of the resources and ontologies used within a phenopacket.", "type": "integer"}, "table": {"description": "", "type": "string"}, "biosamples": {"description": "Samples (e.g. biopsies) taken from the individual, if any.", "type": "array", "items": {"type": "string"}}, "genes": {"description": "Genes deemed to be relevant to the case; application-specific.", "type": "array", "items": {"type": "string"}}, "variants": {"description": "A list of variants identified in the proband.", "type": "array", "items": {"type": "string"}}, "diseases": {"description": "A list of diseases diagnosed in the proband.", "type": "array", "items": {"type": "string"}}, "hts_files": {"description": "A list of HTS files derived from the individual.", "type": "array", "items": {"type": "string"}}}, "required": ["id", "subject", "meta_data"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_phenopackets_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "subject": {"description": "A subject of a phenopacket, representing either a human (typically) or another organism.", "type": "string"}, "meta_data": {"description": "A structured definition of the resources and ontologies used within a phenopacket.", "type": "integer"}, "table": {"description": "", "type": "string"}, "biosamples": {"description": "Samples (e.g. biopsies) taken from the individual, if any.", "type": "array", "items": {"type": "string"}}, "genes": {"description": "Genes deemed to be relevant to the case; application-specific.", "type": "array", "items": {"type": "string"}}, "variants": {"description": "A list of variants identified in the proband.", "type": "array", "items": {"type": "string"}}, "diseases": {"description": "A list of diseases diagnosed in the proband.", "type": "array", "items": {"type": "string"}}, "hts_files": {"description": "A list of HTS files derived from the individual.", "type": "array", "items": {"type": "string"}}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_phenopackets_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "subject", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosamples", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "genes", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "variants", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "hts_files", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "disease", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "found_phenotypic_feature", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/phenotypicfeatures": {"get": {"operationId": "api_phenotypicfeatures_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_phenotypicfeatures_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"type": {"description": "", "type": "object"}, "description": {"description": "Human-readable text describing the phenotypic feature; NOT for structured text.", "type": "string"}, "negated": {"description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", "type": "boolean"}, "severity": {"description": "An ontology term that describes the severity of the condition.", "type": "object"}, "modifier": {"description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", "type": "object"}, "onset": {"description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", "type": "object"}, "evidence": {"description": "One or more pieces of evidence that specify how the phenotype was determined.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "", "type": "string"}, "phenopacket": {"description": "", "type": "string"}}, "required": ["type"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/phenotypicfeatures/{id}": {"get": {"operationId": "api_phenotypicfeatures_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_phenotypicfeatures_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"type": {"description": "", "type": "object"}, "description": {"description": "Human-readable text describing the phenotypic feature; NOT for structured text.", "type": "string"}, "negated": {"description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", "type": "boolean"}, "severity": {"description": "An ontology term that describes the severity of the condition.", "type": "object"}, "modifier": {"description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", "type": "object"}, "onset": {"description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", "type": "object"}, "evidence": {"description": "One or more pieces of evidence that specify how the phenotype was determined.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "", "type": "string"}, "phenopacket": {"description": "", "type": "string"}}, "required": ["type"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_phenotypicfeatures_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"type": {"description": "", "type": "object"}, "description": {"description": "Human-readable text describing the phenotypic feature; NOT for structured text.", "type": "string"}, "negated": {"description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", "type": "boolean"}, "severity": {"description": "An ontology term that describes the severity of the condition.", "type": "object"}, "modifier": {"description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", "type": "object"}, "onset": {"description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", "type": "object"}, "evidence": {"description": "One or more pieces of evidence that specify how the phenotype was determined.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "biosample": {"description": "", "type": "string"}, "phenopacket": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_phenotypicfeatures_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this phenotypic feature.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "negated", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "phenopacket", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "description", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "severity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "onset", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "evidence", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties_datatype", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "individual", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/procedures": {"get": {"operationId": "api_procedures_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_procedures_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"code": {"description": "An ontology term that represents a clinical procedure performed on a subject.", "type": "object"}, "body_site": {"description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["code"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/procedures/{id}": {"get": {"operationId": "api_procedures_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_procedures_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"code": {"description": "An ontology term that represents a clinical procedure performed on a subject.", "type": "object"}, "body_site": {"description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["code"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_procedures_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"code": {"description": "An ontology term that represents a clinical procedure performed on a subject.", "type": "object"}, "body_site": {"description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_procedures_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this procedure.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "code", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "body_site", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "biosample", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/projects": {"get": {"operationId": "api_projects_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_projects_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}}, "required": ["title"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/projects/{identifier}": {"get": {"operationId": "api_projects_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_projects_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}}, "required": ["title"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_projects_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"title": {"description": "", "type": "string"}, "description": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_projects_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "identifier", "required": true, "in": "path", "description": "A UUID string identifying this project.", "type": "string"}], "tags": ["api"]}}, "/api/public": {"get": {"operationId": "api_public_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "sex", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "age_range_min", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "age_range_max", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}], "description": "View to return only count of all individuals after filtering.", "summary": "View to return only count of all individuals after filtering.", "tags": ["api"]}}, "/api/public_overview": {"get": {"operationId": "api_public_overview_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Overview of all public data in the database", "summary": "Overview of all public data in the database", "tags": ["api"]}}, "/api/public_search_fields": {"get": {"operationId": "api_public_search_fields_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Return public search fields", "summary": "Return public search fields", "tags": ["api"]}}, "/api/resources": {"get": {"operationId": "api_resources_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_resources_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, "name": {"description": "The full name of the resource or ontology referred to by the id element.", "type": "string"}, "namespace_prefix": {"description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", "type": "string"}, "url": {"description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", "type": "string"}, "version": {"description": "The version of the resource or ontology used to make the annotation.", "type": "string"}, "iri_prefix": {"description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "name", "namespace_prefix", "url", "version", "iri_prefix"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/resources/{id}": {"get": {"operationId": "api_resources_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_resources_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, "name": {"description": "The full name of the resource or ontology referred to by the id element.", "type": "string"}, "namespace_prefix": {"description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", "type": "string"}, "url": {"description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", "type": "string"}, "version": {"description": "The version of the resource or ontology used to make the annotation.", "type": "string"}, "iri_prefix": {"description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["id", "name", "namespace_prefix", "url", "version", "iri_prefix"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_resources_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, "name": {"description": "The full name of the resource or ontology referred to by the id element.", "type": "string"}, "namespace_prefix": {"description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", "type": "string"}, "url": {"description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", "type": "string"}, "version": {"description": "The version of the resource or ontology used to make the annotation.", "type": "string"}, "iri_prefix": {"description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", "type": "string"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_resources_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", "type": "string"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "name", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "namespace_prefix", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "url", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "version", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "iri_prefix", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/table_ownership": {"get": {"operationId": "api_table_ownership_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_table_ownership_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"table_id": {"description": "", "type": "string"}, "service_id": {"description": "", "type": "string"}, "service_artifact": {"description": "", "type": "string"}, "dataset": {"description": "", "type": "string"}}, "required": ["table_id", "service_id", "dataset"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/table_ownership/{table_id}": {"get": {"operationId": "api_table_ownership_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_table_ownership_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"table_id": {"description": "", "type": "string"}, "service_id": {"description": "", "type": "string"}, "service_artifact": {"description": "", "type": "string"}, "dataset": {"description": "", "type": "string"}}, "required": ["table_id", "service_id", "dataset"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_table_ownership_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"table_id": {"description": "", "type": "string"}, "service_id": {"description": "", "type": "string"}, "service_artifact": {"description": "", "type": "string"}, "dataset": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_table_ownership_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "A unique value identifying this table ownership.", "type": "string"}], "tags": ["api"]}}, "/api/tables": {"get": {"operationId": "api_tables_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}], "tags": ["api"]}, "post": {"operationId": "api_tables_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"ownership_record": {"description": "", "type": "string"}, "name": {"description": "", "type": "string"}, "data_type": {"description": "", "type": "string"}}, "required": ["ownership_record", "name", "data_type"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/tables/{ownership_record}": {"get": {"operationId": "api_tables_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_tables_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"ownership_record": {"description": "", "type": "string"}, "name": {"description": "", "type": "string"}, "data_type": {"description": "", "type": "string"}}, "required": ["ownership_record", "name", "data_type"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_tables_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"ownership_record": {"description": "", "type": "string"}, "name": {"description": "", "type": "string"}, "data_type": {"description": "", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_tables_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "ownership_record", "required": true, "in": "path", "description": "A unique value identifying this table.", "type": "string"}], "tags": ["api"]}}, "/api/tnmstaging": {"get": {"operationId": "api_tnmstaging_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_tnmstaging_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the TNM staging.", "type": "string"}, "tnm_type": {"description": "TNM type: clinical or pathological.", "type": "string"}, "stage_group": {"description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "primary_tumor_category": {"description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "regional_nodes_category": {"description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "distant_metastases_category": {"description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "cancer_condition": {"description": "Cancer condition.", "type": "string"}}, "required": ["id", "tnm_type", "stage_group", "primary_tumor_category", "regional_nodes_category", "distant_metastases_category", "cancer_condition"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/tnmstaging/{id}": {"get": {"operationId": "api_tnmstaging_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_tnmstaging_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the TNM staging.", "type": "string"}, "tnm_type": {"description": "TNM type: clinical or pathological.", "type": "string"}, "stage_group": {"description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "primary_tumor_category": {"description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "regional_nodes_category": {"description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "distant_metastases_category": {"description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "cancer_condition": {"description": "Cancer condition.", "type": "string"}}, "required": ["id", "tnm_type", "stage_group", "primary_tumor_category", "regional_nodes_category", "distant_metastases_category", "cancer_condition"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_tnmstaging_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"id": {"description": "An arbitrary identifier for the TNM staging.", "type": "string"}, "tnm_type": {"description": "TNM type: clinical or pathological.", "type": "string"}, "stage_group": {"description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "primary_tumor_category": {"description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "regional_nodes_category": {"description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "distant_metastases_category": {"description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}, "cancer_condition": {"description": "Cancer condition.", "type": "string"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_tnmstaging_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "An arbitrary identifier for the TNM staging.", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/api/variants": {"get": {"operationId": "api_variants_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "page", "required": false, "in": "query", "description": "A page number within the paginated result set.", "type": "integer"}, {"name": "page_size", "required": false, "in": "query", "description": "Number of results to return per page.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "post": {"operationId": "api_variants_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "data", "in": "body", "schema": {"type": "object", "properties": {"allele_type": {"description": "One of four allele types.", "type": "string"}, "allele": {"description": "The variant's corresponding allele", "type": "object"}, "zygosity": {"description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["allele_type", "allele"]}}], "consumes": ["application/json"], "tags": ["api"]}}, "/api/variants/{id}": {"get": {"operationId": "api_variants_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}, "put": {"operationId": "api_variants_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"allele_type": {"description": "One of four allele types.", "type": "string"}, "allele": {"description": "The variant's corresponding allele", "type": "object"}, "zygosity": {"description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}, "required": ["allele_type", "allele"]}}], "consumes": ["application/json"], "tags": ["api"]}, "patch": {"operationId": "api_variants_partial_update", "responses": {"200": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "data", "in": "body", "schema": {"type": "object", "properties": {"allele_type": {"description": "One of four allele types.", "type": "string"}, "allele": {"description": "The variant's corresponding allele", "type": "object"}, "zygosity": {"description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", "type": "object"}, "extra_properties": {"description": "Extra properties that are not supported by current schema.", "type": "object"}}}}], "consumes": ["application/json"], "tags": ["api"]}, "delete": {"operationId": "api_variants_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "id", "required": true, "in": "path", "description": "A unique integer value identifying this variant.", "type": "integer"}, {"name": "id", "required": false, "in": "query", "description": "", "type": "number"}, {"name": "allele_type", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "zygosity", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "extra_properties", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "datasets", "required": false, "in": "query", "description": "", "type": "string"}, {"name": "authorized_datasets", "required": false, "in": "query", "description": "", "type": "string"}], "tags": ["api"]}}, "/data-types": {"get": {"operationId": "data-types_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["data-types"]}}, "/data-types/{data_type}": {"get": {"operationId": "data-types_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "data_type", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["data-types"]}}, "/data-types/{data_type}/metadata_schema": {"get": {"operationId": "data-types_metadata_schema_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "data_type", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["data-types"]}}, "/data-types/{data_type}/schema": {"get": {"operationId": "data-types_schema_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "data_type", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["data-types"]}}, "/fhir-search": {"get": {"operationId": "fhir-search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["fhir-search"]}, "post": {"operationId": "fhir-search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["fhir-search"]}}, "/private/export": {"post": {"operationId": "private_export_create", "responses": {"201": {"description": ""}}, "parameters": [], "description": "Export data from Katsu\n\nExports the requested data object (e.g. a Dataset or a Project) in the given\nformat.\nNote that the generated files will be either written locally if a path is\nprovided, or downloaded as a tar gzipped attachment otherwise.", "summary": "Export data from Katsu", "tags": ["private"]}}, "/private/fhir-search": {"get": {"operationId": "private_fhir-search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["private"]}, "post": {"operationId": "private_fhir-search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["private"]}}, "/private/ingest": {"post": {"operationId": "private_ingest_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["private"]}}, "/private/search": {"get": {"operationId": "private_search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["private"]}, "post": {"operationId": "private_search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["private"]}}, "/private/tables/{table_id}/search": {"get": {"operationId": "private_tables_search_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["private"]}, "post": {"operationId": "private_tables_search_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["private"]}}, "/search": {"get": {"operationId": "search_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["search"]}, "post": {"operationId": "search_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["search"]}}, "/service-info": {"get": {"operationId": "service-info_list", "responses": {"200": {"description": ""}}, "parameters": [], "description": "Return service info", "summary": "Return service info", "tags": ["service-info"]}}, "/tables": {"get": {"operationId": "tables_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["tables"]}, "post": {"operationId": "tables_create", "responses": {"201": {"description": ""}}, "parameters": [], "tags": ["tables"]}}, "/tables/{table_id}": {"get": {"operationId": "tables_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}, "delete": {"operationId": "tables_delete", "responses": {"204": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}}, "/tables/{table_id}/search": {"get": {"operationId": "tables_search_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}, "post": {"operationId": "tables_search_create", "responses": {"201": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}}, "/tables/{table_id}/summary": {"get": {"operationId": "tables_summary_list", "responses": {"200": {"description": ""}}, "parameters": [{"name": "table_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["tables"]}}, "/workflows": {"get": {"operationId": "workflows_list", "responses": {"200": {"description": ""}}, "parameters": [], "tags": ["workflows"]}}, "/workflows/{workflow_id}": {"get": {"operationId": "workflows_read", "responses": {"200": {"description": ""}}, "parameters": [{"name": "workflow_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["workflows"]}}, "/workflows/{workflow_id}.wdl": {"get": {"operationId": "workflows_read_0", "responses": {"200": {"description": ""}}, "parameters": [{"name": "workflow_id", "required": true, "in": "path", "description": "", "type": "string"}], "tags": ["workflows"]}}}, "securityDefinitions": {"basic": {"type": "basic"}}} \ No newline at end of file +{ + "swagger": "2.0", + "info": { + "title": "Katsu Metadata Service API", + "description": "A metadata service for clinical/phenotypical and experiment metadata", + "version": "2.11.0" + }, + "host": "localhost:8000", + "schemes": [ + "http" + ], + "paths": { + "/": { + "get": { + "operationId": "_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "" + ] + } + }, + "/api/biosamples": { + "get": { + "operationId": "api_biosamples_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "procedure", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "is_control_sample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sampled_tissue", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "taxonomy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "histological_diagnosis", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_progression", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_grade", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_biosamples_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + "procedure": { + "description": "", + "type": "object" + }, + "description": { + "description": "Human-readable, unstructured text describing the biosample or providing additional information.", + "type": "string" + }, + "sampled_tissue": { + "description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", + "type": "object" + }, + "taxonomy": { + "description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", + "type": "object" + }, + "individual_age_at_collection": { + "description": "individual_age_at_collection", + "type": "object" + }, + "histological_diagnosis": { + "description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", + "type": "object" + }, + "tumor_progression": { + "description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", + "type": "object" + }, + "tumor_grade": { + "description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", + "type": "object" + }, + "diagnostic_markers": { + "description": "A list of ontology terms representing clinically-relevant bio-markers.", + "type": "object" + }, + "is_control_sample": { + "description": "Whether the sample is being used as a normal control.", + "type": "boolean" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "individual": { + "description": "Identifier for the individual this biosample was sampled from.", + "type": "string" + }, + "hts_files": { + "description": "A list of HTS files derived from the biosample.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "procedure", + "sampled_tissue" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/biosamples/{id}": { + "get": { + "operationId": "api_biosamples_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "procedure", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "is_control_sample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sampled_tissue", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "taxonomy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "histological_diagnosis", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_progression", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_grade", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_biosamples_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "procedure", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "is_control_sample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sampled_tissue", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "taxonomy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "histological_diagnosis", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_progression", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_grade", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + "procedure": { + "description": "", + "type": "object" + }, + "description": { + "description": "Human-readable, unstructured text describing the biosample or providing additional information.", + "type": "string" + }, + "sampled_tissue": { + "description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", + "type": "object" + }, + "taxonomy": { + "description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", + "type": "object" + }, + "individual_age_at_collection": { + "description": "individual_age_at_collection", + "type": "object" + }, + "histological_diagnosis": { + "description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", + "type": "object" + }, + "tumor_progression": { + "description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", + "type": "object" + }, + "tumor_grade": { + "description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", + "type": "object" + }, + "diagnostic_markers": { + "description": "A list of ontology terms representing clinically-relevant bio-markers.", + "type": "object" + }, + "is_control_sample": { + "description": "Whether the sample is being used as a normal control.", + "type": "boolean" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "individual": { + "description": "Identifier for the individual this biosample was sampled from.", + "type": "string" + }, + "hts_files": { + "description": "A list of HTS files derived from the biosample.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "procedure", + "sampled_tissue" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_biosamples_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "procedure", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "is_control_sample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sampled_tissue", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "taxonomy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "histological_diagnosis", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_progression", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_grade", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + "procedure": { + "description": "", + "type": "object" + }, + "description": { + "description": "Human-readable, unstructured text describing the biosample or providing additional information.", + "type": "string" + }, + "sampled_tissue": { + "description": "An ontology term describing the tissue from which the specimen was collected. The use of UBERON is recommended.", + "type": "object" + }, + "taxonomy": { + "description": "An ontology term specified when more than one organism may be studied. It is advised that codesfrom the NCBI Taxonomy resource are used, e.g. NCBITaxon:9606 for humans.", + "type": "object" + }, + "individual_age_at_collection": { + "description": "individual_age_at_collection", + "type": "object" + }, + "histological_diagnosis": { + "description": "An ontology term representing a refinement of the clinical diagnosis. Normal samples could be tagged with NCIT:C38757, representing a negative finding.", + "type": "object" + }, + "tumor_progression": { + "description": "An ontology term representing if the specimen is from a primary tumour, a metastasis, or a recurrence. There are multiple ways of representing this using ontology terms, and the terms chosen will have a specific meaning that is application specific.", + "type": "object" + }, + "tumor_grade": { + "description": "An ontology term representing the tumour grade. This should be a child term of NCIT:C28076 (Disease Grade Qualifier) or equivalent.", + "type": "object" + }, + "diagnostic_markers": { + "description": "A list of ontology terms representing clinically-relevant bio-markers.", + "type": "object" + }, + "is_control_sample": { + "description": "Whether the sample is being used as a normal control.", + "type": "boolean" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "individual": { + "description": "Identifier for the individual this biosample was sampled from.", + "type": "string" + }, + "hts_files": { + "description": "A list of HTS files derived from the biosample.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_biosamples_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique arbitrary, researcher-specified identifier for the biosample.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "procedure", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "is_control_sample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sampled_tissue", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "taxonomy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "histological_diagnosis", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_progression", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "tumor_grade", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/cancerconditions": { + "get": { + "operationId": "api_cancerconditions_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_cancerconditions_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + "condition_type": { + "description": "Cancer condition type: primary or secondary.", + "type": "string" + }, + "body_site": { + "description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", + "type": "object" + }, + "laterality": { + "description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "clinical_status": { + "description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", + "type": "object" + }, + "code": { + "description": "A code describing the type of primary or secondary malignant neoplastic disease.", + "type": "object" + }, + "date_of_diagnosis": { + "description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", + "type": "string" + }, + "histology_morphology_behavior": { + "description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", + "type": "object" + }, + "verification_status": { + "description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "condition_type", + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/cancerconditions/{id}": { + "get": { + "operationId": "api_cancerconditions_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_cancerconditions_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + "condition_type": { + "description": "Cancer condition type: primary or secondary.", + "type": "string" + }, + "body_site": { + "description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", + "type": "object" + }, + "laterality": { + "description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "clinical_status": { + "description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", + "type": "object" + }, + "code": { + "description": "A code describing the type of primary or secondary malignant neoplastic disease.", + "type": "object" + }, + "date_of_diagnosis": { + "description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", + "type": "string" + }, + "histology_morphology_behavior": { + "description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", + "type": "object" + }, + "verification_status": { + "description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "condition_type", + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_cancerconditions_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + "condition_type": { + "description": "Cancer condition type: primary or secondary.", + "type": "string" + }, + "body_site": { + "description": "Code for the body location, optionally pre-coordinating laterality or direction. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", + "type": "object" + }, + "laterality": { + "description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "clinical_status": { + "description": "A flag indicating whether the condition is active or inactive, recurring, in remission, or resolved (as of the last update of the Condition). Accepted code system: http://terminology.hl7.org/CodeSystem/condition-clinical", + "type": "object" + }, + "code": { + "description": "A code describing the type of primary or secondary malignant neoplastic disease.", + "type": "object" + }, + "date_of_diagnosis": { + "description": "The date the disease was first clinically recognized with sufficient certainty, regardless of whether it was fully characterized at that time.", + "type": "string" + }, + "histology_morphology_behavior": { + "description": "A description of the morphologic and behavioral characteristics of the cancer. Accepted ontologies: SNOMED CT, ICD-O-3 and others.", + "type": "object" + }, + "verification_status": { + "description": "A flag indicating whether the condition is unconfirmed, provisional, differential, confirmed, refuted, or entered-in-error.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_cancerconditions_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer condition.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/cancergeneticvariants": { + "get": { + "operationId": "api_cancergeneticvariants_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_cancergeneticvariants_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + "data_value": { + "description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", + "type": "object" + }, + "method": { + "description": "The method used to perform the genetic test.", + "type": "object" + }, + "amino_acid_change": { + "description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", + "type": "object" + }, + "amino_acid_change_type": { + "description": "The type of change related to the amino acid variant.", + "type": "object" + }, + "cytogenetic_location": { + "description": "The cytogenetic (chromosome) location.", + "type": "object" + }, + "cytogenetic_nomenclature": { + "description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", + "type": "object" + }, + "genomic_dna_change": { + "description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", + "type": "object" + }, + "genomic_source_class": { + "description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", + "type": "object" + }, + "variation_code": { + "description": "The variation ID assigned by ClinVar.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "gene_studied": { + "description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/cancergeneticvariants/{id}": { + "get": { + "operationId": "api_cancergeneticvariants_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_cancergeneticvariants_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + "data_value": { + "description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", + "type": "object" + }, + "method": { + "description": "The method used to perform the genetic test.", + "type": "object" + }, + "amino_acid_change": { + "description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", + "type": "object" + }, + "amino_acid_change_type": { + "description": "The type of change related to the amino acid variant.", + "type": "object" + }, + "cytogenetic_location": { + "description": "The cytogenetic (chromosome) location.", + "type": "object" + }, + "cytogenetic_nomenclature": { + "description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", + "type": "object" + }, + "genomic_dna_change": { + "description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", + "type": "object" + }, + "genomic_source_class": { + "description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", + "type": "object" + }, + "variation_code": { + "description": "The variation ID assigned by ClinVar.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "gene_studied": { + "description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_cancergeneticvariants_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + "data_value": { + "description": "The overall result of the genetic test; specifically, whether a variant is present, absent, no call, or indeterminant.", + "type": "object" + }, + "method": { + "description": "The method used to perform the genetic test.", + "type": "object" + }, + "amino_acid_change": { + "description": "The symbolic representation of an amino acid variant reported using HGVS nomenclature (pHGVS).", + "type": "object" + }, + "amino_acid_change_type": { + "description": "The type of change related to the amino acid variant.", + "type": "object" + }, + "cytogenetic_location": { + "description": "The cytogenetic (chromosome) location.", + "type": "object" + }, + "cytogenetic_nomenclature": { + "description": "The cytogenetic (chromosome) location, represented using the International System for Human Cytogenetic Nomenclature (ISCN).", + "type": "object" + }, + "genomic_dna_change": { + "description": "The symbolic representation of a genetic structural variant reported using HGVS nomenclature (gHGVS).", + "type": "object" + }, + "genomic_source_class": { + "description": "The genomic class of the specimen being analyzed, for example, germline for inherited genome, somatic for cancer genome, and prenatal for fetal genome.", + "type": "object" + }, + "variation_code": { + "description": "The variation ID assigned by ClinVar.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "gene_studied": { + "description": "A gene targeted for mutation analysis, identified in HUGO Gene Nomenclature Committee (HGNC) notation.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_cancergeneticvariants_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the cancer genetic variant.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/cancerrelatedprocedures": { + "get": { + "operationId": "api_cancerrelatedprocedures_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_cancerrelatedprocedures_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + "procedure_type": { + "description": "Type of cancer related procedure: radiation or surgical.", + "type": "string" + }, + "code": { + "description": "Code for the procedure performed.", + "type": "object" + }, + "body_site": { + "description": "The body location(s) where the procedure was performed.", + "type": "object" + }, + "laterality": { + "description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "treatment_intent": { + "description": "The purpose of a treatment.", + "type": "object" + }, + "reason_code": { + "description": "The explanation or justification for why the surgical procedure was performed.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "reason_reference": { + "description": "Reference to a primary or secondary cancer condition.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "procedure_type", + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/cancerrelatedprocedures/{id}": { + "get": { + "operationId": "api_cancerrelatedprocedures_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_cancerrelatedprocedures_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + "procedure_type": { + "description": "Type of cancer related procedure: radiation or surgical.", + "type": "string" + }, + "code": { + "description": "Code for the procedure performed.", + "type": "object" + }, + "body_site": { + "description": "The body location(s) where the procedure was performed.", + "type": "object" + }, + "laterality": { + "description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "treatment_intent": { + "description": "The purpose of a treatment.", + "type": "object" + }, + "reason_code": { + "description": "The explanation or justification for why the surgical procedure was performed.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "reason_reference": { + "description": "Reference to a primary or secondary cancer condition.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "procedure_type", + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_cancerrelatedprocedures_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + "procedure_type": { + "description": "Type of cancer related procedure: radiation or surgical.", + "type": "string" + }, + "code": { + "description": "Code for the procedure performed.", + "type": "object" + }, + "body_site": { + "description": "The body location(s) where the procedure was performed.", + "type": "object" + }, + "laterality": { + "description": "Body side of the body location, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "treatment_intent": { + "description": "The purpose of a treatment.", + "type": "object" + }, + "reason_code": { + "description": "The explanation or justification for why the surgical procedure was performed.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "reason_reference": { + "description": "Reference to a primary or secondary cancer condition.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_cancerrelatedprocedures_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the procedure.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/chord_phenopacket_schema": { + "get": { + "operationId": "api_chord_phenopacket_schema_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Chord phenopacket schema that can be shared with data providers.", + "summary": "Chord phenopacket schema that can be shared with data providers.", + "tags": [ + "api" + ] + } + }, + "/api/datasets": { + "get": { + "operationId": "api_datasets_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_datasets_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "title": { + "description": "", + "type": "string" + }, + "description": { + "description": "", + "type": "string" + }, + "contact_info": { + "description": "", + "type": "string" + }, + "data_use": { + "description": "", + "type": "object" + }, + "linked_field_sets": { + "description": "Data type fields which are linked together.", + "type": "object" + }, + "alternate_identifiers": { + "description": "Alternate identifiers for the dataset.", + "type": "object" + }, + "related_identifiers": { + "description": "Related identifiers for the dataset.", + "type": "object" + }, + "dates": { + "description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", + "type": "object" + }, + "stored_in": { + "description": "The data repository hosting the dataset.", + "type": "object" + }, + "spatial_coverage": { + "description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", + "type": "object" + }, + "types": { + "description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", + "type": "object" + }, + "availability": { + "description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", + "type": "string" + }, + "refinement": { + "description": "A qualifier to describe the level of data processing of the dataset and its distributions.", + "type": "string" + }, + "aggregation": { + "description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", + "type": "string" + }, + "privacy": { + "description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", + "type": "string" + }, + "distributions": { + "description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", + "type": "object" + }, + "dimensions": { + "description": "The different dimensions (granular components) making up a dataset.", + "type": "object" + }, + "primary_publications": { + "description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", + "type": "object" + }, + "citations": { + "description": "The publication(s) that cite this dataset.", + "type": "object" + }, + "citation_count": { + "description": "The number of publications that cite this dataset (enumerated in the citations property).", + "type": "integer" + }, + "produced_by": { + "description": "A study process which generated a given dataset, if any.", + "type": "object" + }, + "creators": { + "description": "The person(s) or organization(s) which contributed to the creation of the dataset.", + "type": "object" + }, + "licenses": { + "description": "The terms of use of the dataset.", + "type": "object" + }, + "acknowledges": { + "description": "The grant(s) which funded and supported the work reported by the dataset.", + "type": "object" + }, + "keywords": { + "description": "Tags associated with the dataset, which will help in its discovery.", + "type": "object" + }, + "version": { + "description": "A release point for the dataset when applicable.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that do not fit in the previous specified attributes.", + "type": "object" + }, + "project": { + "description": "", + "type": "string" + }, + "additional_resources": { + "description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", + "type": "array", + "items": { + "type": "string" + } + }, + "has_part": { + "description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "title", + "data_use", + "project" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/datasets/{identifier}": { + "get": { + "operationId": "api_datasets_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this dataset.", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_datasets_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this dataset.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "title": { + "description": "", + "type": "string" + }, + "description": { + "description": "", + "type": "string" + }, + "contact_info": { + "description": "", + "type": "string" + }, + "data_use": { + "description": "", + "type": "object" + }, + "linked_field_sets": { + "description": "Data type fields which are linked together.", + "type": "object" + }, + "alternate_identifiers": { + "description": "Alternate identifiers for the dataset.", + "type": "object" + }, + "related_identifiers": { + "description": "Related identifiers for the dataset.", + "type": "object" + }, + "dates": { + "description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", + "type": "object" + }, + "stored_in": { + "description": "The data repository hosting the dataset.", + "type": "object" + }, + "spatial_coverage": { + "description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", + "type": "object" + }, + "types": { + "description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", + "type": "object" + }, + "availability": { + "description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", + "type": "string" + }, + "refinement": { + "description": "A qualifier to describe the level of data processing of the dataset and its distributions.", + "type": "string" + }, + "aggregation": { + "description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", + "type": "string" + }, + "privacy": { + "description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", + "type": "string" + }, + "distributions": { + "description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", + "type": "object" + }, + "dimensions": { + "description": "The different dimensions (granular components) making up a dataset.", + "type": "object" + }, + "primary_publications": { + "description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", + "type": "object" + }, + "citations": { + "description": "The publication(s) that cite this dataset.", + "type": "object" + }, + "citation_count": { + "description": "The number of publications that cite this dataset (enumerated in the citations property).", + "type": "integer" + }, + "produced_by": { + "description": "A study process which generated a given dataset, if any.", + "type": "object" + }, + "creators": { + "description": "The person(s) or organization(s) which contributed to the creation of the dataset.", + "type": "object" + }, + "licenses": { + "description": "The terms of use of the dataset.", + "type": "object" + }, + "acknowledges": { + "description": "The grant(s) which funded and supported the work reported by the dataset.", + "type": "object" + }, + "keywords": { + "description": "Tags associated with the dataset, which will help in its discovery.", + "type": "object" + }, + "version": { + "description": "A release point for the dataset when applicable.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that do not fit in the previous specified attributes.", + "type": "object" + }, + "project": { + "description": "", + "type": "string" + }, + "additional_resources": { + "description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", + "type": "array", + "items": { + "type": "string" + } + }, + "has_part": { + "description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "title", + "data_use", + "project" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_datasets_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this dataset.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "title": { + "description": "", + "type": "string" + }, + "description": { + "description": "", + "type": "string" + }, + "contact_info": { + "description": "", + "type": "string" + }, + "data_use": { + "description": "", + "type": "object" + }, + "linked_field_sets": { + "description": "Data type fields which are linked together.", + "type": "object" + }, + "alternate_identifiers": { + "description": "Alternate identifiers for the dataset.", + "type": "object" + }, + "related_identifiers": { + "description": "Related identifiers for the dataset.", + "type": "object" + }, + "dates": { + "description": "Relevant dates for the datasets, a date must be added, e.g. creation date or last modification date should be added.", + "type": "object" + }, + "stored_in": { + "description": "The data repository hosting the dataset.", + "type": "object" + }, + "spatial_coverage": { + "description": "The geographical extension and span covered by the dataset and its measured dimensions/variables.", + "type": "object" + }, + "types": { + "description": "A term, ideally from a controlled terminology, identifying the dataset type or nature of the data, placing it in a typology.", + "type": "object" + }, + "availability": { + "description": "A qualifier indicating the different types of availability for a dataset (available, unavailable, embargoed, available with restriction, information not available).", + "type": "string" + }, + "refinement": { + "description": "A qualifier to describe the level of data processing of the dataset and its distributions.", + "type": "string" + }, + "aggregation": { + "description": "A qualifier indicating if the entity represents an 'instance of dataset' or a 'collection of datasets'.", + "type": "string" + }, + "privacy": { + "description": "A qualifier to describe the data protection applied to the dataset. This is relevant for clinical data.", + "type": "string" + }, + "distributions": { + "description": "The distribution(s) by which datasets are made available (for example: mySQL dump).", + "type": "object" + }, + "dimensions": { + "description": "The different dimensions (granular components) making up a dataset.", + "type": "object" + }, + "primary_publications": { + "description": "The primary publication(s) associated with the dataset, usually describing how the dataset was produced.", + "type": "object" + }, + "citations": { + "description": "The publication(s) that cite this dataset.", + "type": "object" + }, + "citation_count": { + "description": "The number of publications that cite this dataset (enumerated in the citations property).", + "type": "integer" + }, + "produced_by": { + "description": "A study process which generated a given dataset, if any.", + "type": "object" + }, + "creators": { + "description": "The person(s) or organization(s) which contributed to the creation of the dataset.", + "type": "object" + }, + "licenses": { + "description": "The terms of use of the dataset.", + "type": "object" + }, + "acknowledges": { + "description": "The grant(s) which funded and supported the work reported by the dataset.", + "type": "object" + }, + "keywords": { + "description": "Tags associated with the dataset, which will help in its discovery.", + "type": "object" + }, + "version": { + "description": "A release point for the dataset when applicable.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that do not fit in the previous specified attributes.", + "type": "object" + }, + "project": { + "description": "", + "type": "string" + }, + "additional_resources": { + "description": "Any resource objects linked to this dataset that aren't specified by a phenopacket in the dataset.", + "type": "array", + "items": { + "type": "string" + } + }, + "has_part": { + "description": "A Dataset that is a subset of this Dataset; Datasets declaring the 'hasPart' relationship are considered a collection of Datasets, the aggregation criteria could be included in the 'description' field.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_datasets_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this dataset.", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/diagnoses": { + "get": { + "operationId": "api_diagnoses_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "disease_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_diagnoses_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "disease": { + "description": "The diagnosed condition.", + "type": "integer" + }, + "genomic_interpretations": { + "description": "The genomic elements assessed as being responsible for the disease.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "disease" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/diagnoses/{id}": { + "get": { + "operationId": "api_diagnoses_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this diagnosis.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "disease_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_diagnoses_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this diagnosis.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "disease_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "disease": { + "description": "The diagnosed condition.", + "type": "integer" + }, + "genomic_interpretations": { + "description": "The genomic elements assessed as being responsible for the disease.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "disease" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_diagnoses_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this diagnosis.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "disease_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "disease": { + "description": "The diagnosed condition.", + "type": "integer" + }, + "genomic_interpretations": { + "description": "The genomic elements assessed as being responsible for the disease.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_diagnoses_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this diagnosis.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "disease_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/diseases": { + "get": { + "operationId": "api_diseases_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "term", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_comorbidities_group", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_diseases_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "term": { + "description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", + "type": "object" + }, + "onset": { + "description": "A representation of the age of onset of the disease", + "type": "object" + }, + "disease_stage": { + "description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", + "type": "object" + }, + "tnm_finding": { + "description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "term" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/diseases/{id}": { + "get": { + "operationId": "api_diseases_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this disease.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "term", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_comorbidities_group", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_diseases_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this disease.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "term", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_comorbidities_group", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "term": { + "description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", + "type": "object" + }, + "onset": { + "description": "A representation of the age of onset of the disease", + "type": "object" + }, + "disease_stage": { + "description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", + "type": "object" + }, + "tnm_finding": { + "description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "term" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_diseases_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this disease.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "term", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_comorbidities_group", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "term": { + "description": "An ontology term that represents the disease. It's recommended that one of the OMIM, Orphanet, or MONDO ontologies is used for rare human diseases.", + "type": "object" + }, + "onset": { + "description": "A representation of the age of onset of the disease", + "type": "object" + }, + "disease_stage": { + "description": "A list of terms representing the disease stage. Elements should be derived from child terms of NCIT:C28108 (Disease Stage Qualifier) or equivalent hierarchy from another ontology.", + "type": "object" + }, + "tnm_finding": { + "description": "A list of terms representing the tumour TNM score. Elements should be derived from child terms of NCIT:C48232 (Cancer TNM Finding) or equivalent hierarchy from another ontology.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_diseases_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this disease.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "term", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_comorbidities_group", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/experiment_schema": { + "get": { + "operationId": "api_experiment_schema_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Experiment schema", + "summary": "Experiment schema", + "tags": [ + "api" + ] + } + }, + "/api/experimentresults": { + "get": { + "operationId": "api_experimentresults_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "identifier", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "filename", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "file_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data_output_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "usage", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_experimentresults_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "description": "An arbitrary identifier for an experiment result.", + "type": "string" + }, + "description": { + "description": "Description of an experiment result.", + "type": "string" + }, + "filename": { + "description": "The name of the file containing the result.", + "type": "string" + }, + "genome_assembly_id": { + "description": "Reference genome assembly ID.", + "type": "string" + }, + "file_format": { + "description": "(Controlled Vocabulary) File format.", + "type": "string" + }, + "data_output_type": { + "description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", + "type": "string" + }, + "usage": { + "description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", + "type": "string" + }, + "creation_date": { + "description": "The date when the experiment result file was created.", + "type": "string" + }, + "created_by": { + "description": "Name/Username/Code of the person who prepared the sequencing data.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/experimentresults/{id}": { + "get": { + "operationId": "api_experimentresults_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this experiment result.", + "type": "integer" + }, + { + "name": "identifier", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "filename", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "file_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data_output_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "usage", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_experimentresults_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this experiment result.", + "type": "integer" + }, + { + "name": "identifier", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "filename", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "file_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data_output_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "usage", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "description": "An arbitrary identifier for an experiment result.", + "type": "string" + }, + "description": { + "description": "Description of an experiment result.", + "type": "string" + }, + "filename": { + "description": "The name of the file containing the result.", + "type": "string" + }, + "genome_assembly_id": { + "description": "Reference genome assembly ID.", + "type": "string" + }, + "file_format": { + "description": "(Controlled Vocabulary) File format.", + "type": "string" + }, + "data_output_type": { + "description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", + "type": "string" + }, + "usage": { + "description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", + "type": "string" + }, + "creation_date": { + "description": "The date when the experiment result file was created.", + "type": "string" + }, + "created_by": { + "description": "Name/Username/Code of the person who prepared the sequencing data.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_experimentresults_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this experiment result.", + "type": "integer" + }, + { + "name": "identifier", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "filename", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "file_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data_output_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "usage", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "identifier": { + "description": "An arbitrary identifier for an experiment result.", + "type": "string" + }, + "description": { + "description": "Description of an experiment result.", + "type": "string" + }, + "filename": { + "description": "The name of the file containing the result.", + "type": "string" + }, + "genome_assembly_id": { + "description": "Reference genome assembly ID.", + "type": "string" + }, + "file_format": { + "description": "(Controlled Vocabulary) File format.", + "type": "string" + }, + "data_output_type": { + "description": "The type of data output: Raw or Derived data.Raw data - the data output type that can be converted back to the original result set. Derived data - the data output type that cannot be converted back to the original result set.", + "type": "string" + }, + "usage": { + "description": "Internal to the Bento: describe how data is used within Bento (visualized or can be downloaded).", + "type": "string" + }, + "creation_date": { + "description": "The date when the experiment result file was created.", + "type": "string" + }, + "created_by": { + "description": "Name/Username/Code of the person who prepared the sequencing data.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_experimentresults_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this experiment result.", + "type": "integer" + }, + { + "name": "identifier", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "filename", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "file_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data_output_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "usage", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/experiments": { + "get": { + "operationId": "api_experiments_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "reference_registry_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "study_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "experiment_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "molecule", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_strategy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_source", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_selection", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_layout", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extraction_protocol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_experiments_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + "instrument": { + "description": "", + "type": "object" + }, + "study_type": { + "description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", + "type": "string" + }, + "experiment_type": { + "description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", + "type": "string" + }, + "experiment_ontology": { + "description": "Links to experiment ontology information (e.g. via the OBI ontology.).", + "type": "object" + }, + "molecule": { + "description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", + "type": "string" + }, + "molecule_ontology": { + "description": "Links to molecule ontology information (e.g. via the SO ontology.).", + "type": "object" + }, + "library_strategy": { + "description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", + "type": "string" + }, + "library_source": { + "description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", + "type": "string" + }, + "library_selection": { + "description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", + "type": "string" + }, + "library_layout": { + "description": "The library layout. E.g. Single, Paired.", + "type": "string" + }, + "extraction_protocol": { + "description": "The protocol used to isolate the extract material.", + "type": "string" + }, + "reference_registry_id": { + "description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", + "type": "string" + }, + "qc_flags": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "biosample": { + "description": "Biosample on which this experiment was done.", + "type": "string" + }, + "table": { + "description": "", + "type": "string" + } + }, + "required": [ + "id", + "instrument", + "experiment_type", + "biosample" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/experiments/{id}": { + "get": { + "operationId": "api_experiments_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "reference_registry_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "study_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "experiment_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "molecule", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_strategy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_source", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_selection", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_layout", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extraction_protocol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_experiments_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "reference_registry_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "study_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "experiment_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "molecule", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_strategy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_source", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_selection", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_layout", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extraction_protocol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + "instrument": { + "description": "", + "type": "object" + }, + "study_type": { + "description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", + "type": "string" + }, + "experiment_type": { + "description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", + "type": "string" + }, + "experiment_ontology": { + "description": "Links to experiment ontology information (e.g. via the OBI ontology.).", + "type": "object" + }, + "molecule": { + "description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", + "type": "string" + }, + "molecule_ontology": { + "description": "Links to molecule ontology information (e.g. via the SO ontology.).", + "type": "object" + }, + "library_strategy": { + "description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", + "type": "string" + }, + "library_source": { + "description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", + "type": "string" + }, + "library_selection": { + "description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", + "type": "string" + }, + "library_layout": { + "description": "The library layout. E.g. Single, Paired.", + "type": "string" + }, + "extraction_protocol": { + "description": "The protocol used to isolate the extract material.", + "type": "string" + }, + "reference_registry_id": { + "description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", + "type": "string" + }, + "qc_flags": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "biosample": { + "description": "Biosample on which this experiment was done.", + "type": "string" + }, + "table": { + "description": "", + "type": "string" + } + }, + "required": [ + "id", + "instrument", + "experiment_type", + "biosample" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_experiments_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "reference_registry_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "study_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "experiment_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "molecule", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_strategy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_source", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_selection", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_layout", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extraction_protocol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + "instrument": { + "description": "", + "type": "object" + }, + "study_type": { + "description": "Which study type the experiment belongs to.E.g. Epigenomics, Proteomics, Metagenomics, Transcriptomics, Metabolomics.", + "type": "string" + }, + "experiment_type": { + "description": "(Controlled Vocabulary) The assay target (e.g. DNA Methylation, mRNA-Seq, smRNA-Seq, Histone H3K4me1, etc.).", + "type": "string" + }, + "experiment_ontology": { + "description": "Links to experiment ontology information (e.g. via the OBI ontology.).", + "type": "object" + }, + "molecule": { + "description": "(Controlled Vocabulary) The type of molecule that was extracted from the biological material.Include one of the following: total RNA, polyA RNA, cytoplasmic RNA, nuclear RNA, small RNA, genomic DNA, protein, or other.", + "type": "string" + }, + "molecule_ontology": { + "description": "Links to molecule ontology information (e.g. via the SO ontology.).", + "type": "object" + }, + "library_strategy": { + "description": "(Controlled Vocabulary) The assay used. These are defined within the SRA metadata specifications with a controlled vocabulary (e.g. Bisulfite-Seq, RNA-Seq, ChIP-Seq). For a complete list, see https://www.ebi.ac.uk/ena/submit/reads-library-strategy.", + "type": "string" + }, + "library_source": { + "description": "The type of source material that is being sequenced. E.g. Genomic, Genomic Single Cell,Transcriptomic, Transcriptomic Single Cell, Metagenomic, Metatranscriptomic, Synthetic,Viral RNA, Other.", + "type": "string" + }, + "library_selection": { + "description": "Method used to enrich the target in the sequence library preparation. E.g. Random, PCR, Random PCR, RT-PCR, MF and other.", + "type": "string" + }, + "library_layout": { + "description": "The library layout. E.g. Single, Paired.", + "type": "string" + }, + "extraction_protocol": { + "description": "The protocol used to isolate the extract material.", + "type": "string" + }, + "reference_registry_id": { + "description": "The IHEC EpiRR ID for this dataset, only for IHEC Reference Epigenome datasets. Otherwise leave empty.", + "type": "string" + }, + "qc_flags": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "biosample": { + "description": "Biosample on which this experiment was done.", + "type": "string" + }, + "table": { + "description": "", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_experiments_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the experiment.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "reference_registry_id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "study_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "experiment_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "molecule", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_strategy", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_source", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_selection", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "library_layout", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extraction_protocol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/genes": { + "get": { + "operationId": "api_genes_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "symbol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_genes_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + "alternate_ids": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "symbol": { + "description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "symbol" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/genes/{id}": { + "get": { + "operationId": "api_genes_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "symbol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_genes_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "symbol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + "alternate_ids": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "symbol": { + "description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "symbol" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_genes_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "symbol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + "alternate_ids": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "symbol": { + "description": "A gene's official gene symbol as designated by the organism's gene nomenclature committee, e.g. ETF1 from the HUGO Gene Nomenclature committee.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_genes_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Official identifier of the gene. It SHOULD be a CURIE identifier with a prefix used by the official organism gene nomenclature committee, e.g. HGNC:347 for humans.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "symbol", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/geneticspecimens": { + "get": { + "operationId": "api_geneticspecimens_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_geneticspecimens_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + "specimen_type": { + "description": "The kind of material that forms the specimen.", + "type": "object" + }, + "collection_body": { + "description": "The anatomical collection site.", + "type": "object" + }, + "laterality": { + "description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "specimen_type" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/geneticspecimens/{id}": { + "get": { + "operationId": "api_geneticspecimens_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_geneticspecimens_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + "specimen_type": { + "description": "The kind of material that forms the specimen.", + "type": "object" + }, + "collection_body": { + "description": "The anatomical collection site.", + "type": "object" + }, + "laterality": { + "description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "specimen_type" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_geneticspecimens_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + "specimen_type": { + "description": "The kind of material that forms the specimen.", + "type": "object" + }, + "collection_body": { + "description": "The anatomical collection site.", + "type": "object" + }, + "laterality": { + "description": "Body side of the collection site, if needed to distinguish from a similar location on the other side of the body.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_geneticspecimens_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetic specimen.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/genomicinterpretations": { + "get": { + "operationId": "api_genomicinterpretations_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "gene", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variant", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_genomicinterpretations_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "description": "How the call of this GenomicInterpretation was interpreted.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "gene": { + "description": "The gene contributing to the diagnosis.", + "type": "string" + }, + "variant": { + "description": "The variant contributing to the diagnosis.", + "type": "integer" + } + }, + "required": [ + "status" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/genomicinterpretations/{id}": { + "get": { + "operationId": "api_genomicinterpretations_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this genomic interpretation.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "gene", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variant", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_genomicinterpretations_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this genomic interpretation.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "gene", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variant", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "description": "How the call of this GenomicInterpretation was interpreted.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "gene": { + "description": "The gene contributing to the diagnosis.", + "type": "string" + }, + "variant": { + "description": "The variant contributing to the diagnosis.", + "type": "integer" + } + }, + "required": [ + "status" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_genomicinterpretations_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this genomic interpretation.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "gene", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variant", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "status": { + "description": "How the call of this GenomicInterpretation was interpreted.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "gene": { + "description": "The gene contributing to the diagnosis.", + "type": "string" + }, + "variant": { + "description": "The variant contributing to the diagnosis.", + "type": "integer" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_genomicinterpretations_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this genomic interpretation.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "gene", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variant", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/genomicregionsstudied": { + "get": { + "operationId": "api_genomicregionsstudied_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_genomicregionsstudied_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + "dna_ranges_examined": { + "description": "The range(s) of the DNA sequence examined.", + "type": "object" + }, + "dna_region_description": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "gene_mutation": { + "description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", + "type": "object" + }, + "gene_studied": { + "description": "The ID for the gene studied.", + "type": "object" + }, + "genomic_reference_sequence_id": { + "description": "Range(s) of DNA sequence examined.", + "type": "object" + }, + "genomic_region_coordinate_system": { + "description": "The method of counting along the genome.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/genomicregionsstudied/{id}": { + "get": { + "operationId": "api_genomicregionsstudied_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_genomicregionsstudied_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + "dna_ranges_examined": { + "description": "The range(s) of the DNA sequence examined.", + "type": "object" + }, + "dna_region_description": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "gene_mutation": { + "description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", + "type": "object" + }, + "gene_studied": { + "description": "The ID for the gene studied.", + "type": "object" + }, + "genomic_reference_sequence_id": { + "description": "Range(s) of DNA sequence examined.", + "type": "object" + }, + "genomic_region_coordinate_system": { + "description": "The method of counting along the genome.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_genomicregionsstudied_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + "dna_ranges_examined": { + "description": "The range(s) of the DNA sequence examined.", + "type": "object" + }, + "dna_region_description": { + "description": "", + "type": "array", + "items": { + "type": "string" + } + }, + "gene_mutation": { + "description": "The gene mutations tested for in blood or tissue by molecular genetics methods.", + "type": "object" + }, + "gene_studied": { + "description": "The ID for the gene studied.", + "type": "object" + }, + "genomic_reference_sequence_id": { + "description": "Range(s) of DNA sequence examined.", + "type": "object" + }, + "genomic_region_coordinate_system": { + "description": "The method of counting along the genome.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_genomicregionsstudied_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genomic region studied.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/genomicsreports": { + "get": { + "operationId": "api_genomicsreports_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_genomicsreports_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + "genetic_variant": { + "description": "", + "type": "object" + }, + "genomic_region_studied": { + "description": "", + "type": "object" + }, + "code": { + "description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", + "type": "object" + }, + "performing_organization_name": { + "description": "The name of the organization producing the genomics report.", + "type": "string" + }, + "issued": { + "description": "The date/time this report was issued.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "genetic_variant", + "genomic_region_studied", + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/genomicsreports/{id}": { + "get": { + "operationId": "api_genomicsreports_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_genomicsreports_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + "genetic_variant": { + "description": "", + "type": "object" + }, + "genomic_region_studied": { + "description": "", + "type": "object" + }, + "code": { + "description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", + "type": "object" + }, + "performing_organization_name": { + "description": "The name of the organization producing the genomics report.", + "type": "string" + }, + "issued": { + "description": "The date/time this report was issued.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "genetic_variant", + "genomic_region_studied", + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_genomicsreports_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + "genetic_variant": { + "description": "", + "type": "object" + }, + "genomic_region_studied": { + "description": "", + "type": "object" + }, + "code": { + "description": "An ontology or controlled vocabulary term to identify the laboratory test. Accepted value sets: LOINC, GTR.", + "type": "object" + }, + "performing_organization_name": { + "description": "The name of the organization producing the genomics report.", + "type": "string" + }, + "issued": { + "description": "The date/time this report was issued.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_genomicsreports_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the genetics report.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/htsfiles": { + "get": { + "operationId": "api_htsfiles_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "uri", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_htsfiles_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "uri": { + "description": "A valid URI to the file", + "type": "string" + }, + "description": { + "description": "Human-readable text describing the file.", + "type": "string" + }, + "hts_format": { + "description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", + "type": "string" + }, + "genome_assembly": { + "description": "Genome assembly ID for the file, e.g. GRCh38.", + "type": "string" + }, + "individual_to_sample_identifiers": { + "description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "uri", + "hts_format", + "genome_assembly" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/htsfiles/{uri}": { + "get": { + "operationId": "api_htsfiles_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "uri", + "required": true, + "in": "path", + "description": "A valid URI to the file", + "type": "string" + }, + { + "name": "uri", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_htsfiles_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "uri", + "required": true, + "in": "path", + "description": "A valid URI to the file", + "type": "string" + }, + { + "name": "uri", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "uri": { + "description": "A valid URI to the file", + "type": "string" + }, + "description": { + "description": "Human-readable text describing the file.", + "type": "string" + }, + "hts_format": { + "description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", + "type": "string" + }, + "genome_assembly": { + "description": "Genome assembly ID for the file, e.g. GRCh38.", + "type": "string" + }, + "individual_to_sample_identifiers": { + "description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "uri", + "hts_format", + "genome_assembly" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_htsfiles_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "uri", + "required": true, + "in": "path", + "description": "A valid URI to the file", + "type": "string" + }, + { + "name": "uri", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "uri": { + "description": "A valid URI to the file", + "type": "string" + }, + "description": { + "description": "Human-readable text describing the file.", + "type": "string" + }, + "hts_format": { + "description": "The file's format; one of SAM, BAM, CRAM, VCF, BCF, GVCF, FASTQ, or UNKNOWN.", + "type": "string" + }, + "genome_assembly": { + "description": "Genome assembly ID for the file, e.g. GRCh38.", + "type": "string" + }, + "individual_to_sample_identifiers": { + "description": "Mapping between individual or biosample IDs and the sample identifier in the HTS file.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_htsfiles_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "uri", + "required": true, + "in": "path", + "description": "A valid URI to the file", + "type": "string" + }, + { + "name": "uri", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_format", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genome_assembly", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/individuals": { + "get": { + "operationId": "api_individuals_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "alternate_ids", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "active", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "deceased", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets__biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "karyotypic_sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ethnicity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "race", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "date_of_birth", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ordering", + "required": false, + "in": "query", + "description": "Which field to use when ordering the results.", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_individuals_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + "alternate_ids": { + "description": "A list of alternative identifiers for the individual.", + "type": "array", + "items": { + "type": "string" + } + }, + "date_of_birth": { + "description": "A timestamp either exact or imprecise.", + "type": "string" + }, + "age": { + "description": "The age or age range of the individual.", + "type": "object" + }, + "age_numeric": { + "description": "The age of the individual as number.", + "type": "number" + }, + "age_unit": { + "description": "The unit for measuring age.", + "type": "string" + }, + "sex": { + "description": "Observed apparent sex of the individual.", + "type": "string" + }, + "karyotypic_sex": { + "description": "The karyotypic sex of the individual.", + "type": "string" + }, + "taxonomy": { + "description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", + "type": "object" + }, + "active": { + "description": "Whether this patient's record is in active use.", + "type": "boolean" + }, + "deceased": { + "description": "Indicates if the individual is deceased or not.", + "type": "boolean" + }, + "comorbid_condition": { + "description": "One or more conditions that occur with primary condition.", + "type": "object" + }, + "ecog_performance_status": { + "description": "Value representing the Eastern Cooperative Oncology Group performance status.", + "type": "object" + }, + "karnofsky": { + "description": "Value representing the Karnofsky Performance status.", + "type": "object" + }, + "race": { + "description": "A code for the person's race.", + "type": "string" + }, + "ethnicity": { + "description": "A code for the person's ethnicity.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + } + }, + "required": [ + "id" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/individuals/{id}": { + "get": { + "operationId": "api_individuals_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "alternate_ids", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "active", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "deceased", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets__biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "karyotypic_sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ethnicity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "race", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "date_of_birth", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ordering", + "required": false, + "in": "query", + "description": "Which field to use when ordering the results.", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_individuals_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "alternate_ids", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "active", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "deceased", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets__biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "karyotypic_sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ethnicity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "race", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "date_of_birth", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ordering", + "required": false, + "in": "query", + "description": "Which field to use when ordering the results.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + "alternate_ids": { + "description": "A list of alternative identifiers for the individual.", + "type": "array", + "items": { + "type": "string" + } + }, + "date_of_birth": { + "description": "A timestamp either exact or imprecise.", + "type": "string" + }, + "age": { + "description": "The age or age range of the individual.", + "type": "object" + }, + "age_numeric": { + "description": "The age of the individual as number.", + "type": "number" + }, + "age_unit": { + "description": "The unit for measuring age.", + "type": "string" + }, + "sex": { + "description": "Observed apparent sex of the individual.", + "type": "string" + }, + "karyotypic_sex": { + "description": "The karyotypic sex of the individual.", + "type": "string" + }, + "taxonomy": { + "description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", + "type": "object" + }, + "active": { + "description": "Whether this patient's record is in active use.", + "type": "boolean" + }, + "deceased": { + "description": "Indicates if the individual is deceased or not.", + "type": "boolean" + }, + "comorbid_condition": { + "description": "One or more conditions that occur with primary condition.", + "type": "object" + }, + "ecog_performance_status": { + "description": "Value representing the Eastern Cooperative Oncology Group performance status.", + "type": "object" + }, + "karnofsky": { + "description": "Value representing the Karnofsky Performance status.", + "type": "object" + }, + "race": { + "description": "A code for the person's race.", + "type": "string" + }, + "ethnicity": { + "description": "A code for the person's ethnicity.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + } + }, + "required": [ + "id" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_individuals_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "alternate_ids", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "active", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "deceased", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets__biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "karyotypic_sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ethnicity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "race", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "date_of_birth", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ordering", + "required": false, + "in": "query", + "description": "Which field to use when ordering the results.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + "alternate_ids": { + "description": "A list of alternative identifiers for the individual.", + "type": "array", + "items": { + "type": "string" + } + }, + "date_of_birth": { + "description": "A timestamp either exact or imprecise.", + "type": "string" + }, + "age": { + "description": "The age or age range of the individual.", + "type": "object" + }, + "age_numeric": { + "description": "The age of the individual as number.", + "type": "number" + }, + "age_unit": { + "description": "The unit for measuring age.", + "type": "string" + }, + "sex": { + "description": "Observed apparent sex of the individual.", + "type": "string" + }, + "karyotypic_sex": { + "description": "The karyotypic sex of the individual.", + "type": "string" + }, + "taxonomy": { + "description": "Ontology resource representing the species (e.g., NCBITaxon:9615).", + "type": "object" + }, + "active": { + "description": "Whether this patient's record is in active use.", + "type": "boolean" + }, + "deceased": { + "description": "Indicates if the individual is deceased or not.", + "type": "boolean" + }, + "comorbid_condition": { + "description": "One or more conditions that occur with primary condition.", + "type": "object" + }, + "ecog_performance_status": { + "description": "Value representing the Eastern Cooperative Oncology Group performance status.", + "type": "object" + }, + "karnofsky": { + "description": "Value representing the Karnofsky Performance status.", + "type": "object" + }, + "race": { + "description": "A code for the person's race.", + "type": "string" + }, + "ethnicity": { + "description": "A code for the person's ethnicity.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_individuals_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the individual.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "alternate_ids", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "active", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "deceased", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets__biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopackets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "karyotypic_sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ethnicity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "race", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "date_of_birth", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "search", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "ordering", + "required": false, + "in": "query", + "description": "Which field to use when ordering the results.", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/interpretations": { + "get": { + "operationId": "api_interpretations_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "resolution_status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_interpretations_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + "resolution_status": { + "description": "The current status of work on the case.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "phenopacket": { + "description": "The subject of this interpretation.", + "type": "string" + }, + "meta_data": { + "description": "Metadata about this interpretation.", + "type": "integer" + }, + "diagnosis": { + "description": "One or more diagnoses, if made.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "phenopacket", + "meta_data", + "diagnosis" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/interpretations/{id}": { + "get": { + "operationId": "api_interpretations_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "resolution_status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_interpretations_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "resolution_status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + "resolution_status": { + "description": "The current status of work on the case.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "phenopacket": { + "description": "The subject of this interpretation.", + "type": "string" + }, + "meta_data": { + "description": "Metadata about this interpretation.", + "type": "integer" + }, + "diagnosis": { + "description": "One or more diagnoses, if made.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "phenopacket", + "meta_data", + "diagnosis" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_interpretations_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "resolution_status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + "resolution_status": { + "description": "The current status of work on the case.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema", + "type": "object" + }, + "phenopacket": { + "description": "The subject of this interpretation.", + "type": "string" + }, + "meta_data": { + "description": "Metadata about this interpretation.", + "type": "integer" + }, + "diagnosis": { + "description": "One or more diagnoses, if made.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_interpretations_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the interpretation.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "resolution_status", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/labsvital": { + "get": { + "operationId": "api_labsvital_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_labsvital_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + "tumor_marker_code": { + "description": "A code identifying the type of tumor marker test.", + "type": "object" + }, + "tumor_marker_data_value": { + "description": "The result of a tumor marker test.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "individual": { + "description": "The individual who is the subject of the tests.", + "type": "string" + } + }, + "required": [ + "id", + "tumor_marker_code", + "individual" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/labsvital/{id}": { + "get": { + "operationId": "api_labsvital_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_labsvital_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + "tumor_marker_code": { + "description": "A code identifying the type of tumor marker test.", + "type": "object" + }, + "tumor_marker_data_value": { + "description": "The result of a tumor marker test.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "individual": { + "description": "The individual who is the subject of the tests.", + "type": "string" + } + }, + "required": [ + "id", + "tumor_marker_code", + "individual" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_labsvital_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + "tumor_marker_code": { + "description": "A code identifying the type of tumor marker test.", + "type": "object" + }, + "tumor_marker_data_value": { + "description": "The result of a tumor marker test.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "individual": { + "description": "The individual who is the subject of the tests.", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_labsvital_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the labs/vital tests.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/mcode_overview": { + "get": { + "operationId": "api_mcode_overview_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Overview of all mCode data in the database", + "summary": "Overview of all mCode data in the database", + "tags": [ + "api" + ] + } + }, + "/api/mcode_schema": { + "get": { + "operationId": "api_mcode_schema_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Mcodepacket schema", + "summary": "Mcodepacket schema", + "tags": [ + "api" + ] + } + }, + "/api/mcodepackets": { + "get": { + "operationId": "api_mcodepackets_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_mcodepackets_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + "date_of_death": { + "description": "An indication that the patient is no longer living, given by a date of death or boolean.", + "type": "string" + }, + "cancer_disease_status": { + "description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "subject": { + "description": "An individual who is a subject of mcodepacket.", + "type": "string" + }, + "genomics_report": { + "description": "A genomics report associated with an Individual.", + "type": "string" + }, + "table": { + "description": "", + "type": "string" + }, + "cancer_condition": { + "description": "An Individual's cancer condition.", + "type": "array", + "items": { + "type": "string" + } + }, + "cancer_related_procedures": { + "description": "A radiological or surgical procedures addressing a cancer condition.", + "type": "array", + "items": { + "type": "string" + } + }, + "medication_statement": { + "description": "Medication treatment addressed to an Individual.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "subject" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/mcodepackets/{id}": { + "get": { + "operationId": "api_mcodepackets_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_mcodepackets_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + "date_of_death": { + "description": "An indication that the patient is no longer living, given by a date of death or boolean.", + "type": "string" + }, + "cancer_disease_status": { + "description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "subject": { + "description": "An individual who is a subject of mcodepacket.", + "type": "string" + }, + "genomics_report": { + "description": "A genomics report associated with an Individual.", + "type": "string" + }, + "table": { + "description": "", + "type": "string" + }, + "cancer_condition": { + "description": "An Individual's cancer condition.", + "type": "array", + "items": { + "type": "string" + } + }, + "cancer_related_procedures": { + "description": "A radiological or surgical procedures addressing a cancer condition.", + "type": "array", + "items": { + "type": "string" + } + }, + "medication_statement": { + "description": "Medication treatment addressed to an Individual.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "subject" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_mcodepackets_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + "date_of_death": { + "description": "An indication that the patient is no longer living, given by a date of death or boolean.", + "type": "string" + }, + "cancer_disease_status": { + "description": "A clinician's qualitative judgment on the current trend of the cancer, e.g., whether it is stable, worsening (progressing), or improving (responding).", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "subject": { + "description": "An individual who is a subject of mcodepacket.", + "type": "string" + }, + "genomics_report": { + "description": "A genomics report associated with an Individual.", + "type": "string" + }, + "table": { + "description": "", + "type": "string" + }, + "cancer_condition": { + "description": "An Individual's cancer condition.", + "type": "array", + "items": { + "type": "string" + } + }, + "cancer_related_procedures": { + "description": "A radiological or surgical procedures addressing a cancer condition.", + "type": "array", + "items": { + "type": "string" + } + }, + "medication_statement": { + "description": "Medication treatment addressed to an Individual.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_mcodepackets_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the mcodepacket.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/medicationstatements": { + "get": { + "operationId": "api_medicationstatements_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_medicationstatements_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + "medication_code": { + "description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", + "type": "object" + }, + "termination_reason": { + "description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", + "type": "object" + }, + "treatment_intent": { + "description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", + "type": "object" + }, + "start_date": { + "description": "The start date/time of the medication.", + "type": "string" + }, + "end_date": { + "description": "The end date/time of the medication.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "medication_code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/medicationstatements/{id}": { + "get": { + "operationId": "api_medicationstatements_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_medicationstatements_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + "medication_code": { + "description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", + "type": "object" + }, + "termination_reason": { + "description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", + "type": "object" + }, + "treatment_intent": { + "description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", + "type": "object" + }, + "start_date": { + "description": "The start date/time of the medication.", + "type": "string" + }, + "end_date": { + "description": "The end date/time of the medication.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "medication_code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_medicationstatements_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + "medication_code": { + "description": "A code for medication. Accepted code systems: Medication Clinical Drug (RxNorm) and other.", + "type": "object" + }, + "termination_reason": { + "description": "A code explaining unplanned or premature termination of a course of medication. Accepted ontologies: SNOMED CT.", + "type": "object" + }, + "treatment_intent": { + "description": "The purpose of a treatment. Accepted ontologies: SNOMED CT.", + "type": "object" + }, + "start_date": { + "description": "The start date/time of the medication.", + "type": "string" + }, + "end_date": { + "description": "The end date/time of the medication.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_medicationstatements_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the medication statement.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/metadata": { + "get": { + "operationId": "api_metadata_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "submitted_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket_schema_version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_metadata_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "created": { + "description": "Timestamp specifying when when this object was created.", + "type": "string" + }, + "created_by": { + "description": "Name of the person who created the phenopacket.", + "type": "string" + }, + "submitted_by": { + "description": "Name of the person who submitted the phenopacket.", + "type": "string" + }, + "updates": { + "description": "A list of updates to the phenopacket.", + "type": "object" + }, + "phenopacket_schema_version": { + "description": "Schema version of the current phenopacket.", + "type": "string" + }, + "external_references": { + "description": "A list of external (non-resource) references.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "created_by" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/metadata/{id}": { + "get": { + "operationId": "api_metadata_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this meta data.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "submitted_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket_schema_version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_metadata_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this meta data.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "submitted_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket_schema_version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "created": { + "description": "Timestamp specifying when when this object was created.", + "type": "string" + }, + "created_by": { + "description": "Name of the person who created the phenopacket.", + "type": "string" + }, + "submitted_by": { + "description": "Name of the person who submitted the phenopacket.", + "type": "string" + }, + "updates": { + "description": "A list of updates to the phenopacket.", + "type": "object" + }, + "phenopacket_schema_version": { + "description": "Schema version of the current phenopacket.", + "type": "string" + }, + "external_references": { + "description": "A list of external (non-resource) references.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "created_by" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_metadata_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this meta data.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "submitted_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket_schema_version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "created": { + "description": "Timestamp specifying when when this object was created.", + "type": "string" + }, + "created_by": { + "description": "Name of the person who created the phenopacket.", + "type": "string" + }, + "submitted_by": { + "description": "Name of the person who submitted the phenopacket.", + "type": "string" + }, + "updates": { + "description": "A list of updates to the phenopacket.", + "type": "object" + }, + "phenopacket_schema_version": { + "description": "Schema version of the current phenopacket.", + "type": "string" + }, + "external_references": { + "description": "A list of external (non-resource) references.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_metadata_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this meta data.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "created_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "submitted_by", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket_schema_version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/overview": { + "get": { + "operationId": "api_overview_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Overview of all Phenopackets in the database", + "summary": "Overview of all Phenopackets in the database", + "tags": [ + "api" + ] + } + }, + "/api/phenopackets": { + "get": { + "operationId": "api_phenopackets_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "subject", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genes", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variants", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_files", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_phenopackets_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "subject": { + "description": "A subject of a phenopacket, representing either a human (typically) or another organism.", + "type": "string" + }, + "meta_data": { + "description": "A structured definition of the resources and ontologies used within a phenopacket.", + "type": "integer" + }, + "table": { + "description": "", + "type": "string" + }, + "biosamples": { + "description": "Samples (e.g. biopsies) taken from the individual, if any.", + "type": "array", + "items": { + "type": "string" + } + }, + "genes": { + "description": "Genes deemed to be relevant to the case; application-specific.", + "type": "array", + "items": { + "type": "string" + } + }, + "variants": { + "description": "A list of variants identified in the proband.", + "type": "array", + "items": { + "type": "string" + } + }, + "diseases": { + "description": "A list of diseases diagnosed in the proband.", + "type": "array", + "items": { + "type": "string" + } + }, + "hts_files": { + "description": "A list of HTS files derived from the individual.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "subject", + "meta_data" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/phenopackets/{id}": { + "get": { + "operationId": "api_phenopackets_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "subject", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genes", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variants", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_files", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_phenopackets_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "subject", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genes", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variants", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_files", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "subject": { + "description": "A subject of a phenopacket, representing either a human (typically) or another organism.", + "type": "string" + }, + "meta_data": { + "description": "A structured definition of the resources and ontologies used within a phenopacket.", + "type": "integer" + }, + "table": { + "description": "", + "type": "string" + }, + "biosamples": { + "description": "Samples (e.g. biopsies) taken from the individual, if any.", + "type": "array", + "items": { + "type": "string" + } + }, + "genes": { + "description": "Genes deemed to be relevant to the case; application-specific.", + "type": "array", + "items": { + "type": "string" + } + }, + "variants": { + "description": "A list of variants identified in the proband.", + "type": "array", + "items": { + "type": "string" + } + }, + "diseases": { + "description": "A list of diseases diagnosed in the proband.", + "type": "array", + "items": { + "type": "string" + } + }, + "hts_files": { + "description": "A list of HTS files derived from the individual.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "id", + "subject", + "meta_data" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_phenopackets_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "subject", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genes", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variants", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_files", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "subject": { + "description": "A subject of a phenopacket, representing either a human (typically) or another organism.", + "type": "string" + }, + "meta_data": { + "description": "A structured definition of the resources and ontologies used within a phenopacket.", + "type": "integer" + }, + "table": { + "description": "", + "type": "string" + }, + "biosamples": { + "description": "Samples (e.g. biopsies) taken from the individual, if any.", + "type": "array", + "items": { + "type": "string" + } + }, + "genes": { + "description": "Genes deemed to be relevant to the case; application-specific.", + "type": "array", + "items": { + "type": "string" + } + }, + "variants": { + "description": "A list of variants identified in the proband.", + "type": "array", + "items": { + "type": "string" + } + }, + "diseases": { + "description": "A list of diseases diagnosed in the proband.", + "type": "array", + "items": { + "type": "string" + } + }, + "hts_files": { + "description": "A list of HTS files derived from the individual.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_phenopackets_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Unique, arbitrary, researcher-specified identifier for the phenopacket.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "subject", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosamples", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "genes", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "variants", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "hts_files", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "disease", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "found_phenotypic_feature", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/phenotypicfeatures": { + "get": { + "operationId": "api_phenotypicfeatures_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "negated", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "severity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "onset", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "evidence", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_phenotypicfeatures_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "description": "", + "type": "object" + }, + "description": { + "description": "Human-readable text describing the phenotypic feature; NOT for structured text.", + "type": "string" + }, + "negated": { + "description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", + "type": "boolean" + }, + "severity": { + "description": "An ontology term that describes the severity of the condition.", + "type": "object" + }, + "modifier": { + "description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", + "type": "object" + }, + "onset": { + "description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", + "type": "object" + }, + "evidence": { + "description": "One or more pieces of evidence that specify how the phenotype was determined.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "biosample": { + "description": "", + "type": "string" + }, + "phenopacket": { + "description": "", + "type": "string" + } + }, + "required": [ + "type" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/phenotypicfeatures/{id}": { + "get": { + "operationId": "api_phenotypicfeatures_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this phenotypic feature.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "negated", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "severity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "onset", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "evidence", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_phenotypicfeatures_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this phenotypic feature.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "negated", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "severity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "onset", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "evidence", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "description": "", + "type": "object" + }, + "description": { + "description": "Human-readable text describing the phenotypic feature; NOT for structured text.", + "type": "string" + }, + "negated": { + "description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", + "type": "boolean" + }, + "severity": { + "description": "An ontology term that describes the severity of the condition.", + "type": "object" + }, + "modifier": { + "description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", + "type": "object" + }, + "onset": { + "description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", + "type": "object" + }, + "evidence": { + "description": "One or more pieces of evidence that specify how the phenotype was determined.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "biosample": { + "description": "", + "type": "string" + }, + "phenopacket": { + "description": "", + "type": "string" + } + }, + "required": [ + "type" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_phenotypicfeatures_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this phenotypic feature.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "negated", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "severity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "onset", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "evidence", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "type": { + "description": "", + "type": "object" + }, + "description": { + "description": "Human-readable text describing the phenotypic feature; NOT for structured text.", + "type": "string" + }, + "negated": { + "description": "Whether the feature is present (false) or absent (true, feature is negated); default is false.", + "type": "boolean" + }, + "severity": { + "description": "An ontology term that describes the severity of the condition.", + "type": "object" + }, + "modifier": { + "description": "A list of ontology terms that provide more expressive / precise descriptions of a phenotypic feature, including e.g. positionality or external factors.", + "type": "object" + }, + "onset": { + "description": "An ontology term that describes the age at which the phenotypic feature was first noticed or diagnosed, e.g. HP:0003674.", + "type": "object" + }, + "evidence": { + "description": "One or more pieces of evidence that specify how the phenotype was determined.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "biosample": { + "description": "", + "type": "string" + }, + "phenopacket": { + "description": "", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_phenotypicfeatures_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this phenotypic feature.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "negated", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "phenopacket", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "description", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "severity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "onset", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "evidence", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties_datatype", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "individual", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/procedures": { + "get": { + "operationId": "api_procedures_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "code", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "body_site", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_procedures_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "code": { + "description": "An ontology term that represents a clinical procedure performed on a subject.", + "type": "object" + }, + "body_site": { + "description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/procedures/{id}": { + "get": { + "operationId": "api_procedures_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this procedure.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "code", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "body_site", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_procedures_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this procedure.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "code", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "body_site", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "code": { + "description": "An ontology term that represents a clinical procedure performed on a subject.", + "type": "object" + }, + "body_site": { + "description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "code" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_procedures_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this procedure.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "code", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "body_site", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "code": { + "description": "An ontology term that represents a clinical procedure performed on a subject.", + "type": "object" + }, + "body_site": { + "description": "An ontology term that is specified when it is not possible to represent the procedure with a single ontology class.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_procedures_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this procedure.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "code", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "body_site", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "biosample", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/projects": { + "get": { + "operationId": "api_projects_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_projects_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "title": { + "description": "", + "type": "string" + }, + "description": { + "description": "", + "type": "string" + } + }, + "required": [ + "title" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/projects/{identifier}": { + "get": { + "operationId": "api_projects_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this project.", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_projects_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this project.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "title": { + "description": "", + "type": "string" + }, + "description": { + "description": "", + "type": "string" + } + }, + "required": [ + "title" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_projects_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this project.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "title": { + "description": "", + "type": "string" + }, + "description": { + "description": "", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_projects_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "identifier", + "required": true, + "in": "path", + "description": "A UUID string identifying this project.", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/public": { + "get": { + "operationId": "api_public_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "sex", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "age_range_min", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "age_range_max", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "description": "View to return only count of all individuals after filtering.", + "summary": "View to return only count of all individuals after filtering.", + "tags": [ + "api" + ] + } + }, + "/api/public_overview": { + "get": { + "operationId": "api_public_overview_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Overview of all public data in the database", + "summary": "Overview of all public data in the database", + "tags": [ + "api" + ] + } + }, + "/api/public_search_fields": { + "get": { + "operationId": "api_public_search_fields_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Return public search fields", + "summary": "Return public search fields", + "tags": [ + "api" + ] + } + }, + "/api/resources": { + "get": { + "operationId": "api_resources_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "name", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "namespace_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "url", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "iri_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_resources_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + "name": { + "description": "The full name of the resource or ontology referred to by the id element.", + "type": "string" + }, + "namespace_prefix": { + "description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", + "type": "string" + }, + "url": { + "description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", + "type": "string" + }, + "version": { + "description": "The version of the resource or ontology used to make the annotation.", + "type": "string" + }, + "iri_prefix": { + "description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "name", + "namespace_prefix", + "url", + "version", + "iri_prefix" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/resources/{id}": { + "get": { + "operationId": "api_resources_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "name", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "namespace_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "url", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "iri_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_resources_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "name", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "namespace_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "url", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "iri_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + "name": { + "description": "The full name of the resource or ontology referred to by the id element.", + "type": "string" + }, + "namespace_prefix": { + "description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", + "type": "string" + }, + "url": { + "description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", + "type": "string" + }, + "version": { + "description": "The version of the resource or ontology used to make the annotation.", + "type": "string" + }, + "iri_prefix": { + "description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "id", + "name", + "namespace_prefix", + "url", + "version", + "iri_prefix" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_resources_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "name", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "namespace_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "url", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "iri_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + "name": { + "description": "The full name of the resource or ontology referred to by the id element.", + "type": "string" + }, + "namespace_prefix": { + "description": "Prefix for objects from this resource. In the case of ontology resources, this should be the CURIE prefix.", + "type": "string" + }, + "url": { + "description": "Resource URL. In the case of ontologies, this should be an OBO or OWL file. Other resources should link to the official or top-level url.", + "type": "string" + }, + "version": { + "description": "The version of the resource or ontology used to make the annotation.", + "type": "string" + }, + "iri_prefix": { + "description": "The IRI prefix, when used with the namespace prefix and an object ID, should resolve the term or object from the resource in question.", + "type": "string" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_resources_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "For OBO ontologies, the value of this string MUST always be the official OBO ID, which is always equivalent to the ID prefix in lower case. For other resources use the prefix in identifiers.org.", + "type": "string" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "name", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "namespace_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "url", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "version", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "iri_prefix", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/table_ownership": { + "get": { + "operationId": "api_table_ownership_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_table_ownership_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "table_id": { + "description": "", + "type": "string" + }, + "service_id": { + "description": "", + "type": "string" + }, + "service_artifact": { + "description": "", + "type": "string" + }, + "dataset": { + "description": "", + "type": "string" + } + }, + "required": [ + "table_id", + "service_id", + "dataset" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/table_ownership/{table_id}": { + "get": { + "operationId": "api_table_ownership_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "A unique value identifying this table ownership.", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_table_ownership_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "A unique value identifying this table ownership.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "table_id": { + "description": "", + "type": "string" + }, + "service_id": { + "description": "", + "type": "string" + }, + "service_artifact": { + "description": "", + "type": "string" + }, + "dataset": { + "description": "", + "type": "string" + } + }, + "required": [ + "table_id", + "service_id", + "dataset" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_table_ownership_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "A unique value identifying this table ownership.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "table_id": { + "description": "", + "type": "string" + }, + "service_id": { + "description": "", + "type": "string" + }, + "service_artifact": { + "description": "", + "type": "string" + }, + "dataset": { + "description": "", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_table_ownership_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "A unique value identifying this table ownership.", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/tables": { + "get": { + "operationId": "api_tables_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_tables_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ownership_record": { + "description": "", + "type": "string" + }, + "name": { + "description": "", + "type": "string" + }, + "data_type": { + "description": "", + "type": "string" + } + }, + "required": [ + "ownership_record", + "name", + "data_type" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/tables/{ownership_record}": { + "get": { + "operationId": "api_tables_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "ownership_record", + "required": true, + "in": "path", + "description": "A unique value identifying this table.", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_tables_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "ownership_record", + "required": true, + "in": "path", + "description": "A unique value identifying this table.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ownership_record": { + "description": "", + "type": "string" + }, + "name": { + "description": "", + "type": "string" + }, + "data_type": { + "description": "", + "type": "string" + } + }, + "required": [ + "ownership_record", + "name", + "data_type" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_tables_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "ownership_record", + "required": true, + "in": "path", + "description": "A unique value identifying this table.", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "ownership_record": { + "description": "", + "type": "string" + }, + "name": { + "description": "", + "type": "string" + }, + "data_type": { + "description": "", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_tables_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "ownership_record", + "required": true, + "in": "path", + "description": "A unique value identifying this table.", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/tnmstaging": { + "get": { + "operationId": "api_tnmstaging_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_tnmstaging_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + "tnm_type": { + "description": "TNM type: clinical or pathological.", + "type": "string" + }, + "stage_group": { + "description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "primary_tumor_category": { + "description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "regional_nodes_category": { + "description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "distant_metastases_category": { + "description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "cancer_condition": { + "description": "Cancer condition.", + "type": "string" + } + }, + "required": [ + "id", + "tnm_type", + "stage_group", + "primary_tumor_category", + "regional_nodes_category", + "distant_metastases_category", + "cancer_condition" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/tnmstaging/{id}": { + "get": { + "operationId": "api_tnmstaging_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_tnmstaging_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + "tnm_type": { + "description": "TNM type: clinical or pathological.", + "type": "string" + }, + "stage_group": { + "description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "primary_tumor_category": { + "description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "regional_nodes_category": { + "description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "distant_metastases_category": { + "description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "cancer_condition": { + "description": "Cancer condition.", + "type": "string" + } + }, + "required": [ + "id", + "tnm_type", + "stage_group", + "primary_tumor_category", + "regional_nodes_category", + "distant_metastases_category", + "cancer_condition" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_tnmstaging_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "id": { + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + "tnm_type": { + "description": "TNM type: clinical or pathological.", + "type": "string" + }, + "stage_group": { + "description": "The extent of the cancer in the body, according to the TNM classification system.Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "primary_tumor_category": { + "description": "Category of the primary tumor, based on its size and extent. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "regional_nodes_category": { + "description": "Category of the presence or absence of metastases in regional lymph nodes. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "distant_metastases_category": { + "description": "Category describing the presence or absence of metastases in remote anatomical locations. Accepted ontologies: SNOMED CT, AJCC and others.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + }, + "cancer_condition": { + "description": "Cancer condition.", + "type": "string" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_tnmstaging_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "An arbitrary identifier for the TNM staging.", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/api/variants": { + "get": { + "operationId": "api_variants_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "page", + "required": false, + "in": "query", + "description": "A page number within the paginated result set.", + "type": "integer" + }, + { + "name": "page_size", + "required": false, + "in": "query", + "description": "Number of results to return per page.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "allele_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "zygosity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "post": { + "operationId": "api_variants_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "allele_type": { + "description": "One of four allele types.", + "type": "string" + }, + "allele": { + "description": "The variant's corresponding allele", + "type": "object" + }, + "zygosity": { + "description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "allele_type", + "allele" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + } + }, + "/api/variants/{id}": { + "get": { + "operationId": "api_variants_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this variant.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "allele_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "zygosity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + }, + "put": { + "operationId": "api_variants_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this variant.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "allele_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "zygosity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "allele_type": { + "description": "One of four allele types.", + "type": "string" + }, + "allele": { + "description": "The variant's corresponding allele", + "type": "object" + }, + "zygosity": { + "description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + }, + "required": [ + "allele_type", + "allele" + ] + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "patch": { + "operationId": "api_variants_partial_update", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this variant.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "allele_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "zygosity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "data", + "in": "body", + "schema": { + "type": "object", + "properties": { + "allele_type": { + "description": "One of four allele types.", + "type": "string" + }, + "allele": { + "description": "The variant's corresponding allele", + "type": "object" + }, + "zygosity": { + "description": "An ontology term taken from the Genotype Ontology (GENO) representing the zygosity of the variant.", + "type": "object" + }, + "extra_properties": { + "description": "Extra properties that are not supported by current schema.", + "type": "object" + } + } + } + } + ], + "consumes": [ + "application/json" + ], + "tags": [ + "api" + ] + }, + "delete": { + "operationId": "api_variants_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "A unique integer value identifying this variant.", + "type": "integer" + }, + { + "name": "id", + "required": false, + "in": "query", + "description": "", + "type": "number" + }, + { + "name": "allele_type", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "zygosity", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "extra_properties", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + }, + { + "name": "authorized_datasets", + "required": false, + "in": "query", + "description": "", + "type": "string" + } + ], + "tags": [ + "api" + ] + } + }, + "/data-types": { + "get": { + "operationId": "data-types_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "data-types" + ] + } + }, + "/data-types/{data_type}": { + "get": { + "operationId": "data-types_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "data_type", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "data-types" + ] + } + }, + "/data-types/{data_type}/metadata_schema": { + "get": { + "operationId": "data-types_metadata_schema_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "data_type", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "data-types" + ] + } + }, + "/data-types/{data_type}/schema": { + "get": { + "operationId": "data-types_schema_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "data_type", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "data-types" + ] + } + }, + "/fhir-search": { + "get": { + "operationId": "fhir-search_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "fhir-search" + ] + }, + "post": { + "operationId": "fhir-search_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "fhir-search" + ] + } + }, + "/private/export": { + "post": { + "operationId": "private_export_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "description": "Export data from Katsu\n\nExports the requested data object (e.g. a Dataset or a Project) in the given\nformat.\nNote that the generated files will be either written locally if a path is\nprovided, or downloaded as a tar gzipped attachment otherwise.", + "summary": "Export data from Katsu", + "tags": [ + "private" + ] + } + }, + "/private/fhir-search": { + "get": { + "operationId": "private_fhir-search_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "private" + ] + }, + "post": { + "operationId": "private_fhir-search_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "private" + ] + } + }, + "/private/ingest": { + "post": { + "operationId": "private_ingest_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "private" + ] + } + }, + "/private/search": { + "get": { + "operationId": "private_search_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "private" + ] + }, + "post": { + "operationId": "private_search_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "private" + ] + } + }, + "/private/tables/{table_id}/search": { + "get": { + "operationId": "private_tables_search_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "private" + ] + }, + "post": { + "operationId": "private_tables_search_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "private" + ] + } + }, + "/search": { + "get": { + "operationId": "search_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "search" + ] + }, + "post": { + "operationId": "search_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "search" + ] + } + }, + "/service-info": { + "get": { + "operationId": "service-info_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "description": "Return service info", + "summary": "Return service info", + "tags": [ + "service-info" + ] + } + }, + "/tables": { + "get": { + "operationId": "tables_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "tables" + ] + }, + "post": { + "operationId": "tables_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "tables" + ] + } + }, + "/tables/{table_id}": { + "get": { + "operationId": "tables_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "tables" + ] + }, + "delete": { + "operationId": "tables_delete", + "responses": { + "204": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "tables" + ] + } + }, + "/tables/{table_id}/search": { + "get": { + "operationId": "tables_search_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "tables" + ] + }, + "post": { + "operationId": "tables_search_create", + "responses": { + "201": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "tables" + ] + } + }, + "/tables/{table_id}/summary": { + "get": { + "operationId": "tables_summary_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "table_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "tables" + ] + } + }, + "/workflows": { + "get": { + "operationId": "workflows_list", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [], + "tags": [ + "workflows" + ] + } + }, + "/workflows/{workflow_id}": { + "get": { + "operationId": "workflows_read", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "workflow_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "workflows" + ] + } + }, + "/workflows/{workflow_id}.wdl": { + "get": { + "operationId": "workflows_read_0", + "responses": { + "200": { + "description": "" + } + }, + "parameters": [ + { + "name": "workflow_id", + "required": true, + "in": "path", + "description": "", + "type": "string" + } + ], + "tags": [ + "workflows" + ] + } + } + }, + "securityDefinitions": { + "basic": { + "type": "basic" + } + } +} \ No newline at end of file From 05c5463a650b22d06196a055e8d3a7b68f1a1173 Mon Sep 17 00:00:00 2001 From: zxenia Date: Fri, 3 Jun 2022 10:15:47 -0400 Subject: [PATCH 03/59] update readme with swagger docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1ad229939..a394f5652 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,8 @@ Katsu Metadata Service is a service to store epigenomic metadata. ## REST API highlights +* Swagger schema docs can be found [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/bento-platform/katsu/develop/swagger_schema.json). + * Standard api delivers data in snake_case. To retrieved data in json compliant with phenopackets that uses camelCase append `?format=phenopackets` . From c164519ff389ca0dc9a9252e7098dfb5085f63f2 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 4 Apr 2022 09:22:04 -0400 Subject: [PATCH 04/59] WIP: use debugpy to run code --- chord_metadata_service/metadata/wsgi.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chord_metadata_service/metadata/wsgi.py b/chord_metadata_service/metadata/wsgi.py index bcfc02a7c..445532101 100644 --- a/chord_metadata_service/metadata/wsgi.py +++ b/chord_metadata_service/metadata/wsgi.py @@ -13,4 +13,13 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chord_metadata_service.metadata.settings') +# debugger section +from django.conf import settings + +if settings.DEBUG: + import debugpy + debugpy.listen(("0.0.0.0", 5678)) + print ('Attached') +# end debugger section + application = get_wsgi_application() From 22ca9b5a732024108e2e92625194c4bf5bae6337 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 4 Apr 2022 11:05:35 -0400 Subject: [PATCH 05/59] add launch.json config for vscode --- .gitignore | 7 +++++++ .vscode/launch.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index d0c5b9124..b16f47628 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,10 @@ env/ .idea/ *.swp *.swo +.vscode/* + +# Keep vscode debugger configuration +!.vscode/launch.json # coverage .coverage @@ -30,3 +34,6 @@ docs/_build # project custom config file config.json + +# MacOS +.DS_Store diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..6f5be1f23 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Run Django", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/manage.py", + "console": "integratedTerminal", + "args": [ + "runserver", + "--noreload", + "--nothreading" + ], + "django": true + }, + { + "name": "Python: Attach Debugger", + "type": "python", + "request": "attach", + "port": 5678, + "host": "0.0.0.0" + }, + ] + } \ No newline at end of file From f75a32d3c1b5f826b152e2331f4c43360e2c27a6 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 28 Jun 2022 14:24:44 -0400 Subject: [PATCH 06/59] parametrize debugger port --- chord_metadata_service/metadata/wsgi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chord_metadata_service/metadata/wsgi.py b/chord_metadata_service/metadata/wsgi.py index 445532101..a8a7372ab 100644 --- a/chord_metadata_service/metadata/wsgi.py +++ b/chord_metadata_service/metadata/wsgi.py @@ -10,16 +10,16 @@ import os from django.core.wsgi import get_wsgi_application +from django.conf import settings os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chord_metadata_service.metadata.settings') # debugger section -from django.conf import settings - if settings.DEBUG: import debugpy - debugpy.listen(("0.0.0.0", 5678)) - print ('Attached') + DEBUGGER_PORT = int(os.environ.get('DEBUGGER_PORT', 5678)) + debugpy.listen(("0.0.0.0", DEBUGGER_PORT)) + print('Attached') # end debugger section application = get_wsgi_application() From 904008beacddc7ba74ef54499f9e9fdcad5b9aa7 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 30 Jun 2022 16:34:19 +0000 Subject: [PATCH 07/59] convert overview counters to DB queries --- chord_metadata_service/restapi/api_views.py | 211 ++++++-------------- 1 file changed, 64 insertions(+), 147 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index f02eb2daa..443b53e1c 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -4,11 +4,11 @@ from collections import Counter from django.conf import settings from django.views.decorators.cache import cache_page +from django.db.models import Count from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes -from chord_metadata_service.phenopackets.api_views import PHENOPACKET_PREFETCH, PHENOPACKET_SELECT_REL from chord_metadata_service.restapi.utils import parse_individual_age from chord_metadata_service.chord.permissions import OverrideOrSuperUserOnly from chord_metadata_service.metadata.service_info import SERVICE_INFO @@ -44,173 +44,73 @@ def overview(_request): get: Overview of all Phenopackets in the database """ - phenopackets = pheno_models.Phenopacket.objects.all().prefetch_related(*PHENOPACKET_PREFETCH).select_related( - *PHENOPACKET_SELECT_REL) - - diseases_counter = Counter() - phenotypic_features_counter = Counter() - - biosamples_set = set() - individuals_set = set() - - biosamples_taxonomy = Counter() - biosamples_sampled_tissue = Counter() - - experiments_set = set() - experiments = { - "study_type": Counter(), - "experiment_type": Counter(), - "molecule": Counter(), - "library_strategy": Counter(), - "library_source": Counter(), - "library_selection": Counter(), - "library_layout": Counter(), - "extraction_protocol": Counter() - } - experiment_results_set = set() - experiment_results = { - "file_format": Counter(), - "data_output_type": Counter(), - "usage": Counter(), - } - instrument_set = set() - instruments = { - "platform": Counter(), - "model": Counter(), - } - - individuals_sex = Counter() - individuals_k_sex = Counter() - individuals_taxonomy = Counter() - individuals_age = Counter() - individuals_ethnicity = Counter() - # individuals_extra_prop = {} - # extra_prop_counter_dict = {} - - def count_individual(ind): - - individuals_set.add(ind.id) - individuals_sex.update((ind.sex,)) - individuals_k_sex.update((ind.karyotypic_sex,)) - # ethnicity is char field, check it's not empty - if ind.ethnicity != "": - individuals_ethnicity.update((ind.ethnicity,)) - - # Generic Counter on all available extra properties - # Comment out this count for now since it explodes the response - # if ind.extra_properties: - # for key in ind.extra_properties: - # # Declare new Counter() if it's not delcared - # if key not in extra_prop_counter_dict: - # extra_prop_counter_dict[key] = Counter() - # - # extra_prop_counter_dict[key].update((ind.extra_properties[key],)) - # individuals_extra_prop[key] = dict(extra_prop_counter_dict[key]) - - if ind.age is not None: - individuals_age.update((parse_individual_age(ind.age),)) - if ind.taxonomy is not None: - individuals_taxonomy.update((ind.taxonomy["label"],)) - - for p in phenopackets: - for b in p.biosamples.all(): - biosamples_set.add(b.id) - biosamples_sampled_tissue.update((b.sampled_tissue["label"],)) - - if b.taxonomy is not None: - biosamples_taxonomy.update((b.taxonomy["label"],)) - - for exp in b.experiment_set.all(): - experiments_set.add(exp.id) - - # local function to perform count across all fields in a given object - def count_object_fields(obj, container: dict): - for field, value in container.items(): - if getattr(obj, field) is not None: - container[field].update((getattr(obj, field),)) - - count_object_fields(exp, experiments) - - # query_set.many_to_many.all() - if exp.experiment_results.all() is not None: - for result in exp.experiment_results.all(): - experiment_results_set.add(result.id) - count_object_fields(result, experiment_results) - - if exp.instrument is not None: - instrument_set.add(exp.instrument.id) - count_object_fields(exp.instrument, instruments) - - # TODO decide what to do with nested Phenotypic features and Subject in Biosample - # This might serve future use cases that Biosample as a have main focus of study - # for pf in b.phenotypic_features.all(): - # phenotypic_features_counter.update((pf.pftype["label"],)) - - # according to Phenopackets standard - # phenotypic features also can be linked to a Biosample - # but we count them here because all our use cases current have them linked to Phenopacket not biosample - for d in p.diseases.all(): - diseases_counter.update((d.term["label"],)) - - for pf in p.phenotypic_features.all(): - phenotypic_features_counter.update((pf.pftype["label"],)) - - # Currently, phenopacket subject is required so we can assume it's not None - count_individual(p.subject) - - return Response({ - "phenopackets": phenopackets.count(), + phenopackets_count = pheno_models.Phenopacket.objects.all().count() + diseases_count = pheno_models.Disease.objects.all().count() + biosamples_count = pheno_models.Biosample.objects.all().count() + individuals_count = patients_models.Individual.objects.all().count() + experiments_count = experiments_models.Experiment.objects.all().count() + experiment_results_count = experiments_models.ExperimentResult.objects.all().count() + instruments_count = experiments_models.Instrument.objects.all().count() + phenotypic_features_count = pheno_models.PhenotypicFeature.objects.all().distinct('pftype').count() + + individuals_sex = stats_for_field(patients_models.Individual, "sex") + individuals_k_sex = stats_for_field(patients_models.Individual, "karyotypic_sex") + + r = { + "phenopackets": phenopackets_count, "data_type_specific": { "biosamples": { - "count": len(biosamples_set), - "taxonomy": dict(biosamples_taxonomy), - "sampled_tissue": dict(biosamples_sampled_tissue), + "count": biosamples_count, + "taxonomy": stats_for_field(pheno_models.Biosample, "taxonomy", "label"), + "sampled_tissue": stats_for_field(pheno_models.Biosample, "sampled_tissue", "label"), }, "diseases": { # count is a number of unique disease terms (not all diseases in the database) - "count": len(diseases_counter.keys()), - "term": dict(diseases_counter) + "count": diseases_count, + "term": stats_for_field(pheno_models.Disease, "term", "label") }, "individuals": { - "count": len(individuals_set), - "sex": {k: individuals_sex[k] for k in (s[0] for s in pheno_models.Individual.SEX)}, + "count": individuals_count, + "sex": {k: individuals_sex.get(k, 0) for k in (s[0] for s in pheno_models.Individual.SEX)}, "karyotypic_sex": { - k: individuals_k_sex[k] for k in (s[0] for s in pheno_models.Individual.KARYOTYPIC_SEX) + k: individuals_k_sex.get(k, 0) for k in (s[0] for s in pheno_models.Individual.KARYOTYPIC_SEX) }, - "taxonomy": dict(individuals_taxonomy), - "age": dict(individuals_age), - "ethnicity": dict(individuals_ethnicity), + "taxonomy": stats_for_field(patients_models.Individual, "taxonomy", "label"), + "age": dict(), # dict(individuals_age), + "ethnicity": stats_for_field(patients_models.Individual, "ethnicity"), # "extra_properties": dict(individuals_extra_prop), }, "phenotypic_features": { # count is a number of unique phenotypic feature types (not all pfs in the database) - "count": len(phenotypic_features_counter.keys()), - "type": dict(phenotypic_features_counter) + "count": phenotypic_features_count, + "type": stats_for_field(pheno_models.PhenotypicFeature, "pftype", "label") }, "experiments": { - "count": len(experiments_set), - "study_type": dict(experiments["study_type"]), - "experiment_type": dict(experiments["experiment_type"]), - "molecule": dict(experiments["molecule"]), - "library_strategy": dict(experiments["library_strategy"]), - "library_source": dict(experiments["library_source"]), - "library_selection": dict(experiments["library_selection"]), - "library_layout": dict(experiments["library_layout"]), - "extraction_protocol": dict(experiments["extraction_protocol"]), + "count": experiments_count, + "study_type": stats_for_field(experiments_models.Experiment, "study_type"), + "experiment_type": stats_for_field(experiments_models.Experiment, "experiment_type"), + "molecule": stats_for_field(experiments_models.Experiment, "molecule"), + "library_strategy": stats_for_field(experiments_models.Experiment, "library_strategy"), + "library_source": stats_for_field(experiments_models.Experiment, "library_source"), + "library_selection": stats_for_field(experiments_models.Experiment, "library_selection"), + "library_layout": stats_for_field(experiments_models.Experiment, "library_layout"), + "extraction_protocol": stats_for_field(experiments_models.Experiment, "extraction_protocol"), }, "experiment_results": { - "count": len(experiment_results_set), - "file_format": dict(experiment_results["file_format"]), - "data_output_type": dict(experiment_results["data_output_type"]), - "usage": dict(experiment_results["usage"]) + "count": experiment_results_count, + "file_format": stats_for_field(experiments_models.ExperimentResult, "file_format"), + "data_output_type": stats_for_field(experiments_models.ExperimentResult, "data_output_type"), + "usage": stats_for_field(experiments_models.ExperimentResult, "usage") }, "instruments": { - "count": len(instrument_set), - "platform": dict(instruments["platform"]), - "model": dict(instruments["model"]) + "count": instruments_count, + "platform": stats_for_field(experiments_models.Instrument, "platform"), + "model": stats_for_field(experiments_models.Instrument, "model") }, } - }) + } + + return Response(r) # Cache page for the requested url for 2 hours @@ -452,3 +352,20 @@ def sort_numeric_values_into_bins(values: dict, bin_size: int = 10, threshold: i values_in_bins[f"{bin_key}"] = keys_sum # remove data if count < 5 return {k: v for k, v in values_in_bins.items() if v > threshold} + + +def stats_for_field(model, field: str, label_field: str = None): + # values() restrict the table of results to this field + # annotate() creates a `total` column for the aggregation + # Count() aggregates the results by performing a group by on the field + query_set = model.objects.all().values(field).annotate(total=Count(field)) + stats = dict() + for item in list(query_set): + key = item[field] + if key is None: + continue + + if label_field: + key = item[field][label_field] + stats[key] = item['total'] + return stats From 98ff2dd26d65567b8e3ea460a5490ed5dce9694a Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 30 Jun 2022 16:54:26 +0000 Subject: [PATCH 08/59] implement binned ages --- chord_metadata_service/restapi/api_views.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 443b53e1c..a2c34da1c 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -4,7 +4,8 @@ from collections import Counter from django.conf import settings from django.views.decorators.cache import cache_page -from django.db.models import Count +from django.db.models import Count, F, Func, IntegerField +from django.db.models.functions import Cast from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes @@ -76,7 +77,7 @@ def overview(_request): k: individuals_k_sex.get(k, 0) for k in (s[0] for s in pheno_models.Individual.KARYOTYPIC_SEX) }, "taxonomy": stats_for_field(patients_models.Individual, "taxonomy", "label"), - "age": dict(), # dict(individuals_age), + "age": get_field_bins(patients_models.Individual, 'age_numeric', 10), # TODO handle when age is a range "ethnicity": stats_for_field(patients_models.Individual, "ethnicity"), # "extra_properties": dict(individuals_extra_prop), }, @@ -369,3 +370,18 @@ def stats_for_field(model, field: str, label_field: str = None): key = item[field][label_field] stats[key] = item['total'] return stats + + +def get_field_bins(model, field, bin_size): + # creates a new field "binned" by substracting the modulo by bin size to + # the value which requires binning (e.g. 28 => 28 - 28 % 10 = 20) + # cast to integer to avoid numbers such as 60.00 if that was a decimal, + # and aggregate over this value. + query_set = model.objects.all().annotate( + binned=Cast( + F(field) - Func(F(field), bin_size, function="MOD"), + IntegerField() + ) + ).values('binned').annotate(total=Count('binned')) + stats = {item['binned']: item['total'] for item in list(query_set)} + return stats From 2ae7dc021a89e4eaf125839f1194703cc2e81428 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 5 Jul 2022 18:16:51 +0000 Subject: [PATCH 09/59] add test for age computation in overview --- chord_metadata_service/phenopackets/tests/constants.py | 6 ++++-- chord_metadata_service/restapi/tests/test_api.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/phenopackets/tests/constants.py b/chord_metadata_service/phenopackets/tests/constants.py index 4f583c04b..b8cd59662 100644 --- a/chord_metadata_service/phenopackets/tests/constants.py +++ b/chord_metadata_service/phenopackets/tests/constants.py @@ -56,6 +56,8 @@ "age": { "age": "P45Y" }, + "age_numeric": 45.00, + "age_unit": "years", "extra_properties": { "education": "Bachelor's Degree" } @@ -67,10 +69,10 @@ "sex": "FEMALE", "age": { "start": { - "age": "P40Y" + "age": "P30Y" }, "end": { - "age": "P45Y" + "age": "P35Y" } } } diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 24806c7d0..35a2bf25e 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -76,6 +76,7 @@ def test_overview(self): self.assertEqual(response_obj['phenopackets'], 2) self.assertEqual(response_obj['data_type_specific']['individuals']['count'], 2) self.assertIsInstance(response_obj['data_type_specific']['individuals']['age'], dict) + self.assertDictContainsSubset({'40': 1, '30': 1}, response_obj['data_type_specific']['individuals']['age']) self.assertEqual(response_obj['data_type_specific']['biosamples']['count'], 2) self.assertEqual(response_obj['data_type_specific']['phenotypic_features']['count'], 1) self.assertEqual(response_obj['data_type_specific']['diseases']['count'], 1) From 34b9f928aa770f78fc40a6c82a53cd3ab4541e5d Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 5 Jul 2022 18:17:26 +0000 Subject: [PATCH 10/59] compute age stats when age_numeric is missing --- chord_metadata_service/restapi/api_views.py | 28 ++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index a2c34da1c..bed655b7b 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -24,6 +24,8 @@ logger = logging.getLogger("restapi_api_views") logger.setLevel(logging.INFO) +OVERVIEW_AGE_BIN_SIZE = 10 + @api_view() @permission_classes([AllowAny]) @@ -54,9 +56,22 @@ def overview(_request): instruments_count = experiments_models.Instrument.objects.all().count() phenotypic_features_count = pheno_models.PhenotypicFeature.objects.all().distinct('pftype').count() + # Sex related fields stats are precomputed here and post processed later + # to include missing values inferred from the schema individuals_sex = stats_for_field(patients_models.Individual, "sex") individuals_k_sex = stats_for_field(patients_models.Individual, "karyotypic_sex") + # age_numeric is computed at ingestion time of phenopackets. On some instances + # it might be unavailable and as a fallback must be computed from the age JSON field which + # has two alternate formats (hence more complex and slower to process) + individuals_age = get_field_bins(patients_models.Individual, "age_numeric", OVERVIEW_AGE_BIN_SIZE) + if None in individuals_age: # fallback + del individuals_age[None] + individuals_age = Counter(individuals_age) + individuals_age.update( + compute_binned_ages(OVERVIEW_AGE_BIN_SIZE) # single update instead of creating iterables in a loop + ) + r = { "phenopackets": phenopackets_count, "data_type_specific": { @@ -77,7 +92,7 @@ def overview(_request): k: individuals_k_sex.get(k, 0) for k in (s[0] for s in pheno_models.Individual.KARYOTYPIC_SEX) }, "taxonomy": stats_for_field(patients_models.Individual, "taxonomy", "label"), - "age": get_field_bins(patients_models.Individual, 'age_numeric', 10), # TODO handle when age is a range + "age": individuals_age, "ethnicity": stats_for_field(patients_models.Individual, "ethnicity"), # "extra_properties": dict(individuals_extra_prop), }, @@ -385,3 +400,14 @@ def get_field_bins(model, field, bin_size): ).values('binned').annotate(total=Count('binned')) stats = {item['binned']: item['total'] for item in list(query_set)} return stats + + +def compute_binned_ages(bin_size): + a = pheno_models.Individual.objects.filter(age_numeric__isnull=True).values('age') + binned_ages = [] + for r in a.iterator(): # reduce memory footprint (no caching) + if r["age"] is None: + continue + age = parse_individual_age(r["age"]) + binned_ages.append(age - age % OVERVIEW_AGE_BIN_SIZE) + return binned_ages From 79b30c2b49777335d05b3427c79547a73d77079b Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 5 Jul 2022 22:29:35 -0400 Subject: [PATCH 11/59] missing joins for stats --- chord_metadata_service/restapi/api_views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index bed655b7b..bbd749aa5 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -83,7 +83,7 @@ def overview(_request): "diseases": { # count is a number of unique disease terms (not all diseases in the database) "count": diseases_count, - "term": stats_for_field(pheno_models.Disease, "term", "label") + "term": stats_for_field(pheno_models.Phenopacket, "diseases__term__label") }, "individuals": { "count": individuals_count, @@ -120,8 +120,8 @@ def overview(_request): }, "instruments": { "count": instruments_count, - "platform": stats_for_field(experiments_models.Instrument, "platform"), - "model": stats_for_field(experiments_models.Instrument, "model") + "platform": stats_for_field(experiments_models.Experiment, "instrument__platform"), + "model": stats_for_field(experiments_models.Experiment, "instrument__model") }, } } From d8146f19faadd4ca449fef7d234919f7e02b33b3 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 6 Jul 2022 03:09:21 +0000 Subject: [PATCH 12/59] add more experiments to tests --- .../experiments/tests/constants.py | 7 +++++- .../restapi/tests/test_api.py | 23 ++++++++++--------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/chord_metadata_service/experiments/tests/constants.py b/chord_metadata_service/experiments/tests/constants.py index 703a59264..0bc457aa2 100644 --- a/chord_metadata_service/experiments/tests/constants.py +++ b/chord_metadata_service/experiments/tests/constants.py @@ -1,6 +1,11 @@ +num_experiment = 0 + + def valid_experiment(biosample, instrument=None, table=None): + global num_experiment + num_experiment += 1 return { - "id": "experiment:1", + "id": f"experiment:{num_experiment}", "study_type": "Whole genome Sequencing", "experiment_type": "Chromatin Accessibility", "experiment_ontology": [{"id": "ontology:1", "label": "Ontology term 1"}], diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 35a2bf25e..c5b0c516e 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -64,6 +64,7 @@ def setUp(self) -> None: # experiments self.instrument = exp_m.Instrument.objects.create(**exp_c.valid_instrument()) self.experiment = exp_m.Experiment.objects.create(**exp_c.valid_experiment(self.biosample_1, self.instrument)) + exp_m.Experiment.objects.create(**exp_c.valid_experiment(self.biosample_2, self.instrument)) self.experiment_result = exp_m.ExperimentResult.objects.create(**exp_c.valid_experiment_result()) self.experiment.experiment_results.set([self.experiment_result]) @@ -81,17 +82,17 @@ def test_overview(self): self.assertEqual(response_obj['data_type_specific']['phenotypic_features']['count'], 1) self.assertEqual(response_obj['data_type_specific']['diseases']['count'], 1) # experiments - self.assertEqual(response_obj['data_type_specific']['experiments']['count'], 1) - self.assertEqual(response_obj['data_type_specific']['experiments']['study_type']['Whole genome Sequencing'], 1) + self.assertEqual(response_obj['data_type_specific']['experiments']['count'], 2) + self.assertEqual(response_obj['data_type_specific']['experiments']['study_type']['Whole genome Sequencing'], 2) self.assertEqual( - response_obj['data_type_specific']['experiments']['experiment_type']['Chromatin Accessibility'], 1 + response_obj['data_type_specific']['experiments']['experiment_type']['Chromatin Accessibility'], 2 ) - self.assertEqual(response_obj['data_type_specific']['experiments']['molecule']['total RNA'], 1) - self.assertEqual(response_obj['data_type_specific']['experiments']['library_strategy']['Bisulfite-Seq'], 1) - self.assertEqual(response_obj['data_type_specific']['experiments']['library_source']['Genomic'], 1) - self.assertEqual(response_obj['data_type_specific']['experiments']['library_selection']['PCR'], 1) - self.assertEqual(response_obj['data_type_specific']['experiments']['library_layout']['Single'], 1) - self.assertEqual(response_obj['data_type_specific']['experiments']['extraction_protocol']['NGS'], 1) + self.assertEqual(response_obj['data_type_specific']['experiments']['molecule']['total RNA'], 2) + self.assertEqual(response_obj['data_type_specific']['experiments']['library_strategy']['Bisulfite-Seq'], 2) + self.assertEqual(response_obj['data_type_specific']['experiments']['library_source']['Genomic'], 2) + self.assertEqual(response_obj['data_type_specific']['experiments']['library_selection']['PCR'], 2) + self.assertEqual(response_obj['data_type_specific']['experiments']['library_layout']['Single'], 2) + self.assertEqual(response_obj['data_type_specific']['experiments']['extraction_protocol']['NGS'], 2) self.assertEqual(response_obj['data_type_specific']['experiment_results']['count'], 1) self.assertEqual(response_obj['data_type_specific']['experiment_results']['file_format']['VCF'], 1) self.assertEqual( @@ -99,8 +100,8 @@ def test_overview(self): ) self.assertEqual(response_obj['data_type_specific']['experiment_results']['usage']['download'], 1) self.assertEqual(response_obj['data_type_specific']['instruments']['count'], 1) - self.assertEqual(response_obj['data_type_specific']['instruments']['platform']['Illumina'], 1) - self.assertEqual(response_obj['data_type_specific']['instruments']['model']['Illumina HiSeq 4000'], 1) + self.assertEqual(response_obj['data_type_specific']['instruments']['platform']['Illumina'], 2) + self.assertEqual(response_obj['data_type_specific']['instruments']['model']['Illumina HiSeq 4000'], 2) class McodeOverviewTest(APITestCase): From 5b1dcb83605d0f3ba539306ff97fecd50eefa4c5 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 6 Jul 2022 13:45:27 +0000 Subject: [PATCH 13/59] fix: duplicated labels on distinct fields counted once By aggregating results on the label directly the counts from the database are made exact. The code for dictionnary generation can be simplified --- chord_metadata_service/restapi/api_views.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index bbd749aa5..a1f9dfd28 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -77,8 +77,8 @@ def overview(_request): "data_type_specific": { "biosamples": { "count": biosamples_count, - "taxonomy": stats_for_field(pheno_models.Biosample, "taxonomy", "label"), - "sampled_tissue": stats_for_field(pheno_models.Biosample, "sampled_tissue", "label"), + "taxonomy": stats_for_field(pheno_models.Biosample, "taxonomy__label"), + "sampled_tissue": stats_for_field(pheno_models.Biosample, "sampled_tissue__label"), }, "diseases": { # count is a number of unique disease terms (not all diseases in the database) @@ -91,15 +91,14 @@ def overview(_request): "karyotypic_sex": { k: individuals_k_sex.get(k, 0) for k in (s[0] for s in pheno_models.Individual.KARYOTYPIC_SEX) }, - "taxonomy": stats_for_field(patients_models.Individual, "taxonomy", "label"), + "taxonomy": stats_for_field(patients_models.Individual, "taxonomy__label"), "age": individuals_age, "ethnicity": stats_for_field(patients_models.Individual, "ethnicity"), - # "extra_properties": dict(individuals_extra_prop), }, "phenotypic_features": { # count is a number of unique phenotypic feature types (not all pfs in the database) "count": phenotypic_features_count, - "type": stats_for_field(pheno_models.PhenotypicFeature, "pftype", "label") + "type": stats_for_field(pheno_models.PhenotypicFeature, "pftype__label") }, "experiments": { "count": experiments_count, @@ -370,19 +369,16 @@ def sort_numeric_values_into_bins(values: dict, bin_size: int = 10, threshold: i return {k: v for k, v in values_in_bins.items() if v > threshold} -def stats_for_field(model, field: str, label_field: str = None): - # values() restrict the table of results to this field +def stats_for_field(model, field: str): + # values() restrict the table of results to this COLUMN # annotate() creates a `total` column for the aggregation - # Count() aggregates the results by performing a group by on the field + # Count() aggregates the results by performing a GROUP BY on the field query_set = model.objects.all().values(field).annotate(total=Count(field)) stats = dict() for item in list(query_set): key = item[field] if key is None: continue - - if label_field: - key = item[field][label_field] stats[key] = item['total'] return stats From 36f03d5da954ddc315b2e532e24780d81ad02682 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 6 Jul 2022 16:53:47 +0000 Subject: [PATCH 14/59] fix test It was breaking on another test where the expected experiment id could not be found due to a change in nums. --- chord_metadata_service/experiments/tests/constants.py | 7 +------ chord_metadata_service/restapi/api_views.py | 11 ++++++++--- chord_metadata_service/restapi/tests/test_api.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chord_metadata_service/experiments/tests/constants.py b/chord_metadata_service/experiments/tests/constants.py index 0bc457aa2..e5cc30545 100644 --- a/chord_metadata_service/experiments/tests/constants.py +++ b/chord_metadata_service/experiments/tests/constants.py @@ -1,9 +1,4 @@ -num_experiment = 0 - - -def valid_experiment(biosample, instrument=None, table=None): - global num_experiment - num_experiment += 1 +def valid_experiment(biosample, instrument=None, table=None, num_experiment=1): return { "id": f"experiment:{num_experiment}", "study_type": "Whole genome Sequencing", diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index a1f9dfd28..47d5d1117 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -375,11 +375,16 @@ def stats_for_field(model, field: str): # Count() aggregates the results by performing a GROUP BY on the field query_set = model.objects.all().values(field).annotate(total=Count(field)) stats = dict() - for item in list(query_set): + for item in query_set: key = item[field] if key is None: continue - stats[key] = item['total'] + + key = key.strip() + if key == "": + continue + + stats[key] = item["total"] return stats @@ -394,7 +399,7 @@ def get_field_bins(model, field, bin_size): IntegerField() ) ).values('binned').annotate(total=Count('binned')) - stats = {item['binned']: item['total'] for item in list(query_set)} + stats = {item['binned']: item['total'] for item in query_set} return stats diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index c5b0c516e..6f76601d5 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -64,7 +64,7 @@ def setUp(self) -> None: # experiments self.instrument = exp_m.Instrument.objects.create(**exp_c.valid_instrument()) self.experiment = exp_m.Experiment.objects.create(**exp_c.valid_experiment(self.biosample_1, self.instrument)) - exp_m.Experiment.objects.create(**exp_c.valid_experiment(self.biosample_2, self.instrument)) + exp_m.Experiment.objects.create(**exp_c.valid_experiment(self.biosample_2, self.instrument, num_experiment=2)) self.experiment_result = exp_m.ExperimentResult.objects.create(**exp_c.valid_experiment_result()) self.experiment.experiment_results.set([self.experiment_result]) From 064c09a28e3178ce545d2e1a24cc9b149c5c6393 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 6 Jul 2022 17:27:36 +0000 Subject: [PATCH 15/59] fix diseases count Was also counting diseases defined in the DB but not rereferenced in any phenopackets. --- chord_metadata_service/restapi/api_views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 47d5d1117..6993c9095 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -48,7 +48,6 @@ def overview(_request): Overview of all Phenopackets in the database """ phenopackets_count = pheno_models.Phenopacket.objects.all().count() - diseases_count = pheno_models.Disease.objects.all().count() biosamples_count = pheno_models.Biosample.objects.all().count() individuals_count = patients_models.Individual.objects.all().count() experiments_count = experiments_models.Experiment.objects.all().count() @@ -61,6 +60,9 @@ def overview(_request): individuals_sex = stats_for_field(patients_models.Individual, "sex") individuals_k_sex = stats_for_field(patients_models.Individual, "karyotypic_sex") + diseases_stats = stats_for_field(pheno_models.Phenopacket, "diseases__term__label") + diseases_count = len(diseases_stats) + # age_numeric is computed at ingestion time of phenopackets. On some instances # it might be unavailable and as a fallback must be computed from the age JSON field which # has two alternate formats (hence more complex and slower to process) @@ -83,7 +85,7 @@ def overview(_request): "diseases": { # count is a number of unique disease terms (not all diseases in the database) "count": diseases_count, - "term": stats_for_field(pheno_models.Phenopacket, "diseases__term__label") + "term": diseases_stats }, "individuals": { "count": individuals_count, From 384baa93b03d71efd7a118094dd8127b05070f35 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 7 Jul 2022 17:31:02 +0000 Subject: [PATCH 16/59] implement search field config response --- chord_metadata_service/metadata/settings.py | 6 ++++++ chord_metadata_service/restapi/api_views.py | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/chord_metadata_service/metadata/settings.py b/chord_metadata_service/metadata/settings.py index 281e02e95..fd2e38f72 100644 --- a/chord_metadata_service/metadata/settings.py +++ b/chord_metadata_service/metadata/settings.py @@ -294,6 +294,12 @@ def get_secret(path): else: CONFIG_FIELDS = {} +if os.path.isfile(os.path.join(BASE_DIR, 'config.new.json')): + with open(os.path.join(BASE_DIR, 'config.new.json')) as config_file: + CONFIG_PUBLIC = json.load(config_file) +else: + CONFIG_PUBLIC = {} + # Public response when there is no enough data that passes the project-custom threshold INSUFFICIENT_DATA_AVAILABLE = {"message": "Insufficient data available."} diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 6993c9095..1174f6ca3 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -217,10 +217,18 @@ def mcode_overview(_request): def public_search_fields(_request): """ get: - Return public search fields + Return public search fields with their configuration """ - if settings.CONFIG_FIELDS: - return Response(settings.CONFIG_FIELDS) + if settings.CONFIG_PUBLIC: + search_conf = settings.CONFIG_PUBLIC["search"] + field_conf = settings.CONFIG_PUBLIC["fields"] + r = [ + { + **section, + "fields": [field_conf[f] for f in section["fields"]] + } for section in search_conf + ] + return Response(r) else: return Response(settings.NO_PUBLIC_FIELDS_CONFIGURED) From ab3dac4a3e9377c89f469a4e61d26e6171ec9fa1 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 12 Jul 2022 13:25:11 +0000 Subject: [PATCH 17/59] WIP: new config file for categorical stats --- chord_metadata_service/config.new.json | 99 ++++++++++++++++ chord_metadata_service/restapi/api_views.py | 118 +++++++++++++++++++- chord_metadata_service/restapi/urls.py | 3 +- 3 files changed, 217 insertions(+), 3 deletions(-) create mode 100644 chord_metadata_service/config.new.json diff --git a/chord_metadata_service/config.new.json b/chord_metadata_service/config.new.json new file mode 100644 index 000000000..794142a1a --- /dev/null +++ b/chord_metadata_service/config.new.json @@ -0,0 +1,99 @@ +{ + "overview": [ + { + "section_title": "Demographics", + "charts": [ + {"field": "age", "chart_type": "bar"}, + {"field": "sex", "chart_type": "pie"} + ] + }, + { + "section_title": "Experiments", + "charts": [ + {"field": "experiment_type", "chart_type": "pie"} + ] + } + ], + "search": [ + { + "section_title": "Demographics", + "fields": ["age", "sex"] + } + ], + "fields": { + "age": { + "id": "individual/age_numeric", + "title": "Age", + "description": "Age at arrival", + "datatype": "number", + "config": { + "bin_size": 10, + "taper_left": 10, + "taper_right": 100, + "units": "years", + "minimum": 0, + "maximum": 100 + } + }, + "sex": { + "id": "individual/sex", + "title": "Sex", + "description": "Sex at birth", + "datatype": "string", + "config": { + "enum": [ + "Male", + "Female" + ] + } + }, + "experiment_type": { + "id": "experiment/experiment_type", + "title": "Experiment Types", + "description": "Types of experiments performed on a sample", + "datatype": "string", + "config": { + "enum": ["DNA Methylation", "mRNA-Seq", "smRNA-Seq", "RNA-Seq", "WES", "Other"] + } + }, + "date_of_consent": { + "id": "individual/extra_properties/date_of_consent", + "title": "Verbal consent date", + "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", + "datatype": "date", + "config": { + "bin_by": "month" + } + }, + "type_partic": { + "id": "individual/extra_properties/type_partic", + "title": "Participant type", + "description": "Has the patient been hospitalized or is the patient seen on as an outpatient?", + "datatype": "string", + "config": { + "enum": [ + "Hospitalized", + "Outpatient" + ] + } + }, + "mobility": { + "id": "individual/extra_properties/mobility", + "title": "Functional status", + "description": "Mobility", + "datatype": "string", + "config": { + "enum": [ + "I have no problems in walking about", + "I have slight problems in walking about", + "I have moderate problems in walking about", + "I have severe problems in walking about", + "I am unable to walk about" + ] + } + } + }, + "rules": { + "count_threshold": 5 + } +} \ No newline at end of file diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 1174f6ca3..a578822ac 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -2,6 +2,8 @@ import logging from collections import Counter +from typing import TypedDict, Mapping + from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, F, Func, IntegerField @@ -27,6 +29,11 @@ OVERVIEW_AGE_BIN_SIZE = 10 +class BinnedStats(TypedDict): + labels: list[str] + values: list[int] + + @api_view() @permission_classes([AllowAny]) def service_info(_request): @@ -362,6 +369,108 @@ def public_overview(_request): return Response(settings.NO_PUBLIC_DATA_AVAILABLE) +@api_view(["GET"]) +@permission_classes([AllowAny]) +def public_overview_new(_request): + """ + get: + Overview of all public data in the database + """ + + if not settings.CONFIG_PUBLIC: + return Response(settings.NO_PUBLIC_DATA_AVAILABLE) + + # Datasets provenance metadata + datasets = chord_models.Dataset.objects.values( + "title", "description", "contact_info", + "dates", "stored_in", "spatial_coverage", + "types", "privacy", "distributions", + "dimensions", "primary_publications", "citations", + "produced_by", "creators", "licenses", + "acknowledges", "keywords", "version", + "extra_properties" + ) + + # Parse the public config to gather data for each field defined in the + # overview + + fields = [field for section in settings.CONFIG_PUBLIC["overview"] for field in section["fields"]] + response = { + "datasets": datasets, + "layout": settings.CONFIG_PUBLIC["overview"], + "fields": {} + } + + for field in fields: + field_props = settings.CONFIG_PUBLIC["fields"][field] + response["fields"][field] = { + **field_props, + "data": {} + } + if field_props["datatype"] == "string": + stats = get_categorical_stats(field_props) + elif field_props["datatype"] == "number": + stats = get_range_stats(field_props) + elif field_props["datatype"] == "date": + stats = get_date_stats(field_props) + + response["fields"][field]["data"] = stats + + return Response(response) + + +def get_categorical_stats(field_props) -> BinnedStats: + """ + Fetches statistics for a given categorical field and apply privacy policies + """ + model, field_name = get_model_and_field(field_props["id"]) + stats = stats_for_field(model, field_name, add_missing=True) + + # Enforce values order from config and apply policies + threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] + labels: list[str] = field_props["config"]["enum"] + values: list[int] = [] + + for category in labels: + v = stats.get(category, 0) + if v and v < threshold: + v = 0 + values.append(v) + + if stats["missing"] > 0: + labels.append("missing") + values.append(stats["missing"]) + + return { + "labels": labels, + "values": values + } + + +def get_date_stats(field_props): + pass + + +def get_range_stats(field_props): + pass + + +def get_model_and_field(field_id: str): + model_name, *field_path = field_id.split("/") + + if model_name == "individual": + model = pheno_models.Individual + elif model_name == "experiment": + model = experiments_models.Experiment + else: + msg = f"Accessing field on model {model_name} not implemented" + logger.error(msg) + raise NotImplementedError(msg) + + field_name = "__".join(field_path) + return model, field_name + + def sort_numeric_values_into_bins(values: dict, bin_size: int = 10, threshold: int = 5): values_in_bins = {} # convert keys to int @@ -379,12 +488,12 @@ def sort_numeric_values_into_bins(values: dict, bin_size: int = 10, threshold: i return {k: v for k, v in values_in_bins.items() if v > threshold} -def stats_for_field(model, field: str): +def stats_for_field(model, field: str, add_missing=False) -> Mapping(str, int): # values() restrict the table of results to this COLUMN # annotate() creates a `total` column for the aggregation # Count() aggregates the results by performing a GROUP BY on the field query_set = model.objects.all().values(field).annotate(total=Count(field)) - stats = dict() + stats: Mapping(str, int) = dict() for item in query_set: key = item[field] if key is None: @@ -395,6 +504,11 @@ def stats_for_field(model, field: str): continue stats[key] = item["total"] + + if add_missing: + isnull_filter = {f"{field}__isnull": True} + stats['missing'] = model.objects.all().values(field).filter(**isnull_filter).count() + return stats diff --git a/chord_metadata_service/restapi/urls.py b/chord_metadata_service/restapi/urls.py index 9342d9977..6559b9c67 100644 --- a/chord_metadata_service/restapi/urls.py +++ b/chord_metadata_service/restapi/urls.py @@ -12,7 +12,7 @@ BiosampleSampledTissueAutocomplete ) from chord_metadata_service.resources import api_views as resources_views -from .api_views import overview, mcode_overview, public_search_fields, public_overview +from .api_views import overview, mcode_overview, public_search_fields, public_overview, public_overview_new __all__ = ["router", "urlpatterns"] @@ -86,4 +86,5 @@ path('public_search_fields', public_search_fields, name='public-search-fields',), # public overview path('public_overview', public_overview, name='public-overview',), + path('public_overview_new', public_overview_new, name='public-overview-new',) ] From 81ae80b2d485a13f2796b69725796c91606b2dba Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 13 Jul 2022 00:30:48 +0000 Subject: [PATCH 18/59] wip: bin by date string --- chord_metadata_service/restapi/api_views.py | 86 ++++++++++++++++++++- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index a578822ac..b240adb0a 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -3,11 +3,12 @@ from collections import Counter from typing import TypedDict, Mapping +from calendar import month_abbr from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, F, Func, IntegerField -from django.db.models.functions import Cast +from django.db.models.functions import Cast, Substr from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes @@ -448,14 +449,93 @@ def get_categorical_stats(field_props) -> BinnedStats: def get_date_stats(field_props): - pass + """ + Fetches statistics for a given date field, fill the gaps in the date range + and apply privacy policies. + Note that dates within a JSON are stored as strings, not instances of datetime. + TODO: for now, only dates in extra_properties are handled. Handle dates as + regular fields when needed. + TODO: for now only dates binned by month are handled + """ + LENGTH_Y_M = 4 + 1 + 2 # dates stored as yyyy-mm-dd + DATE_Y_M = 'date' + threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] + + if field_props["config"]["bin_by"] != "month": + msg = f"Binning dates by `{field_props['config']['bin_by']}` method not implemented" + logger.error(msg) + raise NotImplementedError(msg) + + model, field_name = get_model_and_field(field_props["id"]) + + if "extra_properties" not in field_name: + msg = "Binning date-like fields that are not in extra-properties is not implemented" + logger.error(msg) + raise NotImplementedError(msg) + + query_set = model.objects.all()\ + .annotate(date=Substr(field_name, 1, LENGTH_Y_M))\ + .values(DATE_Y_M)\ + .annotate(total=Count(DATE_Y_M))\ + .order_by(DATE_Y_M) # Note: lexical sort works on ISO dates + + stats: Mapping(str, int) = dict() + has_missing = False + for item in query_set: + key = item[DATE_Y_M] + if key is None: + has_missing = True + continue + + key = key.strip() + if key == "": + continue + + stats[key] = item["total"] if item["total"] > threshold else 0 + + # All the bins between start and end date must be represented + labels: list(str) = [] + values: list(int) = [] + if len(stats): + keys = list(stats) + for year, month in monthly_generator(keys[0], keys[-1]): + key = f"{year}-{month}" + label = f"{month_abbr[month].capitalize()} {year}" # convert key as yyyy-mm to `abbreviated month yyyy` + labels.append(label) + values.appenf(stats.get(key, 0)) + + # Append missing items if any + if has_missing: + isnull_filter = {f"{field_name}__isnull": True} + v = model.objects.all().values(field_name).filter(**isnull_filter).count() + labels.append("missing") + values.append(v) + + return { + "labels": labels, + "values": values + } def get_range_stats(field_props): pass -def get_model_and_field(field_id: str): +def monthly_generator(start: str, end: str) -> (int, int): + """ + generator of tuples (year nb, month nb) from a start date to an end date + as ISO formated strings `yyyy-mm` + """ + start_year, start_month = tuple([int(k) for k in start.split("-")]) + end_year, end_month = tuple([int(k) for k in end.split("-")]) + last_month_nb = (end_year - start_year) * 12 + end_month + for month_nb in range(start_month, last_month_nb): + year = start_year + month_nb // 12 + month = month_nb % 12 + yield year, month + + +def get_model_and_field(field_id: str) -> tuple(any, str): model_name, *field_path = field_id.split("/") if model_name == "individual": From 17eb07ba4b1e54bfe9bf1751000725510a9111c8 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 13 Jul 2022 00:46:37 +0000 Subject: [PATCH 19/59] wip: range stats --- chord_metadata_service/restapi/api_views.py | 76 ++++++++++++++++++++- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index b240adb0a..dca1cfeb9 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -7,7 +7,7 @@ from django.conf import settings from django.views.decorators.cache import cache_page -from django.db.models import Count, F, Func, IntegerField +from django.db.models import Count, F, Func, CharField, IntegerField, Case, When, Value from django.db.models.functions import Cast, Substr from rest_framework.permissions import AllowAny from rest_framework.response import Response @@ -518,10 +518,80 @@ def get_date_stats(field_props): def get_range_stats(field_props): - pass + threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] + model, field = get_model_and_field(field_props["id"]) + + # Generate a list of When conditions that return a label for the given bin. + # This is equivalent to an SQL CASE statement. + whens = [When(**{f"{field}__gte": floor}, **{f"{field}__lt": ceil}, then=Value(label)) + for floor, ceil, label in labelled_range_generator(field_props)] + + query_set = model.objects\ + .values(label=Case(*whens, default=Value("missing"), output_field=CharField()))\ + .annotate(total=Count("label")) + + stats: Mapping(str, int) = dict() + for item in query_set: + key = item["label"] + stats[key] = item["total"] if item["total"] > threshold else 0 + + # All the bins between start and end must be represented and ordered + labels: list(str) = [] + values: list(int) = [] + for floor, ceil, label in labelled_range_generator(field_props): + labels.append(label) + values.append(stats.get(label, 0)) + + if "missing" in stats: + labels.append("missing") + values.append(stats["missing"]) + + return { + "labels": labels, + "values": values + } + + +def labelled_range_generator(field_props) -> tuple(int, int, str): + """ + Note: limited to operations on integer values for simplicity + A word of caution: when implementing handling of floating point values, + be aware of string format (might need to add precision to config?) computations + of modulo and lack of support for ranges. + """ + + c = field_props["config"] + minimum = int(c["minimum"]) + maximum = int(c["maximum"]) + taper_left = int(c["taper_left"]) + taper_right = int(c["taper_right"]) + bin_size = int(c["bin_size"]) + + # check prerequisites + # Note: it raises an error as it reflects an error in the config file + if maximum < minimum: + raise ValueError(f"Wrong min/max values in config: {field_props}") + + if (taper_right < taper_left + or minimum > taper_left + or taper_right > maximum): + raise ValueError(f"Wrong taper values in config: {field_props}") + + if (taper_right - taper_left) % bin_size: + raise ValueError(f"Range between taper values is not a multiple of bin_size: {field_props}") + + # start generator + if minimum != taper_left: + yield minimum, taper_left, f"{minimum}-{taper_left}" + + for v in range(taper_left, taper_right, bin_size): + yield v, v + bin_size, f"{v}-{v + bin_size}" + + if maximum != taper_right: + yield taper_right, maximum, f"≥ {taper_right}" -def monthly_generator(start: str, end: str) -> (int, int): +def monthly_generator(start: str, end: str) -> tuple(int, int): """ generator of tuples (year nb, month nb) from a start date to an end date as ISO formated strings `yyyy-mm` From 43edcc09ce476f333d0ce551fc2c19ddcb62fff4 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 13 Jul 2022 13:52:51 +0000 Subject: [PATCH 20/59] fixes (typings, properties) --- chord_metadata_service/restapi/api_views.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index dca1cfeb9..ad46bc226 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -31,8 +31,8 @@ class BinnedStats(TypedDict): - labels: list[str] - values: list[int] + labels: "list[str]" + values: "list[int]" @api_view() @@ -395,7 +395,7 @@ def public_overview_new(_request): # Parse the public config to gather data for each field defined in the # overview - fields = [field for section in settings.CONFIG_PUBLIC["overview"] for field in section["fields"]] + fields = [chart["field"] for section in settings.CONFIG_PUBLIC["overview"] for chart in section["charts"]] response = { "datasets": datasets, "layout": settings.CONFIG_PUBLIC["overview"], @@ -479,7 +479,7 @@ def get_date_stats(field_props): .annotate(total=Count(DATE_Y_M))\ .order_by(DATE_Y_M) # Note: lexical sort works on ISO dates - stats: Mapping(str, int) = dict() + stats: Mapping[str, int] = dict() has_missing = False for item in query_set: key = item[DATE_Y_M] @@ -530,7 +530,7 @@ def get_range_stats(field_props): .values(label=Case(*whens, default=Value("missing"), output_field=CharField()))\ .annotate(total=Count("label")) - stats: Mapping(str, int) = dict() + stats: Mapping[str, int] = dict() for item in query_set: key = item["label"] stats[key] = item["total"] if item["total"] > threshold else 0 @@ -552,7 +552,7 @@ def get_range_stats(field_props): } -def labelled_range_generator(field_props) -> tuple(int, int, str): +def labelled_range_generator(field_props) -> (int, int, str): """ Note: limited to operations on integer values for simplicity A word of caution: when implementing handling of floating point values, @@ -591,7 +591,7 @@ def labelled_range_generator(field_props) -> tuple(int, int, str): yield taper_right, maximum, f"≥ {taper_right}" -def monthly_generator(start: str, end: str) -> tuple(int, int): +def monthly_generator(start: str, end: str) -> (int, int): """ generator of tuples (year nb, month nb) from a start date to an end date as ISO formated strings `yyyy-mm` @@ -605,7 +605,7 @@ def monthly_generator(start: str, end: str) -> tuple(int, int): yield year, month -def get_model_and_field(field_id: str) -> tuple(any, str): +def get_model_and_field(field_id: str) -> (any, str): model_name, *field_path = field_id.split("/") if model_name == "individual": @@ -638,12 +638,12 @@ def sort_numeric_values_into_bins(values: dict, bin_size: int = 10, threshold: i return {k: v for k, v in values_in_bins.items() if v > threshold} -def stats_for_field(model, field: str, add_missing=False) -> Mapping(str, int): +def stats_for_field(model, field: str, add_missing=False) -> Mapping[str, int]: # values() restrict the table of results to this COLUMN # annotate() creates a `total` column for the aggregation # Count() aggregates the results by performing a GROUP BY on the field query_set = model.objects.all().values(field).annotate(total=Count(field)) - stats: Mapping(str, int) = dict() + stats: Mapping[str, int] = dict() for item in query_set: key = item[field] if key is None: From f981fa0028c8a2485cbd6eb65dd4769e3259b3ef Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 01:53:47 +0000 Subject: [PATCH 21/59] fix: December is #12 not #0 --- chord_metadata_service/restapi/api_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index ad46bc226..687d11073 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -601,7 +601,7 @@ def monthly_generator(start: str, end: str) -> (int, int): last_month_nb = (end_year - start_year) * 12 + end_month for month_nb in range(start_month, last_month_nb): year = start_year + month_nb // 12 - month = month_nb % 12 + month = month_nb % 12 or 12 yield year, month From d402969f162ae969112cb9815441c2e0483b02e8 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 01:56:27 +0000 Subject: [PATCH 22/59] fix Substr() not available for JSON field --- chord_metadata_service/restapi/api_views.py | 50 ++++++++++----------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 687d11073..6ebbaa3ff 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -1,14 +1,14 @@ import math import logging -from collections import Counter +from collections import Counter, defaultdict from typing import TypedDict, Mapping from calendar import month_abbr from django.conf import settings from django.views.decorators.cache import cache_page from django.db.models import Count, F, Func, CharField, IntegerField, Case, When, Value -from django.db.models.functions import Cast, Substr +from django.db.models.functions import Cast from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes @@ -458,7 +458,6 @@ def get_date_stats(field_props): TODO: for now only dates binned by month are handled """ LENGTH_Y_M = 4 + 1 + 2 # dates stored as yyyy-mm-dd - DATE_Y_M = 'date' threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] if field_props["config"]["bin_by"] != "month": @@ -474,40 +473,37 @@ def get_date_stats(field_props): raise NotImplementedError(msg) query_set = model.objects.all()\ - .annotate(date=Substr(field_name, 1, LENGTH_Y_M))\ - .values(DATE_Y_M)\ - .annotate(total=Count(DATE_Y_M))\ - .order_by(DATE_Y_M) # Note: lexical sort works on ISO dates + .values(field_name)\ + .order_by(field_name)\ + .annotate(total=Count(field_name)) # Note: lexical sort works on ISO dates - stats: Mapping[str, int] = dict() - has_missing = False + stats = defaultdict(int) + start = end = None + # Key the counts on yyyy-mm combination (aggregate same month counts) for item in query_set: - key = item[DATE_Y_M] - if key is None: - has_missing = True - continue + key = 'missing' if item[field_name] is None else item[field_name][:LENGTH_Y_M] + stats[key] += item["total"] - key = key.strip() - if key == "": + if key == 'missing': continue - - stats[key] = item["total"] if item["total"] > threshold else 0 + if start: + end = key + else: + start = key # All the bins between start and end date must be represented labels: list(str) = [] values: list(int) = [] - if len(stats): - keys = list(stats) - for year, month in monthly_generator(keys[0], keys[-1]): + if start: # at least one month + for year, month in monthly_generator(start, end or start): key = f"{year}-{month}" label = f"{month_abbr[month].capitalize()} {year}" # convert key as yyyy-mm to `abbreviated month yyyy` labels.append(label) - values.appenf(stats.get(key, 0)) + v = stats.get(key, 0) + values.append(0 if v < threshold else v) - # Append missing items if any - if has_missing: - isnull_filter = {f"{field_name}__isnull": True} - v = model.objects.all().values(field_name).filter(**isnull_filter).count() + # Append missing items at the end if any + if 'missing' in stats: labels.append("missing") values.append(v) @@ -596,8 +592,8 @@ def monthly_generator(start: str, end: str) -> (int, int): generator of tuples (year nb, month nb) from a start date to an end date as ISO formated strings `yyyy-mm` """ - start_year, start_month = tuple([int(k) for k in start.split("-")]) - end_year, end_month = tuple([int(k) for k in end.split("-")]) + [start_year, start_month] = [int(k) for k in start.split("-")] + [end_year, end_month] = [int(k) for k in end.split("-")] last_month_nb = (end_year - start_year) * 12 + end_month for month_nb in range(start_month, last_month_nb): year = start_year + month_nb // 12 From 904cd4f2ee8882b17380032162242d5983858bd5 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 20:48:22 +0000 Subject: [PATCH 23/59] add numerical extra property to config --- chord_metadata_service/config.new.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/chord_metadata_service/config.new.json b/chord_metadata_service/config.new.json index 794142a1a..3cdcde5da 100644 --- a/chord_metadata_service/config.new.json +++ b/chord_metadata_service/config.new.json @@ -4,7 +4,10 @@ "section_title": "Demographics", "charts": [ {"field": "age", "chart_type": "bar"}, - {"field": "sex", "chart_type": "pie"} + {"field": "sex", "chart_type": "pie"}, + {"field": "date_of_consent", "chart_type": "bar"}, + {"field": "mobility", "chart_type": "bar"}, + {"field": "lab_test_result_value", "chart_type": "bar"} ] }, { @@ -91,6 +94,21 @@ "I am unable to walk about" ] } + }, + "lab_test_result_value": { + "id": "individual/extra_properties/lab_test_result_value", + "title": "Lab Test Result", + "description": "This acts as a placeholder for numeric values", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + } + } }, "rules": { From bbb1d3c453f283197fd8ad7fa03eed34329d203e Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 20:50:59 +0000 Subject: [PATCH 24/59] add some debugging to remove script --- scripts/remove_from_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove_from_db.py b/scripts/remove_from_db.py index f35d47630..26ae6b623 100644 --- a/scripts/remove_from_db.py +++ b/scripts/remove_from_db.py @@ -1,4 +1,3 @@ -import os import sys import subprocess @@ -35,6 +34,7 @@ def main(): stderr=subprocess.PIPE, ) if response.returncode: + print(response.stderr) print('"{}" does not seem to be a valid table'.format(table)) else: print("Deleted data on table {}".format(table)) From ee10331e6f0bb31b979d3c5881242b583ff35c2d Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 20:58:51 +0000 Subject: [PATCH 25/59] typing --- chord_metadata_service/restapi/api_views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 6ebbaa3ff..4b4a498a8 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -2,7 +2,7 @@ import logging from collections import Counter, defaultdict -from typing import TypedDict, Mapping +from typing import Tuple, TypedDict, Mapping from calendar import month_abbr from django.conf import settings @@ -548,7 +548,7 @@ def get_range_stats(field_props): } -def labelled_range_generator(field_props) -> (int, int, str): +def labelled_range_generator(field_props) -> Tuple[int, int, str]: """ Note: limited to operations on integer values for simplicity A word of caution: when implementing handling of floating point values, @@ -587,7 +587,7 @@ def labelled_range_generator(field_props) -> (int, int, str): yield taper_right, maximum, f"≥ {taper_right}" -def monthly_generator(start: str, end: str) -> (int, int): +def monthly_generator(start: str, end: str) -> Tuple[int, int]: """ generator of tuples (year nb, month nb) from a start date to an end date as ISO formated strings `yyyy-mm` @@ -601,7 +601,7 @@ def monthly_generator(start: str, end: str) -> (int, int): yield year, month -def get_model_and_field(field_id: str) -> (any, str): +def get_model_and_field(field_id: str) -> Tuple[any, str]: model_name, *field_path = field_id.split("/") if model_name == "individual": From 4ebdedc6529127d74395e618210ec1f0b2e26fc4 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 21:12:59 +0000 Subject: [PATCH 26/59] convert data to array of objects The previous format (vectors of labels/values) has been rejected due to perceived complexity. --- chord_metadata_service/restapi/api_views.py | 52 +++++++-------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 4b4a498a8..e386ded9d 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -2,7 +2,7 @@ import logging from collections import Counter, defaultdict -from typing import Tuple, TypedDict, Mapping +from typing import Tuple, Mapping from calendar import month_abbr from django.conf import settings @@ -30,11 +30,6 @@ OVERVIEW_AGE_BIN_SIZE = 10 -class BinnedStats(TypedDict): - labels: "list[str]" - values: "list[int]" - - @api_view() @permission_classes([AllowAny]) def service_info(_request): @@ -420,7 +415,7 @@ def public_overview_new(_request): return Response(response) -def get_categorical_stats(field_props) -> BinnedStats: +def get_categorical_stats(field_props): """ Fetches statistics for a given categorical field and apply privacy policies """ @@ -430,22 +425,18 @@ def get_categorical_stats(field_props) -> BinnedStats: # Enforce values order from config and apply policies threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] labels: list[str] = field_props["config"]["enum"] - values: list[int] = [] + bins = [] for category in labels: v = stats.get(category, 0) if v and v < threshold: v = 0 - values.append(v) + bins.append({"label": category, "value": v}) if stats["missing"] > 0: - labels.append("missing") - values.append(stats["missing"]) + bins.append({"label": "missing", "value": stats["missing"]}) - return { - "labels": labels, - "values": values - } + return bins def get_date_stats(field_props): @@ -492,25 +483,22 @@ def get_date_stats(field_props): start = key # All the bins between start and end date must be represented - labels: list(str) = [] - values: list(int) = [] + bins = [] if start: # at least one month for year, month in monthly_generator(start, end or start): key = f"{year}-{month}" label = f"{month_abbr[month].capitalize()} {year}" # convert key as yyyy-mm to `abbreviated month yyyy` - labels.append(label) v = stats.get(key, 0) - values.append(0 if v < threshold else v) + bins.append({ + "label": label, + "value": 0 if v < threshold else v + }) # Append missing items at the end if any if 'missing' in stats: - labels.append("missing") - values.append(v) + bins.append({"label": "missing", "value": stats["missing"]}) - return { - "labels": labels, - "values": values - } + return bins def get_range_stats(field_props): @@ -532,20 +520,14 @@ def get_range_stats(field_props): stats[key] = item["total"] if item["total"] > threshold else 0 # All the bins between start and end must be represented and ordered - labels: list(str) = [] - values: list(int) = [] + bins = [] for floor, ceil, label in labelled_range_generator(field_props): - labels.append(label) - values.append(stats.get(label, 0)) + bins.append({"label": label, "value": stats.get(label, 0)}) if "missing" in stats: - labels.append("missing") - values.append(stats["missing"]) + bins.append({"label": "missing", "value": stats["missing"]}) - return { - "labels": labels, - "values": values - } + return bins def labelled_range_generator(field_props) -> Tuple[int, int, str]: From e4b67dadb06f64c3c9bc26ae386b300420864108 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 14 Jul 2022 17:57:18 -0400 Subject: [PATCH 27/59] switch to overview endpoint --- chord_metadata_service/config.new.json | 117 ---------------- chord_metadata_service/example.config.json | 140 +++++++++++++++---- chord_metadata_service/metadata/settings.py | 6 - chord_metadata_service/restapi/api_views.py | 147 -------------------- chord_metadata_service/restapi/urls.py | 3 +- 5 files changed, 114 insertions(+), 299 deletions(-) delete mode 100644 chord_metadata_service/config.new.json diff --git a/chord_metadata_service/config.new.json b/chord_metadata_service/config.new.json deleted file mode 100644 index 3cdcde5da..000000000 --- a/chord_metadata_service/config.new.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "overview": [ - { - "section_title": "Demographics", - "charts": [ - {"field": "age", "chart_type": "bar"}, - {"field": "sex", "chart_type": "pie"}, - {"field": "date_of_consent", "chart_type": "bar"}, - {"field": "mobility", "chart_type": "bar"}, - {"field": "lab_test_result_value", "chart_type": "bar"} - ] - }, - { - "section_title": "Experiments", - "charts": [ - {"field": "experiment_type", "chart_type": "pie"} - ] - } - ], - "search": [ - { - "section_title": "Demographics", - "fields": ["age", "sex"] - } - ], - "fields": { - "age": { - "id": "individual/age_numeric", - "title": "Age", - "description": "Age at arrival", - "datatype": "number", - "config": { - "bin_size": 10, - "taper_left": 10, - "taper_right": 100, - "units": "years", - "minimum": 0, - "maximum": 100 - } - }, - "sex": { - "id": "individual/sex", - "title": "Sex", - "description": "Sex at birth", - "datatype": "string", - "config": { - "enum": [ - "Male", - "Female" - ] - } - }, - "experiment_type": { - "id": "experiment/experiment_type", - "title": "Experiment Types", - "description": "Types of experiments performed on a sample", - "datatype": "string", - "config": { - "enum": ["DNA Methylation", "mRNA-Seq", "smRNA-Seq", "RNA-Seq", "WES", "Other"] - } - }, - "date_of_consent": { - "id": "individual/extra_properties/date_of_consent", - "title": "Verbal consent date", - "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", - "datatype": "date", - "config": { - "bin_by": "month" - } - }, - "type_partic": { - "id": "individual/extra_properties/type_partic", - "title": "Participant type", - "description": "Has the patient been hospitalized or is the patient seen on as an outpatient?", - "datatype": "string", - "config": { - "enum": [ - "Hospitalized", - "Outpatient" - ] - } - }, - "mobility": { - "id": "individual/extra_properties/mobility", - "title": "Functional status", - "description": "Mobility", - "datatype": "string", - "config": { - "enum": [ - "I have no problems in walking about", - "I have slight problems in walking about", - "I have moderate problems in walking about", - "I have severe problems in walking about", - "I am unable to walk about" - ] - } - }, - "lab_test_result_value": { - "id": "individual/extra_properties/lab_test_result_value", - "title": "Lab Test Result", - "description": "This acts as a placeholder for numeric values", - "datatype": "number", - "config": { - "bin_size": 50, - "taper_left": 50, - "taper_right": 800, - "minimum": 0, - "maximum": 1000, - "units": "mg/L" - } - - } - }, - "rules": { - "count_threshold": 5 - } -} \ No newline at end of file diff --git a/chord_metadata_service/example.config.json b/chord_metadata_service/example.config.json index 4b1bbda31..55cf7c57f 100644 --- a/chord_metadata_service/example.config.json +++ b/chord_metadata_service/example.config.json @@ -1,31 +1,117 @@ { - "sex": { - "type": "string", - "enum": [ - "male", - "female" - ], - "title": "Sex" + "overview": [ + { + "section_title": "Demographics", + "charts": [ + {"field": "age", "chart_type": "bar"}, + {"field": "sex", "chart_type": "pie"}, + {"field": "date_of_consent", "chart_type": "bar"}, + {"field": "mobility", "chart_type": "bar"}, + {"field": "lab_test_result_value", "chart_type": "bar"} + ] + }, + { + "section_title": "Experiments", + "charts": [ + {"field": "experiment_type", "chart_type": "pie"} + ] + } + ], + "search": [ + { + "section_title": "Demographics", + "fields": ["age", "sex"] + } + ], + "fields": { + "age": { + "id": "individual/age_numeric", + "title": "Age", + "description": "Age at arrival", + "datatype": "number", + "config": { + "bin_size": 10, + "taper_left": 10, + "taper_right": 100, + "units": "years", + "minimum": 0, + "maximum": 100 + } + }, + "sex": { + "id": "individual/sex", + "title": "Sex", + "description": "Sex at birth", + "datatype": "string", + "config": { + "enum": [ + "Male", + "Female" + ] + } + }, + "experiment_type": { + "id": "experiment/experiment_type", + "title": "Experiment Types", + "description": "Types of experiments performed on a sample", + "datatype": "string", + "config": { + "enum": ["DNA Methylation", "mRNA-Seq", "smRNA-Seq", "RNA-Seq", "WES", "Other"] + } + }, + "date_of_consent": { + "id": "individual/extra_properties/date_of_consent", + "title": "Verbal consent date", + "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", + "datatype": "date", + "config": { + "bin_by": "month" + } + }, + "type_partic": { + "id": "individual/extra_properties/type_partic", + "title": "Participant type", + "description": "Has the patient been hospitalized or is the patient seen on as an outpatient?", + "datatype": "string", + "config": { + "enum": [ + "Hospitalized", + "Outpatient" + ] + } + }, + "mobility": { + "id": "individual/extra_properties/mobility", + "title": "Functional status", + "description": "Mobility", + "datatype": "string", + "config": { + "enum": [ + "I have no problems in walking about", + "I have slight problems in walking about", + "I have moderate problems in walking about", + "I have severe problems in walking about", + "I am unable to walk about" + ] + } + }, + "lab_test_result_value": { + "id": "individual/extra_properties/lab_test_result_value", + "title": "Lab Test Result", + "description": "This acts as a placeholder for numeric values", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + } + + } }, - "extra_properties": { - "smoking": { - "type": "string", - "enum": [ - "Non-smoker", - "Smoker", - "Former smoker", - "Passive smoker", - "Not specified" - ], - "title": "Smoking" - }, - "death": { - "type": "string", - "enum": [ - "Alive", - "Deceased" - ], - "title": "Death" - } + "rules": { + "count_threshold": 5 } } \ No newline at end of file diff --git a/chord_metadata_service/metadata/settings.py b/chord_metadata_service/metadata/settings.py index fd2e38f72..5473ab5e5 100644 --- a/chord_metadata_service/metadata/settings.py +++ b/chord_metadata_service/metadata/settings.py @@ -290,12 +290,6 @@ def get_secret(path): # Read project specific config.json that contains custom search fields if os.path.isfile(os.path.join(BASE_DIR, 'config.json')): with open(os.path.join(BASE_DIR, 'config.json')) as config_file: - CONFIG_FIELDS = json.load(config_file) -else: - CONFIG_FIELDS = {} - -if os.path.isfile(os.path.join(BASE_DIR, 'config.new.json')): - with open(os.path.join(BASE_DIR, 'config.new.json')) as config_file: CONFIG_PUBLIC = json.load(config_file) else: CONFIG_PUBLIC = {} diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index e386ded9d..edd59f1a0 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -1,4 +1,3 @@ -import math import logging from collections import Counter, defaultdict @@ -244,135 +243,6 @@ def public_overview(_request): Overview of all public data in the database """ - # TODO should this be added to the project config.json file ? - threshold = 5 - missing = "missing" - - if settings.CONFIG_FIELDS: - - # Datasets provenance metadata - datasets = chord_models.Dataset.objects.values( - "title", "description", "contact_info", - "dates", "stored_in", "spatial_coverage", - "types", "privacy", "distributions", - "dimensions", "primary_publications", "citations", - "produced_by", "creators", "licenses", - "acknowledges", "keywords", "version", - "extra_properties" - ) - - individuals = patients_models.Individual.objects.all() - individuals_set = set() - individuals_sex = Counter() - individuals_age = Counter() - individuals_extra_properties = {} - extra_properties = {} - - experiments = experiments_models.Experiment.objects.all() - experiments_set = set() - experiments_type = Counter() - - for individual in individuals: - # subject/individual - individuals_set.add(individual.id) - individuals_sex.update((individual.sex,)) - # age - if individual.age is not None: - individuals_age.update((parse_individual_age(individual.age),)) - # collect extra_properties defined in config - if individual.extra_properties and "extra_properties" in settings.CONFIG_FIELDS: - for key in individual.extra_properties: - if key in settings.CONFIG_FIELDS["extra_properties"]: - # add new Counter() - if key not in extra_properties: - extra_properties[key] = Counter() - try: - extra_properties[key].update((individual.extra_properties[key],)) - except TypeError: - logger.error(f"The extra_properties {key} value is not of type string or number.") - pass - - individuals_extra_properties[key] = dict(extra_properties[key]) - # Experiments - for experiment in experiments: - experiments_set.add(experiment.id) - experiments_type.update((experiment.experiment_type,)) - - # Put age in bins - if individuals_age: - age_bin_size = settings.CONFIG_FIELDS["age"]["bin_size"] \ - if "age" in settings.CONFIG_FIELDS and "bin_size" in settings.CONFIG_FIELDS["age"] else None - age_kwargs = dict(values=dict(individuals_age), bin_size=age_bin_size) - individuals_age_bins = sort_numeric_values_into_bins( - **{k: v for k, v in age_kwargs.items() if v is not None} - ) - else: - individuals_age_bins = {} - - # Put all other numeric values coming from extra_properties in bins and remove values where count <= threshold - if individuals_extra_properties: - for key, value in list(individuals_extra_properties.items()): - # extra_properties contains only the fields specified in config - if settings.CONFIG_FIELDS["extra_properties"][key]["type"] == "number": - # retrieve bin_size if available - field_bin_size = settings.CONFIG_FIELDS["extra_properties"][key]["bin_size"] \ - if "bin_size" in settings.CONFIG_FIELDS["extra_properties"][key] else None - # retrieve the values from extra_properties counter - values = individuals_extra_properties[key] - if values: - kwargs = dict(values=values, bin_size=field_bin_size) - # sort into bins and remove numeric values where count <= threshold - extra_prop_values_in_bins = sort_numeric_values_into_bins( - **{k: v for k, v in kwargs.items() if v is not None} - ) - # rewrite with sorted values - individuals_extra_properties[key] = extra_prop_values_in_bins - # add missing value count - individuals_extra_properties[key][missing] = len(individuals_set) - sum(v for v in value.values()) - else: - # add missing value count - value[missing] = len(individuals_set) - sum(v for v in value.values()) - # remove string values where count <= threshold - for k, v in list(value.items()): - if v <= 5 and k != missing: - individuals_extra_properties[key].pop(k) - - # Update counters with missing values - for counter, all_values in zip([individuals_sex, individuals_age_bins], [individuals_sex, individuals_age]): - counter[missing] = len(individuals_set) - sum(v for v in dict(all_values).values()) - - # Response content - if len(individuals_set) < threshold: - content = settings.INSUFFICIENT_DATA_AVAILABLE - else: - content = { - "individuals": len(individuals_set) - } - for field, value in zip( - ["sex", "age", "extra_properties", "experiment_type"], - [{k: v for k, v in dict(individuals_sex).items() if v > threshold or k == missing}, - individuals_age_bins, - individuals_extra_properties, - dict(experiments_type)]): - if field in settings.CONFIG_FIELDS: - content[field] = value - if "experiment_type" in content: - content["experiments"] = len(experiments_set) - content["datasets"] = datasets - return Response(content) - - else: - return Response(settings.NO_PUBLIC_DATA_AVAILABLE) - - -@api_view(["GET"]) -@permission_classes([AllowAny]) -def public_overview_new(_request): - """ - get: - Overview of all public data in the database - """ - if not settings.CONFIG_PUBLIC: return Response(settings.NO_PUBLIC_DATA_AVAILABLE) @@ -599,23 +469,6 @@ def get_model_and_field(field_id: str) -> Tuple[any, str]: return model, field_name -def sort_numeric_values_into_bins(values: dict, bin_size: int = 10, threshold: int = 5): - values_in_bins = {} - # convert keys to int - keys_to_int_values = {int(k): v for k, v in values.items()} - # find the max value and define the range - for j in range(math.ceil(max(keys_to_int_values.keys()) / bin_size)): - bin_key = j * bin_size - keys = [a for a in keys_to_int_values.keys() if j * bin_size <= a < (j + 1) * bin_size] - keys_sum = 0 - for k, v in keys_to_int_values.items(): - if k in keys: - keys_sum += v - values_in_bins[f"{bin_key}"] = keys_sum - # remove data if count < 5 - return {k: v for k, v in values_in_bins.items() if v > threshold} - - def stats_for_field(model, field: str, add_missing=False) -> Mapping[str, int]: # values() restrict the table of results to this COLUMN # annotate() creates a `total` column for the aggregation diff --git a/chord_metadata_service/restapi/urls.py b/chord_metadata_service/restapi/urls.py index 6559b9c67..9342d9977 100644 --- a/chord_metadata_service/restapi/urls.py +++ b/chord_metadata_service/restapi/urls.py @@ -12,7 +12,7 @@ BiosampleSampledTissueAutocomplete ) from chord_metadata_service.resources import api_views as resources_views -from .api_views import overview, mcode_overview, public_search_fields, public_overview, public_overview_new +from .api_views import overview, mcode_overview, public_search_fields, public_overview __all__ = ["router", "urlpatterns"] @@ -86,5 +86,4 @@ path('public_search_fields', public_search_fields, name='public-search-fields',), # public overview path('public_overview', public_overview, name='public-overview',), - path('public_overview_new', public_overview_new, name='public-overview-new',) ] From 52e32362b49fbf95360d458ff972f772ba98f0ca Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 20 Jul 2022 12:39:56 +0000 Subject: [PATCH 28/59] add missing counts to response --- chord_metadata_service/restapi/api_views.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index edd59f1a0..63d1adf0e 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -257,16 +257,24 @@ def public_overview(_request): "extra_properties" ) - # Parse the public config to gather data for each field defined in the - # overview + # Predefined counts + individuals_count = patients_models.Individual.objects.all().count() + experiments_count = experiments_models.Experiment.objects.all().count() - fields = [chart["field"] for section in settings.CONFIG_PUBLIC["overview"] for chart in section["charts"]] response = { "datasets": datasets, "layout": settings.CONFIG_PUBLIC["overview"], - "fields": {} + "fields": {}, + "counts": { + "individuals": individuals_count, + "experiments": experiments_count + }, } + # Parse the public config to gather data for each field defined in the + # overview + fields = [chart["field"] for section in settings.CONFIG_PUBLIC["overview"] for chart in section["charts"]] + for field in fields: field_props = settings.CONFIG_PUBLIC["fields"][field] response["fields"][field] = { From bb7065744b9fca82ac2c421b442db5f82cb80698 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 20 Jul 2022 13:46:29 +0000 Subject: [PATCH 29/59] move util funcs to proper module --- chord_metadata_service/restapi/api_views.py | 250 +------------------- chord_metadata_service/restapi/utils.py | 242 +++++++++++++++++++ 2 files changed, 252 insertions(+), 240 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 63d1adf0e..dcf15a65f 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -1,18 +1,22 @@ import logging -from collections import Counter, defaultdict -from typing import Tuple, Mapping -from calendar import month_abbr +from collections import Counter from django.conf import settings from django.views.decorators.cache import cache_page -from django.db.models import Count, F, Func, CharField, IntegerField, Case, When, Value -from django.db.models.functions import Cast from rest_framework.permissions import AllowAny from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes -from chord_metadata_service.restapi.utils import parse_individual_age +from chord_metadata_service.restapi.utils import ( + parse_individual_age, + stats_for_field, + compute_binned_ages, + get_field_bins, + get_categorical_stats, + get_date_stats, + get_range_stats +) from chord_metadata_service.chord.permissions import OverrideOrSuperUserOnly from chord_metadata_service.metadata.service_info import SERVICE_INFO from chord_metadata_service.chord import models as chord_models @@ -291,237 +295,3 @@ def public_overview(_request): response["fields"][field]["data"] = stats return Response(response) - - -def get_categorical_stats(field_props): - """ - Fetches statistics for a given categorical field and apply privacy policies - """ - model, field_name = get_model_and_field(field_props["id"]) - stats = stats_for_field(model, field_name, add_missing=True) - - # Enforce values order from config and apply policies - threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] - labels: list[str] = field_props["config"]["enum"] - bins = [] - - for category in labels: - v = stats.get(category, 0) - if v and v < threshold: - v = 0 - bins.append({"label": category, "value": v}) - - if stats["missing"] > 0: - bins.append({"label": "missing", "value": stats["missing"]}) - - return bins - - -def get_date_stats(field_props): - """ - Fetches statistics for a given date field, fill the gaps in the date range - and apply privacy policies. - Note that dates within a JSON are stored as strings, not instances of datetime. - TODO: for now, only dates in extra_properties are handled. Handle dates as - regular fields when needed. - TODO: for now only dates binned by month are handled - """ - LENGTH_Y_M = 4 + 1 + 2 # dates stored as yyyy-mm-dd - threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] - - if field_props["config"]["bin_by"] != "month": - msg = f"Binning dates by `{field_props['config']['bin_by']}` method not implemented" - logger.error(msg) - raise NotImplementedError(msg) - - model, field_name = get_model_and_field(field_props["id"]) - - if "extra_properties" not in field_name: - msg = "Binning date-like fields that are not in extra-properties is not implemented" - logger.error(msg) - raise NotImplementedError(msg) - - query_set = model.objects.all()\ - .values(field_name)\ - .order_by(field_name)\ - .annotate(total=Count(field_name)) # Note: lexical sort works on ISO dates - - stats = defaultdict(int) - start = end = None - # Key the counts on yyyy-mm combination (aggregate same month counts) - for item in query_set: - key = 'missing' if item[field_name] is None else item[field_name][:LENGTH_Y_M] - stats[key] += item["total"] - - if key == 'missing': - continue - if start: - end = key - else: - start = key - - # All the bins between start and end date must be represented - bins = [] - if start: # at least one month - for year, month in monthly_generator(start, end or start): - key = f"{year}-{month}" - label = f"{month_abbr[month].capitalize()} {year}" # convert key as yyyy-mm to `abbreviated month yyyy` - v = stats.get(key, 0) - bins.append({ - "label": label, - "value": 0 if v < threshold else v - }) - - # Append missing items at the end if any - if 'missing' in stats: - bins.append({"label": "missing", "value": stats["missing"]}) - - return bins - - -def get_range_stats(field_props): - threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] - model, field = get_model_and_field(field_props["id"]) - - # Generate a list of When conditions that return a label for the given bin. - # This is equivalent to an SQL CASE statement. - whens = [When(**{f"{field}__gte": floor}, **{f"{field}__lt": ceil}, then=Value(label)) - for floor, ceil, label in labelled_range_generator(field_props)] - - query_set = model.objects\ - .values(label=Case(*whens, default=Value("missing"), output_field=CharField()))\ - .annotate(total=Count("label")) - - stats: Mapping[str, int] = dict() - for item in query_set: - key = item["label"] - stats[key] = item["total"] if item["total"] > threshold else 0 - - # All the bins between start and end must be represented and ordered - bins = [] - for floor, ceil, label in labelled_range_generator(field_props): - bins.append({"label": label, "value": stats.get(label, 0)}) - - if "missing" in stats: - bins.append({"label": "missing", "value": stats["missing"]}) - - return bins - - -def labelled_range_generator(field_props) -> Tuple[int, int, str]: - """ - Note: limited to operations on integer values for simplicity - A word of caution: when implementing handling of floating point values, - be aware of string format (might need to add precision to config?) computations - of modulo and lack of support for ranges. - """ - - c = field_props["config"] - minimum = int(c["minimum"]) - maximum = int(c["maximum"]) - taper_left = int(c["taper_left"]) - taper_right = int(c["taper_right"]) - bin_size = int(c["bin_size"]) - - # check prerequisites - # Note: it raises an error as it reflects an error in the config file - if maximum < minimum: - raise ValueError(f"Wrong min/max values in config: {field_props}") - - if (taper_right < taper_left - or minimum > taper_left - or taper_right > maximum): - raise ValueError(f"Wrong taper values in config: {field_props}") - - if (taper_right - taper_left) % bin_size: - raise ValueError(f"Range between taper values is not a multiple of bin_size: {field_props}") - - # start generator - if minimum != taper_left: - yield minimum, taper_left, f"{minimum}-{taper_left}" - - for v in range(taper_left, taper_right, bin_size): - yield v, v + bin_size, f"{v}-{v + bin_size}" - - if maximum != taper_right: - yield taper_right, maximum, f"≥ {taper_right}" - - -def monthly_generator(start: str, end: str) -> Tuple[int, int]: - """ - generator of tuples (year nb, month nb) from a start date to an end date - as ISO formated strings `yyyy-mm` - """ - [start_year, start_month] = [int(k) for k in start.split("-")] - [end_year, end_month] = [int(k) for k in end.split("-")] - last_month_nb = (end_year - start_year) * 12 + end_month - for month_nb in range(start_month, last_month_nb): - year = start_year + month_nb // 12 - month = month_nb % 12 or 12 - yield year, month - - -def get_model_and_field(field_id: str) -> Tuple[any, str]: - model_name, *field_path = field_id.split("/") - - if model_name == "individual": - model = pheno_models.Individual - elif model_name == "experiment": - model = experiments_models.Experiment - else: - msg = f"Accessing field on model {model_name} not implemented" - logger.error(msg) - raise NotImplementedError(msg) - - field_name = "__".join(field_path) - return model, field_name - - -def stats_for_field(model, field: str, add_missing=False) -> Mapping[str, int]: - # values() restrict the table of results to this COLUMN - # annotate() creates a `total` column for the aggregation - # Count() aggregates the results by performing a GROUP BY on the field - query_set = model.objects.all().values(field).annotate(total=Count(field)) - stats: Mapping[str, int] = dict() - for item in query_set: - key = item[field] - if key is None: - continue - - key = key.strip() - if key == "": - continue - - stats[key] = item["total"] - - if add_missing: - isnull_filter = {f"{field}__isnull": True} - stats['missing'] = model.objects.all().values(field).filter(**isnull_filter).count() - - return stats - - -def get_field_bins(model, field, bin_size): - # creates a new field "binned" by substracting the modulo by bin size to - # the value which requires binning (e.g. 28 => 28 - 28 % 10 = 20) - # cast to integer to avoid numbers such as 60.00 if that was a decimal, - # and aggregate over this value. - query_set = model.objects.all().annotate( - binned=Cast( - F(field) - Func(F(field), bin_size, function="MOD"), - IntegerField() - ) - ).values('binned').annotate(total=Count('binned')) - stats = {item['binned']: item['total'] for item in query_set} - return stats - - -def compute_binned_ages(bin_size): - a = pheno_models.Individual.objects.filter(age_numeric__isnull=True).values('age') - binned_ages = [] - for r in a.iterator(): # reduce memory footprint (no caching) - if r["age"] is None: - continue - age = parse_individual_age(r["age"]) - binned_ages.append(age - age % OVERVIEW_AGE_BIN_SIZE) - return binned_ages diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index 66cbf5c8d..3de957631 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -1,6 +1,17 @@ import isodate import datetime +from collections import defaultdict +from typing import Tuple, Mapping +from calendar import month_abbr + +from django.db.models import Count, F, Func, IntegerField, CharField, Case, When, Value +from django.db.models.functions import Cast +from django.conf import settings + +from chord_metadata_service.phenopackets import models as pheno_models +from chord_metadata_service.experiments import models as experiments_models + def camel_case_field_names(string): """ Function to convert snake_case field names to camelCase """ @@ -100,3 +111,234 @@ def iso_duration_to_years(iso_age_duration: str, unit="years"): years = days_to_seconds / 60 / 60 / 24 / 365.25 return (round(years, 2)), unit return None, None + + +def labelled_range_generator(field_props) -> Tuple[int, int, str]: + """ + Note: limited to operations on integer values for simplicity + A word of caution: when implementing handling of floating point values, + be aware of string format (might need to add precision to config?) computations + of modulo and lack of support for ranges. + """ + + c = field_props["config"] + minimum = int(c["minimum"]) + maximum = int(c["maximum"]) + taper_left = int(c["taper_left"]) + taper_right = int(c["taper_right"]) + bin_size = int(c["bin_size"]) + + # check prerequisites + # Note: it raises an error as it reflects an error in the config file + if maximum < minimum: + raise ValueError(f"Wrong min/max values in config: {field_props}") + + if (taper_right < taper_left + or minimum > taper_left + or taper_right > maximum): + raise ValueError(f"Wrong taper values in config: {field_props}") + + if (taper_right - taper_left) % bin_size: + raise ValueError(f"Range between taper values is not a multiple of bin_size: {field_props}") + + # start generator + if minimum != taper_left: + yield minimum, taper_left, f"{minimum}-{taper_left}" + + for v in range(taper_left, taper_right, bin_size): + yield v, v + bin_size, f"{v}-{v + bin_size}" + + if maximum != taper_right: + yield taper_right, maximum, f"≥ {taper_right}" + + +def monthly_generator(start: str, end: str) -> Tuple[int, int]: + """ + generator of tuples (year nb, month nb) from a start date to an end date + as ISO formated strings `yyyy-mm` + """ + [start_year, start_month] = [int(k) for k in start.split("-")] + [end_year, end_month] = [int(k) for k in end.split("-")] + last_month_nb = (end_year - start_year) * 12 + end_month + for month_nb in range(start_month, last_month_nb): + year = start_year + month_nb // 12 + month = month_nb % 12 or 12 + yield year, month + + +def get_model_and_field(field_id: str) -> Tuple[any, str]: + model_name, *field_path = field_id.split("/") + + if model_name == "individual": + model = pheno_models.Individual + elif model_name == "experiment": + model = experiments_models.Experiment + else: + msg = f"Accessing field on model {model_name} not implemented" + raise NotImplementedError(msg) + + field_name = "__".join(field_path) + return model, field_name + + +def stats_for_field(model, field: str, add_missing=False) -> Mapping[str, int]: + # values() restrict the table of results to this COLUMN + # annotate() creates a `total` column for the aggregation + # Count() aggregates the results by performing a GROUP BY on the field + query_set = model.objects.all().values(field).annotate(total=Count(field)) + stats: Mapping[str, int] = dict() + for item in query_set: + key = item[field] + if key is None: + continue + + key = key.strip() + if key == "": + continue + + stats[key] = item["total"] + + if add_missing: + isnull_filter = {f"{field}__isnull": True} + stats['missing'] = model.objects.all().values(field).filter(**isnull_filter).count() + + return stats + + +def get_field_bins(model, field, bin_size): + # creates a new field "binned" by substracting the modulo by bin size to + # the value which requires binning (e.g. 28 => 28 - 28 % 10 = 20) + # cast to integer to avoid numbers such as 60.00 if that was a decimal, + # and aggregate over this value. + query_set = model.objects.all().annotate( + binned=Cast( + F(field) - Func(F(field), bin_size, function="MOD"), + IntegerField() + ) + ).values('binned').annotate(total=Count('binned')) + stats = {item['binned']: item['total'] for item in query_set} + return stats + + +def compute_binned_ages(bin_size: int): + a = pheno_models.Individual.objects.filter(age_numeric__isnull=True).values('age') + binned_ages = [] + for r in a.iterator(): # reduce memory footprint (no caching) + if r["age"] is None: + continue + age = parse_individual_age(r["age"]) + binned_ages.append(age - age % bin_size) + return binned_ages + + +def get_categorical_stats(field_props): + """ + Fetches statistics for a given categorical field and apply privacy policies + """ + model, field_name = get_model_and_field(field_props["id"]) + stats = stats_for_field(model, field_name, add_missing=True) + + # Enforce values order from config and apply policies + threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] + labels: list[str] = field_props["config"]["enum"] + bins = [] + + for category in labels: + v = stats.get(category, 0) + if v and v < threshold: + v = 0 + bins.append({"label": category, "value": v}) + + if stats["missing"] > 0: + bins.append({"label": "missing", "value": stats["missing"]}) + + return bins + + +def get_date_stats(field_props): + """ + Fetches statistics for a given date field, fill the gaps in the date range + and apply privacy policies. + Note that dates within a JSON are stored as strings, not instances of datetime. + TODO: for now, only dates in extra_properties are handled. Handle dates as + regular fields when needed. + TODO: for now only dates binned by month are handled + """ + LENGTH_Y_M = 4 + 1 + 2 # dates stored as yyyy-mm-dd + threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] + + if field_props["config"]["bin_by"] != "month": + msg = f"Binning dates by `{field_props['config']['bin_by']}` method not implemented" + raise NotImplementedError(msg) + + model, field_name = get_model_and_field(field_props["id"]) + + if "extra_properties" not in field_name: + msg = "Binning date-like fields that are not in extra-properties is not implemented" + raise NotImplementedError(msg) + + query_set = model.objects.all()\ + .values(field_name)\ + .order_by(field_name)\ + .annotate(total=Count(field_name)) # Note: lexical sort works on ISO dates + + stats = defaultdict(int) + start = end = None + # Key the counts on yyyy-mm combination (aggregate same month counts) + for item in query_set: + key = 'missing' if item[field_name] is None else item[field_name][:LENGTH_Y_M] + stats[key] += item["total"] + + if key == 'missing': + continue + if start: + end = key + else: + start = key + + # All the bins between start and end date must be represented + bins = [] + if start: # at least one month + for year, month in monthly_generator(start, end or start): + key = f"{year}-{month}" + label = f"{month_abbr[month].capitalize()} {year}" # convert key as yyyy-mm to `abbreviated month yyyy` + v = stats.get(key, 0) + bins.append({ + "label": label, + "value": 0 if v < threshold else v + }) + + # Append missing items at the end if any + if 'missing' in stats: + bins.append({"label": "missing", "value": stats["missing"]}) + + return bins + + +def get_range_stats(field_props): + threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] + model, field = get_model_and_field(field_props["id"]) + + # Generate a list of When conditions that return a label for the given bin. + # This is equivalent to an SQL CASE statement. + whens = [When(**{f"{field}__gte": floor}, **{f"{field}__lt": ceil}, then=Value(label)) + for floor, ceil, label in labelled_range_generator(field_props)] + + query_set = model.objects\ + .values(label=Case(*whens, default=Value("missing"), output_field=CharField()))\ + .annotate(total=Count("label")) + + stats: Mapping[str, int] = dict() + for item in query_set: + key = item["label"] + stats[key] = item["total"] if item["total"] > threshold else 0 + + # All the bins between start and end must be represented and ordered + bins = [] + for floor, ceil, label in labelled_range_generator(field_props): + bins.append({"label": label, "value": stats.get(label, 0)}) + + if "missing" in stats: + bins.append({"label": "missing", "value": stats["missing"]}) + + return bins From 6387506b2ef1f76f747fdb19beaa84534560c12a Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 20 Jul 2022 18:42:38 +0000 Subject: [PATCH 30/59] add `options` prop to search fields --- chord_metadata_service/restapi/api_views.py | 8 +++- chord_metadata_service/restapi/utils.py | 48 +++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index dcf15a65f..650387b19 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -9,6 +9,7 @@ from rest_framework.decorators import api_view, permission_classes from chord_metadata_service.restapi.utils import ( + get_field_options, parse_individual_age, stats_for_field, compute_binned_ages, @@ -231,7 +232,12 @@ def public_search_fields(_request): r = [ { **section, - "fields": [field_conf[f] for f in section["fields"]] + "fields": [ + { + **field_conf[f], + "options": get_field_options(field_conf[f]) + } for f in section["fields"] + ] } for section in search_conf ] return Response(r) diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index 3de957631..f970af485 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -315,6 +315,37 @@ def get_date_stats(field_props): return bins +def get_month_date_range(field_props): + """ + Get start date and end date from the database + Note that dates within a JSON are stored as strings, not instances of datetime. + TODO: for now, only dates in extra_properties are handled. Aggregate functions + are not available for data in JSON fields. + Implement handling dates as regular fields when needed. + TODO: for now only dates binned by month are handled. + """ + if field_props["config"]["bin_by"] != "month": + msg = f"Binning dates by `{field_props['config']['bin_by']}` method not implemented" + raise NotImplementedError(msg) + + model, field_name = get_model_and_field(field_props["id"]) + + if "extra_properties" not in field_name: + msg = "Binning date-like fields that are not in extra-properties is not implemented" + raise NotImplementedError(msg) + + LENGTH_Y_M = 4 + 1 + 2 # dates stored as yyyy-mm-dd + + query_set = model.objects.all()\ + .values(field_name)\ + .order_by(field_name) + + start = query_set.first()[field_name][:LENGTH_Y_M] + end = query_set.last()[field_name][:LENGTH_Y_M] + + return start, end + + def get_range_stats(field_props): threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] model, field = get_model_and_field(field_props["id"]) @@ -342,3 +373,20 @@ def get_range_stats(field_props): bins.append({"label": "missing", "value": stats["missing"]}) return bins + + +def get_field_options(field_props): + """ + Given properties for a public field, return the list of authorized options for + querying this field. + """ + if field_props["datatype"] == "string": + options = field_props["config"]["enum"] # TODO: handle enum not available + elif field_props["datatype"] == "number": + options = [label for floor, ceil, label in labelled_range_generator(field_props)] + elif field_props["datatype"] == "date": + # Assumes the field is in extra_properties, thus can not be aggregated + # using SQL MIN/MAX functions + start, end = get_month_date_range(field_props) + options = [f"{month_abbr[m].capitalize()} {y}" for y, m in monthly_generator(start, end)] + return options From 9b3fcc971eaf7b31d888ce3bc84766d43da61955 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 21 Jul 2022 15:16:39 +0000 Subject: [PATCH 31/59] refactor --- chord_metadata_service/patients/api_views.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index db2cd9c7a..c9351446a 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -59,16 +59,14 @@ def filter_queryset(self, queryset): return queryset def get(self, request, *args, **kwargs): + if not settings.CONFIG_PUBLIC: + return Response(settings.NO_PUBLIC_DATA_AVAILABLE) + base_qs = Individual.objects.all() filtered_qs = self.filter_queryset(base_qs) - # protect filtering if config is not provided - # the settings must be imported from django.conf (not from chord_metadata_service.metadata.settings) - if settings.CONFIG_FIELDS: - # the threshold for the count response is set to 5 - if filtered_qs.count() > 5: - return Response({"count": filtered_qs.count()}) - else: - # the count < 5, when there is no match in db the queryset is empty, count = 0 - return Response(settings.INSUFFICIENT_DATA_AVAILABLE) + + if filtered_qs.count() >= settings.CONFIG_PUBLIC["rules"]["count_threshold"]: + return Response({"count": filtered_qs.count()}) else: - return Response(settings.NO_PUBLIC_DATA_AVAILABLE) + # the count < threshold when there is no match in db the queryset is empty, count = 0 + return Response(settings.INSUFFICIENT_DATA_AVAILABLE) From 9f9840702de7affce8f2211ccc6830f98f1cdc2e Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 21 Jul 2022 16:42:36 +0000 Subject: [PATCH 32/59] refactor: use field key name as the field id --- chord_metadata_service/restapi/api_views.py | 33 +++++++++++---------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 650387b19..f54bbcadd 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -226,24 +226,25 @@ def public_search_fields(_request): get: Return public search fields with their configuration """ - if settings.CONFIG_PUBLIC: - search_conf = settings.CONFIG_PUBLIC["search"] - field_conf = settings.CONFIG_PUBLIC["fields"] - r = [ - { - **section, - "fields": [ - { - **field_conf[f], - "options": get_field_options(field_conf[f]) - } for f in section["fields"] - ] - } for section in search_conf - ] - return Response(r) - else: + if not settings.CONFIG_PUBLIC: return Response(settings.NO_PUBLIC_FIELDS_CONFIGURED) + search_conf = settings.CONFIG_PUBLIC["search"] + field_conf = settings.CONFIG_PUBLIC["fields"] + r = [ + { + **section, + "fields": [ + { + **field_conf[f], + "id": f, + "options": get_field_options(field_conf[f]) + } for f in section["fields"] + ] + } for section in search_conf + ] + return Response(r) + @api_view(["GET"]) @permission_classes([AllowAny]) From be7850c33fb2a1426996b642d67bbdcbfd4f30ef Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 21 Jul 2022 16:44:32 +0000 Subject: [PATCH 33/59] config change: rename "id" to "mapping" This property is used internally to reflect what the Object-Relational Mapping to a given field is. --- chord_metadata_service/example.config.json | 14 +++++++------- chord_metadata_service/restapi/api_views.py | 1 + chord_metadata_service/restapi/utils.py | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/chord_metadata_service/example.config.json b/chord_metadata_service/example.config.json index 55cf7c57f..edcae0b75 100644 --- a/chord_metadata_service/example.config.json +++ b/chord_metadata_service/example.config.json @@ -25,7 +25,7 @@ ], "fields": { "age": { - "id": "individual/age_numeric", + "mapping": "individual/age_numeric", "title": "Age", "description": "Age at arrival", "datatype": "number", @@ -39,7 +39,7 @@ } }, "sex": { - "id": "individual/sex", + "mapping": "individual/sex", "title": "Sex", "description": "Sex at birth", "datatype": "string", @@ -51,7 +51,7 @@ } }, "experiment_type": { - "id": "experiment/experiment_type", + "mapping": "experiment/experiment_type", "title": "Experiment Types", "description": "Types of experiments performed on a sample", "datatype": "string", @@ -60,7 +60,7 @@ } }, "date_of_consent": { - "id": "individual/extra_properties/date_of_consent", + "mapping": "individual/extra_properties/date_of_consent", "title": "Verbal consent date", "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", "datatype": "date", @@ -69,7 +69,7 @@ } }, "type_partic": { - "id": "individual/extra_properties/type_partic", + "mapping": "individual/extra_properties/type_partic", "title": "Participant type", "description": "Has the patient been hospitalized or is the patient seen on as an outpatient?", "datatype": "string", @@ -81,7 +81,7 @@ } }, "mobility": { - "id": "individual/extra_properties/mobility", + "mapping": "individual/extra_properties/mobility", "title": "Functional status", "description": "Mobility", "datatype": "string", @@ -96,7 +96,7 @@ } }, "lab_test_result_value": { - "id": "individual/extra_properties/lab_test_result_value", + "mapping": "individual/extra_properties/lab_test_result_value", "title": "Lab Test Result", "description": "This acts as a placeholder for numeric values", "datatype": "number", diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index f54bbcadd..7103aae39 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -290,6 +290,7 @@ def public_overview(_request): field_props = settings.CONFIG_PUBLIC["fields"][field] response["fields"][field] = { **field_props, + "id": field, "data": {} } if field_props["datatype"] == "string": diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index f970af485..b820044db 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -235,7 +235,7 @@ def get_categorical_stats(field_props): """ Fetches statistics for a given categorical field and apply privacy policies """ - model, field_name = get_model_and_field(field_props["id"]) + model, field_name = get_model_and_field(field_props["mapping"]) stats = stats_for_field(model, field_name, add_missing=True) # Enforce values order from config and apply policies @@ -271,7 +271,7 @@ def get_date_stats(field_props): msg = f"Binning dates by `{field_props['config']['bin_by']}` method not implemented" raise NotImplementedError(msg) - model, field_name = get_model_and_field(field_props["id"]) + model, field_name = get_model_and_field(field_props["mapping"]) if "extra_properties" not in field_name: msg = "Binning date-like fields that are not in extra-properties is not implemented" @@ -328,7 +328,7 @@ def get_month_date_range(field_props): msg = f"Binning dates by `{field_props['config']['bin_by']}` method not implemented" raise NotImplementedError(msg) - model, field_name = get_model_and_field(field_props["id"]) + model, field_name = get_model_and_field(field_props["mapping"]) if "extra_properties" not in field_name: msg = "Binning date-like fields that are not in extra-properties is not implemented" @@ -348,7 +348,7 @@ def get_month_date_range(field_props): def get_range_stats(field_props): threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] - model, field = get_model_and_field(field_props["id"]) + model, field = get_model_and_field(field_props["mapping"]) # Generate a list of When conditions that return a label for the given bin. # This is equivalent to an SQL CASE statement. From f447177cba15ecadc5d4fa17c483381c22231093 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Thu, 21 Jul 2022 20:35:43 +0000 Subject: [PATCH 34/59] refactor filtering for public search This uses the latest field config and values --- chord_metadata_service/patients/api_views.py | 33 ++++++-- chord_metadata_service/patients/filters.py | 88 -------------------- chord_metadata_service/restapi/utils.py | 36 ++++++++ 3 files changed, 64 insertions(+), 93 deletions(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index c9351446a..f70fbba00 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -6,9 +6,11 @@ from django.utils.decorators import method_decorator from django.views.decorators.cache import cache_page from django_filters.rest_framework import DjangoFilterBackend +from django.core.exceptions import ValidationError + from .serializers import IndividualSerializer from .models import Individual -from .filters import IndividualFilter, PublicIndividualFilter +from .filters import IndividualFilter from chord_metadata_service.phenopackets.api_views import BIOSAMPLE_PREFETCH, PHENOPACKET_PREFETCH from chord_metadata_service.restapi.api_renderers import ( FHIRRenderer, @@ -17,6 +19,7 @@ ARGORenderer, ) from chord_metadata_service.restapi.pagination import LargeResultsSetPagination +from chord_metadata_service.restapi.utils import get_field_options, filter_queryset_field_value class IndividualViewSet(viewsets.ModelViewSet): @@ -50,12 +53,32 @@ class PublicListIndividuals(APIView): """ View to return only count of all individuals after filtering. """ - filter_backends = [DjangoFilterBackend, ] - filter_class = PublicIndividualFilter def filter_queryset(self, queryset): - for backend in list(self.filter_backends): - queryset = backend().filter_queryset(self.request, queryset, self) + # Check query parameters validity + qp = self.request.query_params + if not 0 < len(qp) < 3: + raise ValidationError(f"Wrong number of fields: {len(qp)}") + + search_conf = settings.CONFIG_PUBLIC["search"] + field_conf = settings.CONFIG_PUBLIC["fields"] + queryable_fields = dict() + for section in search_conf: + queryable_fields.update( + [(f, field_conf[f]) for f in section["fields"]] + ) + + for field, value in qp.items(): + if field not in queryable_fields: + raise ValidationError(f"Unsupported field used in query: {field}") + + field_props = queryable_fields[field] + if value not in get_field_options(field_props): + raise ValidationError(f"Invalid value used in query: {value}") + + # recursion + queryset = filter_queryset_field_value(queryset, field_props, value) + return queryset def get(self, request, *args, **kwargs): diff --git a/chord_metadata_service/patients/filters.py b/chord_metadata_service/patients/filters.py index a1c829680..6fe3dd212 100644 --- a/chord_metadata_service/patients/filters.py +++ b/chord_metadata_service/patients/filters.py @@ -1,5 +1,4 @@ import django_filters -from django.conf import settings from django.db.models import Q from django.db.models import TextField from django.db.models.functions import Cast @@ -168,90 +167,3 @@ def filter_search(self, qs, name, value): ) ).filter(search=value).distinct("id") return qs - - -class PublicIndividualFilter(django_filters.rest_framework.FilterSet): - sex = django_filters.CharFilter(method="filter_sex", label="Sex") - age_range_min = django_filters.NumberFilter( - field_name="age_numeric", method="filter_age_range_min", label="Age range min" - ) - age_range_max = django_filters.NumberFilter( - field_name="age_numeric", method="filter_age_range_max", label="Age range max" - ) - extra_properties = django_filters.CharFilter(method="filter_extra_properties", label="Extra properties") - - def filter_sex(self, qs, name, value): - if "sex" in settings.CONFIG_FIELDS: - qs = qs.filter(sex__iexact=value) - return qs - - def filter_age_range_min(self, qs, name, value): - if "age" in settings.CONFIG_FIELDS: - qs = qs.filter(age_numeric__gte=value) - return qs - - def filter_age_range_max(self, qs, name, value): - if "age" in settings.CONFIG_FIELDS: - from django.db.models.functions import Ceil - # annotate qs with age_numeric ceiling value, age < ceiling value - qs = qs.annotate(age_numeric_ceil=Ceil('age_numeric')).filter(age_numeric_ceil__lt=value) - return qs - - def filter_extra_properties(self, qs, name, value): - if "extra_properties" in settings.CONFIG_FIELDS: - if value.startswith("[") and value.endswith("]"): - # convert query string value to list - try: - value_to_list = list(eval(value)) - # catch if list contains non-existent/random strings (types) - except SyntaxError: - return qs.none() - # check if it's an array of dicts - if False not in [isinstance(v, dict) for v in value_to_list]: - for dict_item in value_to_list: - for search_field_key, search_field_val in settings.CONFIG_FIELDS["extra_properties"].items(): - # add range filter for all number fields - if search_field_val["type"] == "number": - for query_key, query_value in dict_item.items(): - # the query string key must match to the field in CONFIG_FIELDS extra_properties - if query_key == search_field_key: - range_parameters = { - f"extra_properties__{search_field_key}__gte": - query_value["rangeMin"] if "rangeMin" in query_value else None, - f"extra_properties__{search_field_key}__lte": - query_value["rangeMax"] if "rangeMax" in query_value else None - } - for range_key, range_value in range_parameters.items(): - # check for both, or only min or max range values - if range_value is not None: - qs = qs.filter(**{range_key: range_value}) - # add string match filter for all string fields that are not date format - if search_field_val["type"] == "string" and "format" not in search_field_val: - for query_key, query_value in dict_item.items(): - if query_key == search_field_key: - qs = qs.filter( - **{f"extra_properties__{search_field_key}__iexact": query_value} - ) - # add range filter for all string fields that are date format - if search_field_val["type"] == "string" and "format" in search_field_val: - if search_field_val["format"] == "date": - for query_key, query_value in dict_item.items(): - # the query string key must match to the field in CONFIG_FIELDS extra_properties - if query_key == search_field_key: - range_parameters = { - f"extra_properties__{search_field_key}__gte": - query_value["after"] if "after" in query_value else None, - f"extra_properties__{search_field_key}__lte": - query_value["before"] if "before" in query_value else None - } - for range_key, range_value in range_parameters.items(): - # check for both, or only min or max range values - if range_value is not None: - qs = qs.filter(**{range_key: range_value}) - # bad query string return empty queryset - else: - return qs.none() - # bad query string return empty queryset - else: - return qs.none() - return qs diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index b820044db..c4b505ba6 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -390,3 +390,39 @@ def get_field_options(field_props): start, end = get_month_date_range(field_props) options = [f"{month_abbr[m].capitalize()} {y}" for y, m in monthly_generator(start, end)] return options + + +def filter_queryset_field_value(qs, field_props, value: str): + """ + Further filter a queryset using the field defined by field_props and the + given value. + It is assumed that the field mapping defined in field_props is represented + in the queryset object + """ + model, field = get_model_and_field(field_props["mapping"]) + + if field_props["datatype"] == "string": + condition = {f"{field}": value} + elif field_props["datatype"] == "number": + # values are of the form "50-150" or "≥ 800" + if "-" in value: + [start, end] = [int(v) for v in value.split("-")] + condition = { + f"{field}__gte": start, + f"{field}__lt": end + } + else: + [sym, val] = value.split(" ") + if sym == "≥": + condition = {f"{field}__gte": int(val)} + elif sym == "<": + condition = {f"{field}__lt": int(val)} + else: + raise NotImplementedError() + elif field_props["datatype"] == "date": + # For now, limited to date expressed as month/year such as "May 2022" + d = datetime.datetime.strptime(value, "%b %Y") + val = d.strftime("%Y-%m") # convert to "yyyy-mm" format to search for dates as "2022-05-03" + condition = {f"{field}__startswith": val} + + return qs.filter(**condition) From 42b82988b8496a1beb4a8df01c739e5fb1c31ea7 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 14:11:37 +0000 Subject: [PATCH 35/59] implement categories from DB values, not enum Some fields don't have predefined values (e.g. sex in Individual) --- chord_metadata_service/restapi/utils.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index c4b505ba6..0533212bb 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -241,6 +241,10 @@ def get_categorical_stats(field_props): # Enforce values order from config and apply policies threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] labels: list[str] = field_props["config"]["enum"] + # Special case: for some fields, values are based on what's present in the + # dataset. Apply lexical sort in that case. + if labels is None: + labels = sorted(stats.keys(), key=lambda x: x.lower()) bins = [] for category in labels: @@ -381,7 +385,10 @@ def get_field_options(field_props): querying this field. """ if field_props["datatype"] == "string": - options = field_props["config"]["enum"] # TODO: handle enum not available + options = field_props["config"]["enum"] + # Special case: no list of values specified + if options is None: + options = get_distinct_field_values(field_props) elif field_props["datatype"] == "number": options = [label for floor, ceil, label in labelled_range_generator(field_props)] elif field_props["datatype"] == "date": @@ -392,6 +399,11 @@ def get_field_options(field_props): return options +def get_distinct_field_values(field_props): + model, field = get_model_and_field(field_props["mapping"]) + return model.objects.values_list(field, flat=True).order_by(field).distinct() + + def filter_queryset_field_value(qs, field_props, value: str): """ Further filter a queryset using the field defined by field_props and the From a2e59328eccbcdb846a4628a45f554f0fe1dc018 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 14:22:40 +0000 Subject: [PATCH 36/59] fix: handle the "missing" key in categories --- chord_metadata_service/restapi/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index 0533212bb..a84eae637 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -242,9 +242,13 @@ def get_categorical_stats(field_props): threshold = settings.CONFIG_PUBLIC["rules"]["count_threshold"] labels: list[str] = field_props["config"]["enum"] # Special case: for some fields, values are based on what's present in the - # dataset. Apply lexical sort in that case. + # dataset. Apply lexical sort, and exclude the "missing" value which will + # be appended at the end if it is set. if labels is None: - labels = sorted(stats.keys(), key=lambda x: x.lower()) + labels = sorted( + [k for k in stats.keys() if k != "missing"], + key=lambda x: x.lower() + ) bins = [] for category in labels: From 0a01f381948d8233bfbb3a562d68cd16a44e2d20 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 14:33:29 +0000 Subject: [PATCH 37/59] fix: accept request to public without any field This is according to the previous specs. --- chord_metadata_service/patients/api_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index f70fbba00..228a1bf03 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -57,7 +57,7 @@ class PublicListIndividuals(APIView): def filter_queryset(self, queryset): # Check query parameters validity qp = self.request.query_params - if not 0 < len(qp) < 3: + if len(qp) > 2: raise ValidationError(f"Wrong number of fields: {len(qp)}") search_conf = settings.CONFIG_PUBLIC["search"] From 225e7563d68c29de7a7529a602baa4ac10b7e169 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 14:56:52 +0000 Subject: [PATCH 38/59] fix: case insensitive search on categories --- chord_metadata_service/patients/api_views.py | 13 ++++++++++++- chord_metadata_service/restapi/utils.py | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index 228a1bf03..5796e4e72 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -73,7 +73,18 @@ def filter_queryset(self, queryset): raise ValidationError(f"Unsupported field used in query: {field}") field_props = queryable_fields[field] - if value not in get_field_options(field_props): + options = get_field_options(field_props) + if value not in options \ + and not ( + # case insensitive search on categories + field_props["datatype"] == "string" + and value.lower() in [o.lower() for o in options] + ) \ + and not( + # no restriction when enum is not set for categories + field_props["datatype"] == "string" + and field_props["config"]["enum"] is None + ): raise ValidationError(f"Invalid value used in query: {value}") # recursion diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index a84eae637..79aa9bc0d 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -418,7 +418,7 @@ def filter_queryset_field_value(qs, field_props, value: str): model, field = get_model_and_field(field_props["mapping"]) if field_props["datatype"] == "string": - condition = {f"{field}": value} + condition = {f"{field}__iexact": value} elif field_props["datatype"] == "number": # values are of the form "50-150" or "≥ 800" if "-" in value: From 843789333182c7c4e242c0c5c51bd47527222284 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 17:10:48 +0000 Subject: [PATCH 39/59] tests: change mock config file --- .../patients/tests/test_api.py | 140 ++++---------- .../restapi/tests/constants.py | 176 ++++++++++++------ .../restapi/tests/test_api.py | 22 +-- 3 files changed, 163 insertions(+), 175 deletions(-) diff --git a/chord_metadata_service/patients/tests/test_api.py b/chord_metadata_service/patients/tests/test_api.py index cce827b71..70ccf3f22 100644 --- a/chord_metadata_service/patients/tests/test_api.py +++ b/chord_metadata_service/patients/tests/test_api.py @@ -8,7 +8,7 @@ from rest_framework import status from rest_framework.test import APITestCase from chord_metadata_service.patients.models import Individual -from chord_metadata_service.restapi.tests.constants import CONFIG_FIELDS_TEST, CONFIG_FIELDS_TEST_NO_EXTRA_PROPERTIES +from chord_metadata_service.restapi.tests.constants import CONFIG_PUBLIC_TEST from chord_metadata_service.restapi.utils import iso_duration_to_years from . import constants as c @@ -182,7 +182,7 @@ def setUp(self): for individual in individuals: Individual.objects.create(**individual) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_get(self): # no filters GET request to /api/public, returns count or INSUFFICIENT_DATA_AVAILABLE response = self.client.get('/api/public') @@ -197,7 +197,7 @@ def test_public_get(self): else: self.assertEqual(Individual.objects.all().count(), response_obj['count']) - @override_settings(CONFIG_FIELDS={}) + @override_settings(CONFIG_PUBLIC={}) def test_public_get_no_config(self): # no filters GET request to /api/public when config is not provided, returns NO_PUBLIC_DATA_AVAILABLE response = self.client.get('/api/public') @@ -222,22 +222,23 @@ def setUp(self): for individual in individuals: Individual.objects.create(**individual) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_sex(self): # sex field search response = self.client.get('/api/public?sex=female') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() + nb_female = Individual.objects.filter(sex__iexact='female').count() self.assertIn( self.response_threshold_check(response_obj), - [Individual.objects.filter(sex__iexact='female').count(), settings.INSUFFICIENT_DATA_AVAILABLE] + [nb_female, settings.INSUFFICIENT_DATA_AVAILABLE] ) - if Individual.objects.filter(sex__iexact='female').count() <= self.response_threshold: + if nb_female <= self.response_threshold: self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) else: - self.assertEqual(Individual.objects.filter(sex__iexact='female').count(), response_obj['count']) + self.assertEqual(nb_female, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_2_fields(self): # sex and extra_properties string search # test GET query string search for extra_properties field @@ -252,26 +253,8 @@ def test_public_filtering_2_fields(self): else: self.assertEqual(db_count, response_obj['count']) - # test the same as above but with CONFIG_FIELDS without extra_properties values - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST_NO_EXTRA_PROPERTIES) - def test_public_filtering_2_fields_config_no_extra_properties(self): - # sex and extra_properties string search - # test GET query string search for extra_properties field - response = self.client.get('/api/public?sex=female&extra_properties=[{"smoking": "Non-smoker"}]') - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.filter(sex__iexact='female').count() - # if extra_properties are not present in CONFIG_FIELDS then response - # contains a count of objects filtered by any other than extra_properties filter - # or not enough data response if count <= response_threshold - # default behaviour - if db_count > self.response_threshold: - self.assertEqual(db_count, response_obj['count']) - else: - self.assertEqual(settings.INSUFFICIENT_DATA_AVAILABLE, response_obj) - - # test the same as above but with an empty CONFIG_FIELDS - @override_settings(CONFIG_FIELDS={}) + # test the same as above but with an empty CONFIG_PUBLIC + @override_settings(CONFIG_PUBLIC={}) def test_public_filtering_2_fields_config_empty(self): # sex and extra_properties string search # test GET query string search for extra_properties field @@ -281,7 +264,7 @@ def test_public_filtering_2_fields_config_empty(self): self.assertIsInstance(response_obj, dict) self.assertEqual(response_obj, settings.NO_PUBLIC_DATA_AVAILABLE) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_1(self): # extra_properties string search (multiple values) response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, {"death_dc": "Deceased"}]') @@ -296,27 +279,8 @@ def test_public_filtering_extra_properties_1(self): else: self.assertEqual(db_count, response_obj['count']) - # test the same as above but with CONFIG_FIELDS without extra_properties values - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST_NO_EXTRA_PROPERTIES) - def test_public_filtering_extra_properties_1_config_no_extra_properties(self): - # extra_properties string search - # test GET query string search for extra_properties field - response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, {"death_dc": "Deceased"}]') - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.count() - # if extra_properties are not present in CONFIG_FIELDS then response - # contains a count of objects filtered by any other than extra_properties filter - # or not enough data response if count <= response_threshold - # in this test other filters are not used and the response contains count of all objects in db - # default behaviour - if db_count > self.response_threshold: - self.assertEqual(db_count, response_obj['count']) - else: - self.assertEqual(settings.INSUFFICIENT_DATA_AVAILABLE, response_obj) - - # test the same as above but with an empty CONFIG_FIELDS - @override_settings(CONFIG_FIELDS={}) + # test the same as above but with an empty CONFIG_PUBLIC + @override_settings(CONFIG_PUBLIC={}) def test_public_filtering_extra_properties_1_config_empty(self): # extra_properties string search # test GET query string search for extra_properties field @@ -326,7 +290,7 @@ def test_public_filtering_extra_properties_1_config_empty(self): self.assertIsInstance(response_obj, dict) self.assertEqual(response_obj, settings.NO_PUBLIC_DATA_AVAILABLE) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_2(self): # extra_properties string search (multiple values) response = self.client.get( @@ -344,28 +308,28 @@ def test_public_filtering_extra_properties_2(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_invalid_1(self): # if GET query string doesn't have a list return INSUFFICIENT_DATA_AVAILABLE response = self.client.get('/api/public?extra_properties="smoking": "Non-smoker","death_dc": "deceased"') self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.json(), settings.INSUFFICIENT_DATA_AVAILABLE) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_invalid_2(self): # if GET query string has a random stuff return INSUFFICIENT_DATA_AVAILABLE response = self.client.get('/api/public?extra_properties=["smoking": "Non-smoker", "5", "Test"]') self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.json(), settings.INSUFFICIENT_DATA_AVAILABLE) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_invalid_3(self): # if GET query string list has various data types INSUFFICIENT_DATA_AVAILABLE response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, 5, "Test"]') self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.json(), settings.INSUFFICIENT_DATA_AVAILABLE) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_1(self): # extra_properties range search (both min and max ranges, single value) response = self.client.get( @@ -384,7 +348,7 @@ def test_public_filtering_extra_properties_range_1(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_2(self): # extra_properties range search (only min range, single value) response = self.client.get( @@ -402,7 +366,7 @@ def test_public_filtering_extra_properties_range_2(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_3(self): # extra_properties range search (only min range, single value) response = self.client.get( @@ -420,7 +384,7 @@ def test_public_filtering_extra_properties_range_3(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_string_1(self): # sex string search and extra_properties range search (both min and max ranges, single value) response = self.client.get( @@ -440,27 +404,7 @@ def test_public_filtering_extra_properties_range_string_1(self): else: self.assertEqual(db_count, response_obj['count']) - # test the same as above but with CONFIG_FIELDS without extra_properties values - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST_NO_EXTRA_PROPERTIES) - def test_public_filtering_extra_properties_range_string_1_config_no_extra_properties(self): - # sex and extra_properties string search - # test GET query string search for extra_properties field - response = self.client.get( - '/api/public?sex=female&extra_properties=[{"lab_test_result_value": {"rangeMin": 5, "rangeMax": 900}}]' - ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.filter(sex__iexact="female").count() - # if extra_properties are not present in CONFIG_FIELDS then response - # contains a count of objects filtered by any other than extra_properties filter - # or not enough data response if count <= response_threshold - # default behaviour - if db_count > self.response_threshold: - self.assertEqual(db_count, response_obj['count']) - else: - self.assertEqual(settings.INSUFFICIENT_DATA_AVAILABLE, response_obj) - - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_string_2(self): # extra_properties range search (both min and max ranges) and extra_properties string search (single value) response = self.client.get( @@ -481,7 +425,7 @@ def test_public_filtering_extra_properties_range_string_2(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_string_3(self): # extra_properties range search (only max range) and extra_properties string search (multiple values) response = self.client.get( @@ -502,7 +446,7 @@ def test_public_filtering_extra_properties_range_string_3(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_multiple_ranges_1(self): # extra_properties range search (both min and max range, multiple values) response = self.client.get( @@ -524,7 +468,7 @@ def test_public_filtering_extra_properties_multiple_ranges_1(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_multiple_ranges_2(self): # extra_properties range search (only min or max range, multiple values) response = self.client.get( @@ -544,7 +488,7 @@ def test_public_filtering_extra_properties_multiple_ranges_2(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_date_range_1(self): # extra_properties date range search (only after or before, single value) response = self.client.get( @@ -562,7 +506,7 @@ def test_public_filtering_extra_properties_date_range_1(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_date_range_2(self): # extra_properties date range search (both after and before, single value) response = self.client.get( @@ -581,23 +525,7 @@ def test_public_filtering_extra_properties_date_range_2(self): else: self.assertEqual(db_count, response_obj['count']) - # test the same as above but with CONFIG_FIELDS without extra_properties values - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST_NO_EXTRA_PROPERTIES) - def test_public_filtering_extra_properties_date_range_no_extra_properties(self): - # extra_properties date range search (both after and before, single value) - response = self.client.get( - '/api/public?extra_properties=[{"date_of_consent": {"after": "2020-03-01", "before": "2021-05-01"}}]' - ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_date_range_and_other_range(self): # extra_properties date range search (both after and before, single value) and other number range search response = self.client.get( @@ -643,7 +571,7 @@ def setUp(self): individual.age_unit = age_unit if age_unit else "" individual.save() - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_age_range_min(self): # age range min search response = self.client.get('/api/public?age_range_min=20') @@ -656,7 +584,7 @@ def test_public_filtering_age_range_min(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_age_range_max(self): # age range max search response = self.client.get('/api/public?age_range_max=32') @@ -671,7 +599,7 @@ def test_public_filtering_age_range_max(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_age_range_min_and_max(self): # age range min and max search response = self.client.get('/api/public?age_range_min=16&age_range_max=35') @@ -690,7 +618,7 @@ def test_public_filtering_age_range_min_and_max(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS={"sex": {"type": "string"}}) + @override_settings(CONFIG_PUBLIC={"sex": {"type": "string"}}) def test_public_filtering_age_range_min_and_max_no_age_in_config(self): # test with config without age field, returns initial queryset response = self.client.get('/api/public?age_range_min=16&age_range_max=35') @@ -703,7 +631,7 @@ def test_public_filtering_age_range_min_and_max_no_age_in_config(self): else: self.assertEqual(db_count, response_obj['count']) - @override_settings(CONFIG_FIELDS={}) + @override_settings(CONFIG_PUBLIC={}) def test_public_filtering_age_range_min_and_max_no_config(self): # test when config is not provided, returns NO_PUBLIC_DATA_AVAILABLE response = self.client.get('/api/public?age_range_min=16&age_range_max=35') diff --git a/chord_metadata_service/restapi/tests/constants.py b/chord_metadata_service/restapi/tests/constants.py index d02a3243a..70bef2160 100644 --- a/chord_metadata_service/restapi/tests/constants.py +++ b/chord_metadata_service/restapi/tests/constants.py @@ -246,75 +246,135 @@ ] -CONFIG_FIELDS_TEST = { - "sex": { - "type": "string", - "enum": [ - "Male", - "Female" - ], - "title": "Sex" - }, - "age": { - "type": "number", - "title": "Age", - "bin_size": 10 - }, - "extra_properties": { +CONFIG_PUBLIC_TEST = { + "overview": [ + { + "section_title": "First Section", + "charts": [ + {"field": "age", "chart_type": "bar"}, + {"field": "sex", "chart_type": "pie"}, + ] + }, + { + "section_title": "Second Section", + "charts": [ + {"field": "date_of_consent", "chart_type": "bar"}, + {"field": "smoking", "chart_type": "bar"}, + ] + } + ], + "search": [ + { + "section_title": "First Section", + "fields": [ + "sex", "age", "smoking", "covidstatus", "death_dc", + "lab_test_result_value", "baseline_creatinine", "date_of_consent" + ] + } + ], + "fields": { + "sex": { + "mapping": "individual/sex", + "title": "Sex", + "description": "Sex at birth", + "datatype": "string", + "config": { + "enum": None + } + }, + "age": { + "mapping": "individual/age_numeric", + "title": "Age", + "description": "Age at arrival", + "datatype": "number", + "config": { + "bin_size": 10, + "taper_left": 10, + "taper_right": 100, + "units": "years", + "minimum": 0, + "maximum": 100 + } + }, "smoking": { - "type": "string", - "enum": [ - "Non-smoker", - "Smoker", - "Former smoker", - "Passive smoker", - "Not specified" - ], - "title": "Smoking" + "mapping": "individual/extra_properties/smoking", + "title": "Smoking", + "description": "Smoking exposure", + "datatype": "string", + "config": { + "enum": [ + "Non-smoker", + "Smoker", + "Former smoker", + "Passive smoker", + "Not specified" + ] + } }, "covidstatus": { - "type": "string", - "enum": [ - "Positive", - "Negative", - "Indeterminate" - ], - "title": "Covidstatus" + "mapping": "individual/extra_properties/covidstatus", + "title": "Covid status", + "description": "Covid status", + "datatype": "string", + "config": { + "enum": [ + "Positive", + "Negative", + "Indeterminate" + ] + } }, "death_dc": { - "type": "string", - "enum": [ - "Alive", - "Deceased" - ], - "title": "Death" + "mapping": "individual/extra_properties/death_dc", + "title": "Death", + "description": "Death status", + "datatype": "string", + "config": { + "enum": [ + "Alive", + "Deceased" + ] + } }, "lab_test_result_value": { - "type": "number", - "title": "Lab test result", - "minimum": 0, - "maximum": 999.99 + "mapping": "individual/extra_properties/lab_test_result_value", + "title": "Lab Test Result", + "description": "This acts as a placeholder for numeric values", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + } }, "baseline_creatinine": { - "type": "number", - "title": "Baseline creatinine" + "mapping": "individual/extra_properties/baseline_creatinine", + "title": "Creatinine", + "description": "Baseline Creatinine", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + } }, "date_of_consent": { - "type": "string", - "format": "date", - "title": "Date of consent" + "mapping": "individual/extra_properties/date_of_consent", + "title": "Verbal consent date", + "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", + "datatype": "date", + "config": { + "bin_by": "month" + } } - } -} - -CONFIG_FIELDS_TEST_NO_EXTRA_PROPERTIES = { - "sex": { - "type": "string", - "enum": [ - "Male", - "Female" - ], - "title": "Sex", - "bin_size": 10 + }, + "rules": { + "count_threshold": 5 } } diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 6f76601d5..14dd9fceb 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -19,7 +19,7 @@ from chord_metadata_service.mcode.tests import constants as mcode_c from .constants import ( - CONFIG_FIELDS_TEST, + CONFIG_PUBLIC_TEST, VALID_INDIVIDUALS, INDIVIDUALS_NOT_ACCEPTED_DATA_TYPES_LIST, INDIVIDUALS_NOT_ACCEPTED_DATA_TYPES_DICT @@ -156,14 +156,14 @@ def test_mcode_overview(self): class PublicSearchFieldsTest(APITestCase): - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_search_fields_configured(self): response = self.client.get(reverse("public-search-fields"), content_type="application/json") self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() - self.assertDictEqual(response_obj, settings.CONFIG_FIELDS) + self.assertDictEqual(response_obj, settings.CONFIG_PUBLIC) - @override_settings(CONFIG_FIELDS={}) + @override_settings(CONFIG_PUBLIC={}) def test_public_search_fields_not_configured(self): response = self.client.get(reverse("public-search-fields"), content_type="application/json") self.assertEqual(response.status_code, status.HTTP_200_OK) @@ -197,7 +197,7 @@ def setUp(self) -> None: experiment_2["id"] = "experiment:2" self.experiment = exp_m.Experiment.objects.create(**experiment_2) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_overview(self): response = self.client.get('/api/public_overview') response_obj = response.json() @@ -206,7 +206,7 @@ def test_overview(self): self.assertIsInstance(response_obj, dict) self.assertEqual(response_obj["individuals"], db_count) - @override_settings(CONFIG_FIELDS={}) + @override_settings(CONFIG_PUBLIC={}) def test_overview_no_config(self): response = self.client.get('/api/public_overview') response_obj = response.json() @@ -221,7 +221,7 @@ def setUp(self) -> None: for ind in VALID_INDIVIDUALS[:2]: ph_m.Individual.objects.create(**ind) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_overview_response(self): # test overview response when individuals count < threshold response = self.client.get('/api/public_overview') @@ -231,7 +231,7 @@ def test_overview_response(self): self.assertNotIn("individuals", response_obj) self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - @override_settings(CONFIG_FIELDS={}) + @override_settings(CONFIG_PUBLIC={}) def test_overview_response_no_config(self): # test overview response when individuals count < threshold response = self.client.get('/api/public_overview') @@ -247,7 +247,7 @@ def setUp(self) -> None: for ind in INDIVIDUALS_NOT_ACCEPTED_DATA_TYPES_LIST: ph_m.Individual.objects.create(**ind) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_overview_response(self): # test overview response with passing TypeError exception response = self.client.get('/api/public_overview') @@ -270,7 +270,7 @@ def setUp(self) -> None: for ind in INDIVIDUALS_NOT_ACCEPTED_DATA_TYPES_DICT: ph_m.Individual.objects.create(**ind) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_overview_response(self): # test overview response with passing TypeError exception response = self.client.get('/api/public_overview') @@ -316,7 +316,7 @@ def setUp(self) -> None: table=table ) - @override_settings(CONFIG_FIELDS=CONFIG_FIELDS_TEST) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_overview(self): response = self.client.get('/api/public_overview') response_obj = response.json() From dd0b61005f5568ee15d3ee02043d6e5d2bb155fe Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 17:48:28 +0000 Subject: [PATCH 40/59] public spec: return insuff data when too few indiv. --- chord_metadata_service/restapi/api_views.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 7103aae39..42df2061c 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -257,6 +257,14 @@ def public_overview(_request): if not settings.CONFIG_PUBLIC: return Response(settings.NO_PUBLIC_DATA_AVAILABLE) + # Predefined counts + individuals_count = patients_models.Individual.objects.all().count() + experiments_count = experiments_models.Experiment.objects.all().count() + + # Early return when there is not enough data + if individuals_count < settings.CONFIG_PUBLIC["rules"]["count_threshold"]: + return Response(settings.INSUFFICIENT_DATA_AVAILABLE) + # Datasets provenance metadata datasets = chord_models.Dataset.objects.values( "title", "description", "contact_info", @@ -268,10 +276,6 @@ def public_overview(_request): "extra_properties" ) - # Predefined counts - individuals_count = patients_models.Individual.objects.all().count() - experiments_count = experiments_models.Experiment.objects.all().count() - response = { "datasets": datasets, "layout": settings.CONFIG_PUBLIC["overview"], From a7656be705aebde82c999d435a320eebdd0b2031 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 18:44:51 +0000 Subject: [PATCH 41/59] fix: manage datasets with no date in extra properties --- chord_metadata_service/restapi/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index 79aa9bc0d..ee4550f85 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -348,6 +348,9 @@ def get_month_date_range(field_props): .values(field_name)\ .order_by(field_name) + if query_set.count() == 0: + return None, None + start = query_set.first()[field_name][:LENGTH_Y_M] end = query_set.last()[field_name][:LENGTH_Y_M] @@ -399,7 +402,7 @@ def get_field_options(field_props): # Assumes the field is in extra_properties, thus can not be aggregated # using SQL MIN/MAX functions start, end = get_month_date_range(field_props) - options = [f"{month_abbr[m].capitalize()} {y}" for y, m in monthly_generator(start, end)] + options = [f"{month_abbr[m].capitalize()} {y}" for y, m in monthly_generator(start, end)] if start else [] return options From cbe586a2606c0179979c5e73e9c3117bb8e6fc6c Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 18:45:45 +0000 Subject: [PATCH 42/59] fixing tests --- .../restapi/tests/test_api.py | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 14dd9fceb..3fbf80983 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -161,7 +161,10 @@ def test_public_search_fields_configured(self): response = self.client.get(reverse("public-search-fields"), content_type="application/json") self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() - self.assertDictEqual(response_obj, settings.CONFIG_PUBLIC) + self.assertSetEqual( + set(field["id"] for section in response_obj for field in section["fields"]), + set(field for section in settings.CONFIG_PUBLIC["search"] for field in section["fields"]) + ) @override_settings(CONFIG_PUBLIC={}) def test_public_search_fields_not_configured(self): @@ -204,7 +207,7 @@ def test_overview(self): db_count = ph_m.Individual.objects.all().count() self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertIsInstance(response_obj, dict) - self.assertEqual(response_obj["individuals"], db_count) + self.assertEqual(response_obj["counts"]["individuals"], db_count) @override_settings(CONFIG_PUBLIC={}) def test_overview_no_config(self): @@ -228,7 +231,7 @@ def test_overview_response(self): response_obj = response.json() self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertIsInstance(response_obj, dict) - self.assertNotIn("individuals", response_obj) + self.assertNotIn("counts", response_obj) self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) @override_settings(CONFIG_PUBLIC={}) @@ -255,9 +258,9 @@ def test_overview_response(self): self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertIsInstance(response_obj, dict) # the field name is present, but the keys are not (except 'missing') - self.assertIn("baseline_creatinine", response_obj["extra_properties"]) - self.assertIn("missing", response_obj["extra_properties"]["baseline_creatinine"]) - self.assertEqual(8, response_obj["extra_properties"]["baseline_creatinine"]["missing"]) + self.assertIn("baseline_creatinine", response_obj["fields"]) + self.assertIn("missing", response_obj["fields"]["baseline_creatinine"]) + self.assertEqual(8, response_obj["fields"]["baseline_creatinine"]["missing"]) # if we add support for an array values for the public_overview # then this assertion will fail, so far there is no support for it self.assertNotIn(100, response_obj["extra_properties"]["baseline_creatinine"]) @@ -278,9 +281,9 @@ def test_overview_response(self): self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertIsInstance(response_obj, dict) # the field name is present, but the keys are not (except 'missing') - self.assertIn("baseline_creatinine", response_obj["extra_properties"]) - self.assertIn("missing", response_obj["extra_properties"]["baseline_creatinine"]) - self.assertEqual(8, response_obj["extra_properties"]["baseline_creatinine"]["missing"]) + self.assertIn("baseline_creatinine", response_obj["fields"]) + self.assertIn("missing", response_obj["fields"]["baseline_creatinine"]) + self.assertEqual(8, response_obj["fields"]["baseline_creatinine"]["missing"]) class PublicOverviewDatasetsMetadataTest(APITestCase): @@ -323,8 +326,22 @@ def test_overview(self): db_count = ph_m.Individual.objects.all().count() self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertIsInstance(response_obj, dict) - self.assertEqual(response_obj["individuals"], db_count) + # counts + self.assertEqual(response_obj["counts"]["individuals"], db_count) + + # datasets self.assertIsInstance(response_obj["datasets"], list) for dataset in response_obj["datasets"]: self.assertIn("title", dataset.keys()) self.assertIsNotNone(dataset["title"]) + + # layout + self.assertIn("layout", response_obj) + self.assertEqual(response_obj["layout"], settings.CONFIG_PUBLIC["overview"]) + + # fields + self.assertIn("fields", response_obj) + self.assertSetEqual( + set(response_obj["fields"].keys()), + set(chart["field"] for section in settings.CONFIG_PUBLIC["overview"] for chart in section["charts"]) + ) From 5b4680561c4cfebf637ac6a227d4aaeb777b5e56 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 19:03:28 +0000 Subject: [PATCH 43/59] fix tests --- chord_metadata_service/restapi/tests/constants.py | 1 + chord_metadata_service/restapi/tests/test_api.py | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/chord_metadata_service/restapi/tests/constants.py b/chord_metadata_service/restapi/tests/constants.py index 70bef2160..e3c3b8b2d 100644 --- a/chord_metadata_service/restapi/tests/constants.py +++ b/chord_metadata_service/restapi/tests/constants.py @@ -260,6 +260,7 @@ "charts": [ {"field": "date_of_consent", "chart_type": "bar"}, {"field": "smoking", "chart_type": "bar"}, + {"field": "baseline_creatinine", "chart_type": "bar"} ] } ], diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 3fbf80983..dd2430633 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -259,11 +259,13 @@ def test_overview_response(self): self.assertIsInstance(response_obj, dict) # the field name is present, but the keys are not (except 'missing') self.assertIn("baseline_creatinine", response_obj["fields"]) - self.assertIn("missing", response_obj["fields"]["baseline_creatinine"]) - self.assertEqual(8, response_obj["fields"]["baseline_creatinine"]["missing"]) + self.assertIn("missing", response_obj["fields"]["baseline_creatinine"]["data"][-1]["label"]) + self.assertEqual(8, response_obj["fields"]["baseline_creatinine"]["data"][-1]["value"]) # if we add support for an array values for the public_overview # then this assertion will fail, so far there is no support for it - self.assertNotIn(100, response_obj["extra_properties"]["baseline_creatinine"]) + self.assertNotIn( + 100, + [data["value"] for data in response_obj["fields"]["baseline_creatinine"]["data"]]) class PublicOverviewNotSupportedDataTypesDictTest(APITestCase): @@ -282,8 +284,8 @@ def test_overview_response(self): self.assertIsInstance(response_obj, dict) # the field name is present, but the keys are not (except 'missing') self.assertIn("baseline_creatinine", response_obj["fields"]) - self.assertIn("missing", response_obj["fields"]["baseline_creatinine"]) - self.assertEqual(8, response_obj["fields"]["baseline_creatinine"]["missing"]) + self.assertIn("missing", response_obj["fields"]["baseline_creatinine"]["data"][-1]["label"]) + self.assertEqual(8, response_obj["fields"]["baseline_creatinine"]["data"][-1]["value"]) class PublicOverviewDatasetsMetadataTest(APITestCase): From de2fa3a3396ad60a753c30450b0865d935a9bfcb Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 25 Jul 2022 20:47:47 +0000 Subject: [PATCH 44/59] theshold consistency: remove when below OR EQUAL --- chord_metadata_service/patients/api_views.py | 2 +- chord_metadata_service/restapi/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index 5796e4e72..f5a72f167 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -99,7 +99,7 @@ def get(self, request, *args, **kwargs): base_qs = Individual.objects.all() filtered_qs = self.filter_queryset(base_qs) - if filtered_qs.count() >= settings.CONFIG_PUBLIC["rules"]["count_threshold"]: + if filtered_qs.count() > settings.CONFIG_PUBLIC["rules"]["count_threshold"]: return Response({"count": filtered_qs.count()}) else: # the count < threshold when there is no match in db the queryset is empty, count = 0 diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index ee4550f85..f12712231 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -253,7 +253,7 @@ def get_categorical_stats(field_props): for category in labels: v = stats.get(category, 0) - if v and v < threshold: + if v and v <= threshold: v = 0 bins.append({"label": category, "value": v}) @@ -313,7 +313,7 @@ def get_date_stats(field_props): v = stats.get(key, 0) bins.append({ "label": label, - "value": 0 if v < threshold else v + "value": 0 if v <= threshold else v }) # Append missing items at the end if any From ff36256e1d84c79a0737eb3bd9186b7c699d0fcf Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 11:30:49 +0000 Subject: [PATCH 45/59] fix tests for latest config file --- .../patients/tests/test_api.py | 247 ++++-------------- .../restapi/tests/constants.py | 3 + 2 files changed, 50 insertions(+), 200 deletions(-) diff --git a/chord_metadata_service/patients/tests/test_api.py b/chord_metadata_service/patients/tests/test_api.py index 70ccf3f22..e6b73a8d7 100644 --- a/chord_metadata_service/patients/tests/test_api.py +++ b/chord_metadata_service/patients/tests/test_api.py @@ -4,11 +4,10 @@ from django.conf import settings from django.urls import reverse from django.test import override_settings -from django.db.models.functions import Ceil from rest_framework import status from rest_framework.test import APITestCase from chord_metadata_service.patients.models import Individual -from chord_metadata_service.restapi.tests.constants import CONFIG_PUBLIC_TEST +from chord_metadata_service.restapi.tests.constants import CONFIG_PUBLIC_TEST, CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY from chord_metadata_service.restapi.utils import iso_duration_to_years from . import constants as c @@ -210,7 +209,7 @@ def test_public_get_no_config(self): class PublicFilteringIndividualsTest(APITestCase): """ Test for api/public GET filtering """ - response_threshold = 5 + response_threshold = CONFIG_PUBLIC_TEST["rules"]["count_threshold"] random_range = 137 @staticmethod @@ -242,7 +241,7 @@ def test_public_filtering_sex(self): def test_public_filtering_2_fields(self): # sex and extra_properties string search # test GET query string search for extra_properties field - response = self.client.get('/api/public?sex=female&extra_properties=[{"smoking": "Smoker"}]') + response = self.client.get('/api/public?sex=female&smoking=Smoker') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() db_count = Individual.objects.filter(sex__iexact='female')\ @@ -258,7 +257,7 @@ def test_public_filtering_2_fields(self): def test_public_filtering_2_fields_config_empty(self): # sex and extra_properties string search # test GET query string search for extra_properties field - response = self.client.get('/api/public?sex=female&extra_properties=[{"smoking": "Non-smoker"}]') + response = self.client.get('/api/public?sex=female&smoking=Non-smoker') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() self.assertIsInstance(response_obj, dict) @@ -267,7 +266,7 @@ def test_public_filtering_2_fields_config_empty(self): @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_1(self): # extra_properties string search (multiple values) - response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, {"death_dc": "Deceased"}]') + response = self.client.get('/api/public?smoking=Non-smoker&death_dc=Deceased') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() db_count = Individual.objects.filter( @@ -284,7 +283,7 @@ def test_public_filtering_extra_properties_1(self): def test_public_filtering_extra_properties_1_config_empty(self): # extra_properties string search # test GET query string search for extra_properties field - response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, {"death_dc": "Deceased"}]') + response = self.client.get('/api/public?smoking=Non-smoker&death_dc=Deceased') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() self.assertIsInstance(response_obj, dict) @@ -294,52 +293,27 @@ def test_public_filtering_extra_properties_1_config_empty(self): def test_public_filtering_extra_properties_2(self): # extra_properties string search (multiple values) response = self.client.get( - '/api/public?extra_properties=[{"smoking": "Non-smoker"},' - '{"death_dc": "deceased"},{"covidstatus": "positive"}]' + '/api/public?smoking=Non-smoker&death_dc=deceased&covidstatus=positive' ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.filter( - extra_properties__contains={"smoking": "Non-smoker", "death_dc": "Deceased", "covidstatus": "Positive"} - ).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_invalid_1(self): - # if GET query string doesn't have a list return INSUFFICIENT_DATA_AVAILABLE - response = self.client.get('/api/public?extra_properties="smoking": "Non-smoker","death_dc": "deceased"') - self.assertEqual(response.status_code, status.HTTP_200_OK) - self.assertEqual(response.json(), settings.INSUFFICIENT_DATA_AVAILABLE) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_invalid_2(self): - # if GET query string has a random stuff return INSUFFICIENT_DATA_AVAILABLE - response = self.client.get('/api/public?extra_properties=["smoking": "Non-smoker", "5", "Test"]') - self.assertEqual(response.status_code, status.HTTP_200_OK) - self.assertEqual(response.json(), settings.INSUFFICIENT_DATA_AVAILABLE) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_invalid_3(self): - # if GET query string list has various data types INSUFFICIENT_DATA_AVAILABLE + # if GET query string list has various data types Error response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, 5, "Test"]') - self.assertEqual(response.status_code, status.HTTP_200_OK) - self.assertEqual(response.json(), settings.INSUFFICIENT_DATA_AVAILABLE) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_1(self): # extra_properties range search (both min and max ranges, single value) response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 50, "rangeMax": 999}}]' + '/api/public?lab_test_result_value=50-100' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { "extra_properties__lab_test_result_value__gte": 50, - "extra_properties__lab_test_result_value__lte": 999 + "extra_properties__lab_test_result_value__lt": 100 } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -349,53 +323,25 @@ def test_public_filtering_extra_properties_range_1(self): self.assertEqual(db_count, response_obj['count']) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_range_2(self): - # extra_properties range search (only min range, single value) + def test_public_filtering_extra_properties_wrong_range(self): + # extra_properties range search, unauthorized range response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 50}}]' + '/api/public?lab_test_result_value=100-200' ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - range_parameters = { - "extra_properties__lab_test_result_value__gte": 50 - } - db_count = Individual.objects.filter(**range_parameters).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_range_3(self): - # extra_properties range search (only min range, single value) - response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMax": 100}}]' - ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - range_parameters = { - "extra_properties__lab_test_result_value__lte": 100 - } - db_count = Individual.objects.filter(**range_parameters).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_string_1(self): - # sex string search and extra_properties range search (both min and max ranges, single value) + # sex string search and extra_properties range search response = self.client.get( - '/api/public?sex=female&extra_properties=[{"lab_test_result_value": {"rangeMin": 5, "rangeMax": 900}}]' + '/api/public?sex=female&lab_test_result_value=100-150' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { "sex__iexact": "female", - "extra_properties__lab_test_result_value__gte": 5, - "extra_properties__lab_test_result_value__lte": 900 + "extra_properties__lab_test_result_value__gte": 100, + "extra_properties__lab_test_result_value__lt": 150 } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -408,36 +354,14 @@ def test_public_filtering_extra_properties_range_string_1(self): def test_public_filtering_extra_properties_range_string_2(self): # extra_properties range search (both min and max ranges) and extra_properties string search (single value) response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 5, "rangeMax": 900}}, ' - '{"covidstatus": "positive"}]' - ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - range_parameters = { - "extra_properties__lab_test_result_value__gte": 5, - "extra_properties__lab_test_result_value__lte": 900, - "extra_properties__covidstatus__iexact": "positive", - } - db_count = Individual.objects.filter(**range_parameters).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_range_string_3(self): - # extra_properties range search (only max range) and extra_properties string search (multiple values) - response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMax": 400}}, ' - '{"covidstatus": "positive"}, {"smoking": "smoker"}]' + '/api/public?lab_test_result_value=100-150&covidstatus=positive' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { - "extra_properties__lab_test_result_value__lte": 400, + "extra_properties__lab_test_result_value__gte": 100, + "extra_properties__lab_test_result_value__lt": 150, "extra_properties__covidstatus__iexact": "positive", - "extra_properties__smoking__iexact": "smoker", } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -450,36 +374,15 @@ def test_public_filtering_extra_properties_range_string_3(self): def test_public_filtering_extra_properties_multiple_ranges_1(self): # extra_properties range search (both min and max range, multiple values) response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 5, "rangeMax": 900}}, ' - '{"baseline_creatinine": {"rangeMin": 30, "rangeMax": 300}}]' + '/api/public?lab_test_result_value=100-150&baseline_creatinine=100-150' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { - "extra_properties__lab_test_result_value__gte": 5, - "extra_properties__lab_test_result_value__lte": 900, - "extra_properties__baseline_creatinine__gte": 30, - "extra_properties__baseline_creatinine__lte": 300, - } - db_count = Individual.objects.filter(**range_parameters).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_multiple_ranges_2(self): - # extra_properties range search (only min or max range, multiple values) - response = self.client.get( - '/api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 5}}, ' - '{"baseline_creatinine": {"rangeMax": 300}}]' - ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - range_parameters = { - "extra_properties__lab_test_result_value__gte": 5, - "extra_properties__baseline_creatinine__lte": 300, + "extra_properties__lab_test_result_value__gte": 100, + "extra_properties__lab_test_result_value__lt": 150, + "extra_properties__baseline_creatinine__gte": 100, + "extra_properties__baseline_creatinine__lt": 150, } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -492,31 +395,12 @@ def test_public_filtering_extra_properties_multiple_ranges_2(self): def test_public_filtering_extra_properties_date_range_1(self): # extra_properties date range search (only after or before, single value) response = self.client.get( - '/api/public?extra_properties=[{"date_of_consent": {"after": "2020-03-01"}}]' + '/api/public?date_of_consent=Mar 2021' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { - "extra_properties__date_of_consent__gte": "2020-03-01" - } - db_count = Individual.objects.filter(**range_parameters).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_extra_properties_date_range_2(self): - # extra_properties date range search (both after and before, single value) - response = self.client.get( - '/api/public?extra_properties=[{"date_of_consent": {"after": "2020-03-01", "before": "2021-05-01"}}]' - ) - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - range_parameters = { - "extra_properties__date_of_consent__gte": "2020-03-01", - "extra_properties__date_of_consent__lte": "2021-05-01", + "extra_properties__date_of_consent__contains": "2021-03" } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -529,16 +413,14 @@ def test_public_filtering_extra_properties_date_range_2(self): def test_public_filtering_extra_properties_date_range_and_other_range(self): # extra_properties date range search (both after and before, single value) and other number range search response = self.client.get( - '/api/public?extra_properties=[{"date_of_consent": {"after": "2020-03-01", "before": "2021-05-01"}},' - ' {"lab_test_result_value": {"rangeMin": 5, "rangeMax": 300}}]' + '/api/public?date_of_consent=Mar 2021&lab_test_result_value=100-150' ) self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { - "extra_properties__date_of_consent__gte": "2020-03-01", - "extra_properties__date_of_consent__lte": "2021-05-01", - "extra_properties__lab_test_result_value__gte": 5, - "extra_properties__lab_test_result_value__lte": 300, + "extra_properties__date_of_consent__contains": "2021-03", + "extra_properties__lab_test_result_value__gte": 100, + "extra_properties__lab_test_result_value__lt": 150, } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -572,27 +454,12 @@ def setUp(self): individual.save() @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_age_range_min(self): - # age range min search - response = self.client.get('/api/public?age_range_min=20') - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.filter(age_numeric__gte=20).count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) - - @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_age_range_max(self): - # age range max search - response = self.client.get('/api/public?age_range_max=32') + def test_public_filtering_age_range(self): + # age valid range search + response = self.client.get('/api/public?age=20-30') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() - db_count = Individual.objects.annotate(age_numeric_ceil=Ceil('age_numeric'))\ - .filter(age_numeric_ceil__lt=32)\ - .count() + db_count = Individual.objects.filter(age_numeric__gte=20, age_numeric__lt=30).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) if db_count <= self.response_threshold: self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) @@ -600,41 +467,21 @@ def test_public_filtering_age_range_max(self): self.assertEqual(db_count, response_obj['count']) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) - def test_public_filtering_age_range_min_and_max(self): - # age range min and max search - response = self.client.get('/api/public?age_range_min=16&age_range_max=35') - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - range_parameters = { - "age_numeric__gte": 16, - "age_numeric_ceil__lt": 35 - } - db_count = Individual.objects.annotate(age_numeric_ceil=Ceil('age_numeric'))\ - .filter(**range_parameters)\ - .count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) + def test_public_filtering_age_invalid_range(self): + # age invalid range max search + response = self.client.get('/api/public?age=10-50') + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) - @override_settings(CONFIG_PUBLIC={"sex": {"type": "string"}}) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY) def test_public_filtering_age_range_min_and_max_no_age_in_config(self): - # test with config without age field, returns initial queryset - response = self.client.get('/api/public?age_range_min=16&age_range_max=35') - self.assertEqual(response.status_code, status.HTTP_200_OK) - response_obj = response.json() - db_count = Individual.objects.count() - self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) - if db_count <= self.response_threshold: - self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) - else: - self.assertEqual(db_count, response_obj['count']) + # test with config without age field, returns error + response = self.client.get('/api/public?age=20-30') + self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) @override_settings(CONFIG_PUBLIC={}) def test_public_filtering_age_range_min_and_max_no_config(self): # test when config is not provided, returns NO_PUBLIC_DATA_AVAILABLE - response = self.client.get('/api/public?age_range_min=16&age_range_max=35') + response = self.client.get('/api/public?age=20-30') self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() self.assertIsInstance(response_obj, dict) diff --git a/chord_metadata_service/restapi/tests/constants.py b/chord_metadata_service/restapi/tests/constants.py index e3c3b8b2d..44a4c3339 100644 --- a/chord_metadata_service/restapi/tests/constants.py +++ b/chord_metadata_service/restapi/tests/constants.py @@ -379,3 +379,6 @@ "count_threshold": 5 } } + +CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY = deepcopy(CONFIG_PUBLIC_TEST) +CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY["search"][0]["fields"] = ["sex"] From d17a3cf57e57a8de8673b5eea582203e4d7db999 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 11:31:43 +0000 Subject: [PATCH 46/59] catch validation errors and wrap with bento_lib --- chord_metadata_service/patients/api_views.py | 8 +++++++- .../patients/tests/test_api.py | 20 ++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index f5a72f167..426d4efb5 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -7,6 +7,7 @@ from django.views.decorators.cache import cache_page from django_filters.rest_framework import DjangoFilterBackend from django.core.exceptions import ValidationError +from bento_lib.responses import errors from .serializers import IndividualSerializer from .models import Individual @@ -97,7 +98,12 @@ def get(self, request, *args, **kwargs): return Response(settings.NO_PUBLIC_DATA_AVAILABLE) base_qs = Individual.objects.all() - filtered_qs = self.filter_queryset(base_qs) + try: + filtered_qs = self.filter_queryset(base_qs) + except ValidationError as e: + return Response(errors.bad_request_error( + *(e.error_list if hasattr(e, "error_list") else e.error_dict.items()), + )) if filtered_qs.count() > settings.CONFIG_PUBLIC["rules"]["count_threshold"]: return Response({"count": filtered_qs.count()}) diff --git a/chord_metadata_service/patients/tests/test_api.py b/chord_metadata_service/patients/tests/test_api.py index e6b73a8d7..9c31d5ee9 100644 --- a/chord_metadata_service/patients/tests/test_api.py +++ b/chord_metadata_service/patients/tests/test_api.py @@ -295,13 +295,17 @@ def test_public_filtering_extra_properties_2(self): response = self.client.get( '/api/public?smoking=Non-smoker&death_dc=deceased&covidstatus=positive' ) - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + self.assertEqual(response_obj["code"], 400) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_invalid_3(self): # if GET query string list has various data types Error response = self.client.get('/api/public?extra_properties=[{"smoking": "Non-smoker"}, 5, "Test"]') - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + self.assertEqual(response_obj["code"], 400) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_1(self): @@ -328,7 +332,9 @@ def test_public_filtering_extra_properties_wrong_range(self): response = self.client.get( '/api/public?lab_test_result_value=100-200' ) - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + self.assertEqual(response_obj["code"], 400) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_range_string_1(self): @@ -470,13 +476,17 @@ def test_public_filtering_age_range(self): def test_public_filtering_age_invalid_range(self): # age invalid range max search response = self.client.get('/api/public?age=10-50') - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + self.assertEqual(response_obj["code"], 400) @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY) def test_public_filtering_age_range_min_and_max_no_age_in_config(self): # test with config without age field, returns error response = self.client.get('/api/public?age=20-30') - self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + self.assertEqual(response_obj["code"], 400) @override_settings(CONFIG_PUBLIC={}) def test_public_filtering_age_range_min_and_max_no_config(self): From 5fd8a17206d284a777a8234bc04bad0c91edc692 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 11:40:36 +0000 Subject: [PATCH 47/59] wrap public fields response in a dictionary This helps with JSON validation and processing by the Go based bento_public backend. --- chord_metadata_service/restapi/api_views.py | 28 +++++++++++-------- .../restapi/tests/test_api.py | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 42df2061c..09777e526 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -231,18 +231,22 @@ def public_search_fields(_request): search_conf = settings.CONFIG_PUBLIC["search"] field_conf = settings.CONFIG_PUBLIC["fields"] - r = [ - { - **section, - "fields": [ - { - **field_conf[f], - "id": f, - "options": get_field_options(field_conf[f]) - } for f in section["fields"] - ] - } for section in search_conf - ] + # Note: the array is wrapped in a dictionary structure to help with JSON + # processing by some services. + r = { + "sections": [ + { + **section, + "fields": [ + { + **field_conf[f], + "id": f, + "options": get_field_options(field_conf[f]) + } for f in section["fields"] + ] + } for section in search_conf + ] + } return Response(r) diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index dd2430633..60b59d324 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -162,7 +162,7 @@ def test_public_search_fields_configured(self): self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() self.assertSetEqual( - set(field["id"] for section in response_obj for field in section["fields"]), + set(field["id"] for section in response_obj["sections"] for field in section["fields"]), set(field for section in settings.CONFIG_PUBLIC["search"] for field in section["fields"]) ) From 137de6c0d396bfbfac0a81d291312be2fb34bdd5 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 12:04:17 +0000 Subject: [PATCH 48/59] add max_query_parameters to rules in config --- chord_metadata_service/example.config.json | 229 +++++++++--------- chord_metadata_service/patients/api_views.py | 2 +- .../restapi/tests/constants.py | 3 +- 3 files changed, 116 insertions(+), 118 deletions(-) diff --git a/chord_metadata_service/example.config.json b/chord_metadata_service/example.config.json index edcae0b75..0d42da037 100644 --- a/chord_metadata_service/example.config.json +++ b/chord_metadata_service/example.config.json @@ -1,117 +1,114 @@ { - "overview": [ - { - "section_title": "Demographics", - "charts": [ - {"field": "age", "chart_type": "bar"}, - {"field": "sex", "chart_type": "pie"}, - {"field": "date_of_consent", "chart_type": "bar"}, - {"field": "mobility", "chart_type": "bar"}, - {"field": "lab_test_result_value", "chart_type": "bar"} - ] - }, - { - "section_title": "Experiments", - "charts": [ - {"field": "experiment_type", "chart_type": "pie"} - ] - } - ], - "search": [ - { - "section_title": "Demographics", - "fields": ["age", "sex"] - } - ], - "fields": { - "age": { - "mapping": "individual/age_numeric", - "title": "Age", - "description": "Age at arrival", - "datatype": "number", - "config": { - "bin_size": 10, - "taper_left": 10, - "taper_right": 100, - "units": "years", - "minimum": 0, - "maximum": 100 - } - }, - "sex": { - "mapping": "individual/sex", - "title": "Sex", - "description": "Sex at birth", - "datatype": "string", - "config": { - "enum": [ - "Male", - "Female" - ] - } - }, - "experiment_type": { - "mapping": "experiment/experiment_type", - "title": "Experiment Types", - "description": "Types of experiments performed on a sample", - "datatype": "string", - "config": { - "enum": ["DNA Methylation", "mRNA-Seq", "smRNA-Seq", "RNA-Seq", "WES", "Other"] - } - }, - "date_of_consent": { - "mapping": "individual/extra_properties/date_of_consent", - "title": "Verbal consent date", - "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", - "datatype": "date", - "config": { - "bin_by": "month" - } - }, - "type_partic": { - "mapping": "individual/extra_properties/type_partic", - "title": "Participant type", - "description": "Has the patient been hospitalized or is the patient seen on as an outpatient?", - "datatype": "string", - "config": { - "enum": [ - "Hospitalized", - "Outpatient" - ] - } - }, - "mobility": { - "mapping": "individual/extra_properties/mobility", - "title": "Functional status", - "description": "Mobility", - "datatype": "string", - "config": { - "enum": [ - "I have no problems in walking about", - "I have slight problems in walking about", - "I have moderate problems in walking about", - "I have severe problems in walking about", - "I am unable to walk about" - ] - } - }, - "lab_test_result_value": { - "mapping": "individual/extra_properties/lab_test_result_value", - "title": "Lab Test Result", - "description": "This acts as a placeholder for numeric values", - "datatype": "number", - "config": { - "bin_size": 50, - "taper_left": 50, - "taper_right": 800, - "minimum": 0, - "maximum": 1000, - "units": "mg/L" - } - - } - }, - "rules": { - "count_threshold": 5 - } -} \ No newline at end of file + "overview": [ + { + "section_title": "Demographics", + "charts": [ + {"field": "age", "chart_type": "bar"}, + {"field": "sex", "chart_type": "pie"}, + {"field": "date_of_consent", "chart_type": "bar"}, + {"field": "mobility", "chart_type": "bar"}, + {"field": "lab_test_result_value", "chart_type": "bar"} + ] + }, + { + "section_title": "Experiments", + "charts": [ + {"field": "experiment_type", "chart_type": "pie"} + ] + } + ], + "search": [ + { + "section_title": "Demographics", + "fields": ["age", "sex", "date_of_consent", "lab_test_result_value"] + } + ], + "fields": { + "age": { + "mapping": "individual/age_numeric", + "title": "Age", + "description": "Age at arrival", + "datatype": "number", + "config": { + "bin_size": 10, + "taper_left": 10, + "taper_right": 100, + "units": "years", + "minimum": 0, + "maximum": 100 + } + }, + "sex": { + "mapping": "individual/sex", + "title": "Sex", + "description": "Sex at birth", + "datatype": "string", + "config": { + "enum": null + } + }, + "experiment_type": { + "mapping": "experiment/experiment_type", + "title": "Experiment Types", + "description": "Types of experiments performed on a sample", + "datatype": "string", + "config": { + "enum": ["DNA Methylation", "mRNA-Seq", "smRNA-Seq", "RNA-Seq", "WES", "Other"] + } + }, + "date_of_consent": { + "mapping": "individual/extra_properties/date_of_consent", + "title": "Verbal consent date", + "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", + "datatype": "date", + "config": { + "bin_by": "month" + } + }, + "type_partic": { + "mapping": "individual/extra_properties/type_partic", + "title": "Participant type", + "description": "Has the patient been hospitalized or is the patient seen on as an outpatient?", + "datatype": "string", + "config": { + "enum": [ + "Hospitalized", + "Outpatient" + ] + } + }, + "mobility": { + "mapping": "individual/extra_properties/mobility", + "title": "Functional status", + "description": "Mobility", + "datatype": "string", + "config": { + "enum": [ + "I have no problems in walking about", + "I have slight problems in walking about", + "I have moderate problems in walking about", + "I have severe problems in walking about", + "I am unable to walk about" + ] + } + }, + "lab_test_result_value": { + "mapping": "individual/extra_properties/lab_test_result_value", + "title": "Lab Test Result", + "description": "This acts as a placeholder for numeric values", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + } + } + }, + "rules": { + "count_threshold": 5, + "max_query_parameters": 2 + } + } \ No newline at end of file diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index 426d4efb5..8564ac586 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -58,7 +58,7 @@ class PublicListIndividuals(APIView): def filter_queryset(self, queryset): # Check query parameters validity qp = self.request.query_params - if len(qp) > 2: + if len(qp) > settings.CONFIG_PUBLIC["rules"]["max_query_parameters"]: raise ValidationError(f"Wrong number of fields: {len(qp)}") search_conf = settings.CONFIG_PUBLIC["search"] diff --git a/chord_metadata_service/restapi/tests/constants.py b/chord_metadata_service/restapi/tests/constants.py index 44a4c3339..312d534e1 100644 --- a/chord_metadata_service/restapi/tests/constants.py +++ b/chord_metadata_service/restapi/tests/constants.py @@ -376,7 +376,8 @@ } }, "rules": { - "count_threshold": 5 + "count_threshold": 5, + "max_query_parameters": 2 } } From 9df64bd637d911d57bd352cdcbb47f2b2f5559c6 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 12:16:35 +0000 Subject: [PATCH 49/59] simplification --- chord_metadata_service/patients/api_views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index 8564ac586..d1c38fdbd 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -63,11 +63,9 @@ def filter_queryset(self, queryset): search_conf = settings.CONFIG_PUBLIC["search"] field_conf = settings.CONFIG_PUBLIC["fields"] - queryable_fields = dict() - for section in search_conf: - queryable_fields.update( - [(f, field_conf[f]) for f in section["fields"]] - ) + queryable_fields = { + f"{f}": field_conf[f] for section in search_conf for f in section["fields"] + } for field, value in qp.items(): if field not in queryable_fields: From 21a9dbc6f4c4146c9d09f27666a6e29e8f96b809 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 12:27:52 +0000 Subject: [PATCH 50/59] var assignment simplification --- chord_metadata_service/restapi/api_views.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/chord_metadata_service/restapi/api_views.py b/chord_metadata_service/restapi/api_views.py index 09777e526..e7b31be45 100644 --- a/chord_metadata_service/restapi/api_views.py +++ b/chord_metadata_service/restapi/api_views.py @@ -296,11 +296,6 @@ def public_overview(_request): for field in fields: field_props = settings.CONFIG_PUBLIC["fields"][field] - response["fields"][field] = { - **field_props, - "id": field, - "data": {} - } if field_props["datatype"] == "string": stats = get_categorical_stats(field_props) elif field_props["datatype"] == "number": @@ -308,6 +303,10 @@ def public_overview(_request): elif field_props["datatype"] == "date": stats = get_date_stats(field_props) - response["fields"][field]["data"] = stats + response["fields"][field] = { + **field_props, + "id": field, + "data": stats + } return Response(response) From ea72667dfd07a62ea65a26ef08e909c725f8f52e Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 13:06:43 +0000 Subject: [PATCH 51/59] left bin in range consistency (use <), comments --- .../patients/tests/test_api.py | 4 +-- chord_metadata_service/restapi/utils.py | 27 +++++++++++++++---- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/chord_metadata_service/patients/tests/test_api.py b/chord_metadata_service/patients/tests/test_api.py index 9c31d5ee9..0bb56939c 100644 --- a/chord_metadata_service/patients/tests/test_api.py +++ b/chord_metadata_service/patients/tests/test_api.py @@ -406,7 +406,7 @@ def test_public_filtering_extra_properties_date_range_1(self): self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { - "extra_properties__date_of_consent__contains": "2021-03" + "extra_properties__date_of_consent__startswith": "2021-03" } db_count = Individual.objects.filter(**range_parameters).count() self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) @@ -424,7 +424,7 @@ def test_public_filtering_extra_properties_date_range_and_other_range(self): self.assertEqual(response.status_code, status.HTTP_200_OK) response_obj = response.json() range_parameters = { - "extra_properties__date_of_consent__contains": "2021-03", + "extra_properties__date_of_consent__startswith": "2021-03", "extra_properties__lab_test_result_value__gte": 100, "extra_properties__lab_test_result_value__lt": 150, } diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index f12712231..33857ee4e 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -143,7 +143,7 @@ def labelled_range_generator(field_props) -> Tuple[int, int, str]: # start generator if minimum != taper_left: - yield minimum, taper_left, f"{minimum}-{taper_left}" + yield minimum, taper_left, f"< {taper_left}" for v in range(taper_left, taper_right, bin_size): yield v, v + bin_size, f"{v}-{v + bin_size}" @@ -167,6 +167,13 @@ def monthly_generator(start: str, end: str) -> Tuple[int, int]: def get_model_and_field(field_id: str) -> Tuple[any, str]: + """ + Parses a path-like string representing an ORM such as "individual/extra_properties/date_of_consent" + where the first crumb represents the object in the DB model, and the next ones + are the field with their possible joins through tables relations. + Returns a tuple of the model object and the Django string representation of the + field for this object. + """ model_name, *field_path = field_id.split("/") if model_name == "individual": @@ -182,10 +189,15 @@ def get_model_and_field(field_id: str) -> Tuple[any, str]: def stats_for_field(model, field: str, add_missing=False) -> Mapping[str, int]: + """ + Computes counts of distinct values for a given field. Mainly applicable to + char fields representing categories + """ # values() restrict the table of results to this COLUMN # annotate() creates a `total` column for the aggregation # Count() aggregates the results by performing a GROUP BY on the field query_set = model.objects.all().values(field).annotate(total=Count(field)) + stats: Mapping[str, int] = dict() for item in query_set: key = item[field] @@ -206,7 +218,7 @@ def stats_for_field(model, field: str, add_missing=False) -> Mapping[str, int]: def get_field_bins(model, field, bin_size): - # creates a new field "binned" by substracting the modulo by bin size to + # computes a new column "binned" by substracting the modulo by bin size to # the value which requires binning (e.g. 28 => 28 - 28 % 10 = 20) # cast to integer to avoid numbers such as 60.00 if that was a decimal, # and aggregate over this value. @@ -221,6 +233,11 @@ def get_field_bins(model, field, bin_size): def compute_binned_ages(bin_size: int): + """ + When age_numeric field is not available, use this function to process + the age field in its various formats. + Returns an array of values floored to the closest decade (e.g. 25 --> 20) + """ a = pheno_models.Individual.objects.filter(age_numeric__isnull=True).values('age') binned_ages = [] for r in a.iterator(): # reduce memory footprint (no caching) @@ -346,7 +363,7 @@ def get_month_date_range(field_props): query_set = model.objects.all()\ .values(field_name)\ - .order_by(field_name) + .order_by(field_name) # lexicographic sort is correct with date strings like `2021-03-09` if query_set.count() == 0: return None, None @@ -415,7 +432,7 @@ def filter_queryset_field_value(qs, field_props, value: str): """ Further filter a queryset using the field defined by field_props and the given value. - It is assumed that the field mapping defined in field_props is represented + It is a prerequisite that the field mapping defined in field_props is represented in the queryset object """ model, field = get_model_and_field(field_props["mapping"]) @@ -423,7 +440,7 @@ def filter_queryset_field_value(qs, field_props, value: str): if field_props["datatype"] == "string": condition = {f"{field}__iexact": value} elif field_props["datatype"] == "number": - # values are of the form "50-150" or "≥ 800" + # values are of the form "50-150", "< 50" or "≥ 800" if "-" in value: [start, end] = [int(v) for v in value.split("-")] condition = { From dbb3735dfd920ed5b2489c439708db9c8c975a9c Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 17:29:07 +0000 Subject: [PATCH 52/59] add unit tests --- .../restapi/tests/test_api_utils.py | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 chord_metadata_service/restapi/tests/test_api_utils.py diff --git a/chord_metadata_service/restapi/tests/test_api_utils.py b/chord_metadata_service/restapi/tests/test_api_utils.py new file mode 100644 index 000000000..17523e12a --- /dev/null +++ b/chord_metadata_service/restapi/tests/test_api_utils.py @@ -0,0 +1,113 @@ +from unittest import TestCase + +from django.db.models.base import ModelBase +from django.test import override_settings +from rest_framework.test import APITestCase + +from ..utils import ( + labelled_range_generator, + get_model_and_field, + get_date_stats, + get_month_date_range) +from .constants import CONFIG_PUBLIC_TEST + + +class TestLabelledRangeGenerator(TestCase): + def setUp(self): + self.fp = { + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000 + } + } + + def test_config_with_tappers(self): + rg = list(labelled_range_generator(self.fp)) + c = self.fp["config"] + self.assertEqual(rg[0], (c["minimum"], c["taper_left"], f"< {c['taper_left']}")) + self.assertEqual(rg[-1], (c["taper_right"], c["maximum"], f"≥ {c['taper_right']}")) + self.assertEqual(rg[1], (c["taper_left"], c["taper_left"] + c["bin_size"], + f"{c['taper_left']}-{c['taper_left'] + c['bin_size']}")) + + def test_config_without_tappers(self): + self.fp["config"] = { + **self.fp["config"], + "taper_left": 0, + "taper_right": 1000 + } + rg = list(labelled_range_generator(self.fp)) + self.assertIn("-", rg[0][2]) + self.assertIn("-", rg[-1][2]) + + def test_wrong_config_min_max(self): + self.fp["config"] = { + **self.fp["config"], + "minimum": 6000 + } + rg = labelled_range_generator(self.fp) + self.assertRaises(ValueError, list, rg) + + def test_wrong_config_min_tapper_left(self): + self.fp["config"] = { + **self.fp["config"], + "minimum": 60 + } + rg = labelled_range_generator(self.fp) + self.assertRaises(ValueError, list, rg) + + def test_wrong_config_bin_size(self): + self.fp["config"] = { + **self.fp["config"], + "bin_size": 251 + } + rg = labelled_range_generator(self.fp) + self.assertRaises(ValueError, list, rg) + + +class TestModelField(TestCase): + + def test_get_model_field_basic(self): + model, field = get_model_and_field("individual/age_numeric") + self.assertIsInstance(model, ModelBase) + self.assertEqual(field, "age_numeric") + + model, field = get_model_and_field("experiment/experiment_type") + self.assertIsInstance(model, ModelBase) + self.assertEqual(field, "experiment_type") + + def test_get_model_nested_field(self): + model, field = get_model_and_field("individual/extra_properties/lab_test_result") + self.assertEqual(field, "extra_properties__lab_test_result") + + def test_get_wrong_model(self): + self.assertRaises(NotImplementedError, get_model_and_field, "junk/age_numeric") + + +class TestDateStatsExcept(APITestCase): + + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) + def test_wrong_bin_config(self): + fp = { + "mapping": "individual/extra_properties/date_of_consent", + "datatype": "date", + "config": { + "bin_by": "year" + } + } + self.assertRaises(NotImplementedError, get_date_stats, fp) + self.assertRaises(NotImplementedError, get_month_date_range, fp) + + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) + def test_wrong_field_config(self): + fp = { + "mapping": "individual/date_of_consent", + "datatype": "date", + "config": { + "bin_by": "month" + } + } + self.assertRaises(NotImplementedError, get_date_stats, fp) + self.assertRaises(NotImplementedError, get_month_date_range, fp) From de658998ce0bcde602eb8188adfff3d460460639 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 13:44:46 -0400 Subject: [PATCH 53/59] add tests on ranges --- .../patients/tests/test_api.py | 36 +++++++++++++++++++ .../restapi/tests/constants.py | 6 ++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/chord_metadata_service/patients/tests/test_api.py b/chord_metadata_service/patients/tests/test_api.py index 0bb56939c..1718f7425 100644 --- a/chord_metadata_service/patients/tests/test_api.py +++ b/chord_metadata_service/patients/tests/test_api.py @@ -326,6 +326,42 @@ def test_public_filtering_extra_properties_range_1(self): else: self.assertEqual(db_count, response_obj['count']) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) + def test_public_filtering_extra_properties_range_2(self): + # extra_properties range search (above taper, single value) + response = self.client.get( + '/api/public?baseline_creatinine=≥ 200' + ) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + range_parameters = { + "extra_properties__baseline_creatinine__gte": 200, + } + db_count = Individual.objects.filter(**range_parameters).count() + self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) + if db_count <= self.response_threshold: + self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) + else: + self.assertEqual(db_count, response_obj['count']) + + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) + def test_public_filtering_extra_properties_range_3(self): + # extra_properties range search (below taper, single value) + response = self.client.get( + '/api/public?baseline_creatinine=< 50' + ) + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + range_parameters = { + "extra_properties__baseline_creatinine__lt": 50, + } + db_count = Individual.objects.filter(**range_parameters).count() + self.assertIn(self.response_threshold_check(response_obj), [db_count, settings.INSUFFICIENT_DATA_AVAILABLE]) + if db_count <= self.response_threshold: + self.assertEqual(response_obj, settings.INSUFFICIENT_DATA_AVAILABLE) + else: + self.assertEqual(db_count, response_obj['count']) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_filtering_extra_properties_wrong_range(self): # extra_properties range search, unauthorized range diff --git a/chord_metadata_service/restapi/tests/constants.py b/chord_metadata_service/restapi/tests/constants.py index 312d534e1..712092ca5 100644 --- a/chord_metadata_service/restapi/tests/constants.py +++ b/chord_metadata_service/restapi/tests/constants.py @@ -359,9 +359,9 @@ "config": { "bin_size": 50, "taper_left": 50, - "taper_right": 800, - "minimum": 0, - "maximum": 1000, + "taper_right": 200, + "minimum": 30, + "maximum": 600, "units": "mg/L" } }, From 743cb853fed049f095dd56e2e01924da13589777 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 26 Jul 2022 16:00:27 -0400 Subject: [PATCH 54/59] documentation --- docs/modules/public_api.rst | 344 +++++++++++++++++++++++++++--------- 1 file changed, 260 insertions(+), 84 deletions(-) diff --git a/docs/modules/public_api.rst b/docs/modules/public_api.rst index 6832d9267..8c405dea9 100644 --- a/docs/modules/public_api.rst +++ b/docs/modules/public_api.rst @@ -1,7 +1,7 @@ Public API ========== -There are several public APIs to return data overview and perform a search that returns only objects count. +There are several public APIs to return data overview and perform a search that returns only objects counts. The implementation of public APIs relies on a project customized configuration file (config.json) that must be placed in the base directory. Currently, there is an :code:`example.config.json` located in :code:`/katsu/chord_metadata_service` directory which is set to be the project base directory. The file can be copied, renamed to :code:`config.json` and modified. @@ -16,127 +16,303 @@ The :code:`config.json` file follows jsonschema specifications: it includes fiel **Jsonschema properties**: -- "type" - defines a data type for this field, e.g. "number" or "string" (katsu's config accepts only number and string types) -- "format" - defines a string format, e.g. "date" to record date in the format of "2021-12-31" -- "enum" - defines a list of options for this field -- "title" - field's user-friendly name -- "description" - field's description +- "overview" - an array defining the fields that will be queried for statistics to be displayed as charts and their layout in the overview panel +- "search" - an array defining the fields that can be queried by the user for a count and their grouping by section +- "fields" - configuration of the fields available for search or overview +- "rules" - global privacy rules enforced on the data exported or the queries allowed -**Custom properties**: +**config.overview properties** -- "bin_size" (number) - defines a bin size for numeric fields (where "type" is set to "number"), by default bin size is set to 10 -- "queryable" (true/false) - defines if the field should be included in search, if set to false the field will only be shown as a chart -- "is_range" (true/false) - defines if this field can be searched using range search (e.g.min value and max value) -- "chart" (options: pie, bar)- defines a type of the chart to be used to visualize the data -- "taper_left" and "taper_right" (number) - defines the cut offs for the data to be shown in charts -- "units" (string) - defines unit value for numeric fields (e.g. "years", "mg/L") -- "minimum" (number) - defines the minimum value in this field -- "maximum" (number) - defines the maximum value in this field -- "index" (number) - defines properties display order in the UI +An array of: -Example of the config.json +- "section_title" (string) - title that will be displayed for the group of charts +- "charts" - array of: -.. code-block:: + - "field" (string) - field id (from the :code:`config.fields` property), to get statistics from + - "chart_type" (options: pie, bar) - defines the type of chart used to display the statistics - { - "age": { - "type": "number", - "title": "Age", - "bin_size": 10, - "is_range": true, - "queryable": true, - "taper_left": 40, - "taper_right": 60, - "units": "years", - "minimum": 0, - "description": "Age at arrival" - }, - "sex": { - "type": "string", - "enum": [ - "Male", - "Female" - ], - "title": "Sex", - "queryable": true, - "description": "Sex at birth" - }, - "extra_properties": { - "date_of_consent": { - "type": "string", - "format": "date", - "title": "Verbal consent date", - "chart": "bar", - "queryable": true, - "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd" - } - } - } +**config.search properties** +An array of: -Public endpoints ----------------- +- "section-title" (string) - title that will be displayed for the group of fields +- "fields" (string array) - Array of fields id (from the :code:`config.fields`) -The public APIs include the following endpoints: +**config.fields properties**: +A dictionary, keyed by field id of: -1. :code:`/api/public_search_fields` GET: returns :code:`config.json` contents in a form of jsonschema. +- "mapping" (string) - defines in a path like format, the mapping between the field and its object representation in the Django ORM. The first part is a reference to the model. The following is the "location" of the field relative to the model (might be nested or made accross joins). Example "individual/extra_properties/date_of_consent" +- "title" (string) - name that is displayed to the user +- "description" (string) - detailed description of the field, suitable for a tooltip +- "datatype" (options number, date, string) - defines the type of field +- "config" (dict) - a configuration object that defines the values or ranges that can be queried for this field. Depends on the datatype. - The response when public fields are not configured and config file is not provided: :code:`{"message": "No public fields configured."}` + - [datatype=number].config: + - "bin-size" (number): bins width. Due to implementation limitations, must be an integer for now. + - "minimum" (number): values lesser than minimum can't be queried + - "maximum" (number): values greater than or equal to maximum can't be queried + - "taper_left" (number): cutoff value for the first bin. Disabled when equals to ``minimum`` + - "taper_right" (number): cutoff value for the last bin. Disabled when equals to ``maximum`` + - "units" (string): unit that will be displayed to the user -2. :code:`/api/public_overview` GET: returns an overview that contains counts for each field of interest. + - [datatype=string].config: - The response when there is no public data available and config file is not provided: :code:`{"message": "No public data available."}` + - "enum" (string array or ``null``): when set to null, the distinct values are extracted from the table content. When set as a list, only the values listed will be displayed to the user. + - [datatype=date].config: -3. :code:`/api/public` GET: returns a count of all individuals in database. + - "bin-by" (options month): only one valid option implemented for now. Bin values according to the method defined. - The response when there is no public data available and config file is not provided: :code:`{"message": "No public data available."}` +**config.rules properties**: - The response when there is no enough data that passes the project-custom threshold: :code:`{"message": "Insufficient data available."}` +- "count_threshold" (number): when a count for a given bin is below or equal to this value, 0 is returned instead (avoids leaking small cell counts) +- "max_query_parameters" (number): maximum number of fields that can be queried simultaneously for a count - When count is less or equal to a project's custom threshold returns message that insufficient data available. - Accepts search filters on the fields that are specified in the :code:`config.json` file and set to "queryable". - Currently, the following filters are written for the Individual model: +Example of the config.json - - sex: e.g. :code:`/api/public?sex=female` +.. code-block:: + + { + "overview": [ + { + "section_title": "Demographics", + "charts": [ + {"field": "age", "chart_type": "bar"}, + {"field": "sex", "chart_type": "pie"}, + {"field": "date_of_consent", "chart_type": "bar"}, + {"field": "mobility", "chart_type": "bar"}, + {"field": "lab_test_result_value", "chart_type": "bar"} + ] + }, + { + "section_title": "Experiments", + "charts": [ + {"field": "experiment_type", "chart_type": "pie"} + ] + } + ], + "search": [ + { + "section_title": "Demographics", + "fields": ["age", "sex", "date_of_consent", "lab_test_result_value"] + } + ], + "fields": { + "age": { + "mapping": "individual/age_numeric", + "title": "Age", + "description": "Age at arrival", + "datatype": "number", + "config": { + "bin_size": 10, + "taper_left": 10, + "taper_right": 100, + "units": "years", + "minimum": 0, + "maximum": 100 + } + }, + "sex": { + "mapping": "individual/sex", + "title": "Sex", + "description": "Sex at birth", + "datatype": "string", + "config": { + "enum": null + } + }, + "experiment_type": { + "mapping": "experiment/experiment_type", + "title": "Experiment Types", + "description": "Types of experiments performed on a sample", + "datatype": "string", + "config": { + "enum": ["DNA Methylation", "mRNA-Seq", "smRNA-Seq", "RNA-Seq", "WES", "Other"] + } + }, + "date_of_consent": { + "mapping": "individual/extra_properties/date_of_consent", + "title": "Verbal consent date", + "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", + "datatype": "date", + "config": { + "bin_by": "month" + } + }, + "lab_test_result_value": { + "mapping": "individual/extra_properties/lab_test_result_value", + "title": "Lab Test Result", + "description": "This acts as a placeholder for numeric values", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + } + } + }, + "rules": { + "count_threshold": 5, + "max_query_parameters": 2 + } + } + + +Public endpoints +---------------- + +The public APIs include the following endpoints: - - age: search by age ranges e.g. :code:`/api/public?age_range_min=20&age_range_max=30` - - extra_properties: e.g. :code:`/api/public?extra_properties=[{"smoking": "Non-smoker"},{"covidstatus": "positive"}]` +1. :code:`/api/public_search_fields` GET: returns a json containing for each section of the search form, the list of fields that can be queried and the authorized values. + Example of response - The :code:`extra_properties` is a JSONField without a schema. - To allow searching content in this field the nested fields have to be added to the config file (see the config file example above). - The query string must contain a list of objects where each object has a key-value pair representing a nested field name and a search value. + .. code-block:: + { + "sections": [ + { + "section_title": "Demographics", + "fields": [ + { + "mapping": "individual/age_numeric", + "title": "Age", + "description": "Age at arrival", + "datatype": "number", + "config": { + "bin_size": 10, + "taper_left": 10, + "taper_right": 100, + "units": "years", + "minimum": 0, + "maximum": 100 + }, + "id": "age", + "options": [ + "< 10", + "10-20", + "20-30", + "30-40", + "40-50", + "50-60", + "60-70", + "70-80", + "80-90", + "90-100" + ] + }, + { + "mapping": "individual/sex", + "title": "Sex", + "description": "Sex at birth", + "datatype": "string", + "config": { + "enum": null + }, + "id": "sex", + "options": [ + "FEMALE", + "MALE" + ] + }, + { + "mapping": "individual/extra_properties/date_of_consent", + "title": "Verbal consent date", + "description": "Date of initial verbal consent(participant, legal representative or tutor), yyyy-mm-dd", + "datatype": "date", + "config": { + "bin_by": "month" + }, + "id": "date_of_consent", + "options": [ + "Nov 2020", + "Dec 2021", + "Jan 2021", + "Feb 2021", + "Mar 2021", + "Apr 2021", + "May 2021", + "Jun 2021", + "Jul 2021", + "Aug 2021", + "Sep 2021", + "Oct 2021", + "Nov 2021", + "Dec 2022", + "Jan 2022" + ] + }, + { + "mapping": "individual/extra_properties/lab_test_result_value", + "title": "Lab Test Result", + "description": "This acts as a placeholder for numeric values", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 800, + "minimum": 0, + "maximum": 1000, + "units": "mg/L" + }, + "id": "lab_test_result_value", + "options": [ + "< 50", + "50-100", + "100-150", + "150-200", + "200-250", + "250-300", + "300-350", + "350-400", + "400-450", + "450-500", + "500-550", + "550-600", + "600-650", + "650-700", + "700-750", + "750-800", + "≥ 800" + ] + } + ] + } + ] + } - Examples of extra properties searches: + The response when public fields are not configured and config file is not provided: :code:`{"message": "No public fields configured."}` - Search for items that have a type of string: - .. code-block:: +2. :code:`/api/public_overview` GET: returns an overview that contains counts for each field of interest. - /api/public?extra_properties=[{"smoking": "Non-smoker"},{"death_dc": "deceased"},{"covidstatus": "positive"}] + The response when there is no public data available and config file is not provided: :code:`{"message": "No public data available."}` - Search for items that contain date ranges: +3. :code:`/api/public` GET: returns a count of all individuals in database. - .. code-block:: + The response when there is no public data available and config file is not provided: :code:`{"message": "No public data available."}` - /api/public?extra_properties=[{"date_of_consent": {"after": "2020-03-01", "before": "2021-05-01"}}] + The response when there is no enough data that passes the project-custom threshold: :code:`{"message": "Insufficient data available."}` - Search for items that contain numeric ranges: + When count is less or equal to a project's custom threshold returns message that insufficient data available. + Accepts search filters on the fields that are specified in the :code:`config.json` file. + Example of searches: - .. code-block:: + - sex: e.g. :code:`/api/public?sex=female` - /api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 5, "rangeMax": 900}}] + - age: search by age range e.g. :code:`/api/public?age=20-30` - Examples of combining extra properties search with other fields: + - combined fields: e.g. :code:`/api/public?smoking=Non-smoker&covidstatus=positive` - .. code-block:: + - date: e.g. :code:`/api/public?date_of_consent=Feb 2021` - /api/public?sex=female&extra_properties=[{"covidstatus": "positive"}] + The accepted values for the field names and their content is limited to the ones listed in :code:`/api/public_search_fields`. Note that searches on categories (datatype as string) are case insensitive From dde355ce3662a19481812c3e16b71142d8af26f7 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Wed, 27 Jul 2022 19:52:19 +0000 Subject: [PATCH 55/59] update README Remove details that were deprecated and duplicated in readthedocs --- README.md | 139 ++++-------------------------------------------------- 1 file changed, 10 insertions(+), 129 deletions(-) diff --git a/README.md b/README.md index a394f5652..df1f55e42 100644 --- a/README.md +++ b/README.md @@ -139,8 +139,8 @@ for a standalone instance of this server, so it can be swapped out. By default, `katsu` uses the CHORD permission system, which functions as follows: - * The service assumes that an **out-of-band** mechanism (such as a - properly-configured reverse proxy) protects URLs under the `/private` + * The service assumes that an **out-of-band** mechanism (such as a + properly-configured reverse proxy) protects URLs under the `/private` namespace. * Requests with the headers `X-User` and `X-User-Role` can be authenticated via a Django Remote User-type system, with `X-User-Role: owner` giving @@ -202,7 +202,7 @@ coverage html ### Terminal Commands Katsu ships with a variety of command-line helpers to facilitate common actions -that one might perform. +that one might perform. To run them, the Django `manage.py` script is used. @@ -240,7 +240,7 @@ Dataset created: dataset title (ID: 2a8f8e68-a34f-4d31-952a-22f362ebee9e) * `756a4530-59b7-4d47-a04a-c6ee5aa52565`: Project ID to put the dataset under * `./examples/data_use.json`: Path to data use JSON -Creates a new dataset under the project specified (with its ID), with +Creates a new dataset under the project specified (with its ID), with corresponding title, description, contact information, and data use conditions. ``` @@ -265,7 +265,7 @@ Table created: table name (ID: 0d63bafe-5d76-46be-82e6-3a07994bac2e, Type: pheno * `phenopacket`: Table data type (either `phenopacket` or `experiment`) * `2a8f8e68-a34f-4d31-952a-22f362ebee9e`: Dataset ID to put the table under -Creates a new data table under the dataset specified (with its ID), with a +Creates a new data table under the dataset specified (with its ID), with a corresponding name and data type (either `phenopacket` or `experiment`.) ``` @@ -286,10 +286,10 @@ Ingested data successfully. ``` * `0d63bafe-5d76-46be-82e6-3a07994bac2e`: ID of table to ingest into -* `./examples/1000g_phenopackets_1_of_3.json`: Data to ingest (in the format +* `./examples/1000g_phenopackets_1_of_3.json`: Data to ingest (in the format accepted by the Phenopackets workflow or the Experiments workflow, depending on the data type of the table) - + #### Patient Commands ``` @@ -298,7 +298,7 @@ $ ./manage.py patients_build_index ``` Builds an ElasticSearch index for patients in the database. - + #### Phenopacket Commands ``` @@ -360,124 +360,5 @@ The file can be copied, renamed to `config.json` and modified. The `config.json` contains fields that data providers would like to make open for public access. If the `config.json` is not set up/created it means there is no public data and no data will be available via these APIs. -### Config file specification - -The `config.json` follows jsonschema specifications: it includes fields from Katsu data model, defines their type and other attributes that determine how the data from these fields will be presented in the public response. - -Jsonschema properties: - -- `"type"` - defines a data type for this field, e.g. "number" or "string" (Katsu's config accepts only number and string types) -- `"format"` - defines a string format, e.g. "date" to record date in the format of "2021-12-31" -- `"enum"` - defines a list of options for this field -- `"title"` - field's user-friendly name -- `"description"` - field's description - -Custom properties: - -- `"bin_size"` (number) - defines a bin size for numeric fields (where "type" is set to "number"), by default bin size is set to 10 -- `"queryable"` (true/false) - defines if the field should be included in search, if set to false the field will only be shown as a chart -- `"is_range"` (true/false) - defines if this field can be searched using range search (e.g.min value and max value) -- `"chart"` (options: pie, bar)- defines a type of the chart to be used to visualize the data -- `"taper_left"` and `"taper_right"` (number) - defines the cut-offs for the data to be shown in charts -- `"units"` (string) - defines unit value for numeric fields (e.g. "years", "mg/L") -- `"minimum"` (number) - defines the minimum value in this field -- `"maximum"` (number) - defines the maximum value in this field - -Example of the `config.json` - -``` - - { - "age": { - "type": "number", - "title": "Age", - "bin_size": 10, - "is_range": true, - "queryable": true, - "taper_left": 40, - "taper_right": 60, - "units": "years", - "minimum": 0, - "description": "Age at arrival" - }, - "sex": { - "type": "string", - "enum": [ - "Male", - "Female" - ], - "title": "Sex", - "queryable": true, - "description": "Sex at birth" - }, - "extra_properties": { - "date_of_consent": { - "type": "string", - "format": "date", - "title": "Verbal consent date", - "chart": "bar", - "queryable": true, - "description": "Date of initial verbal consent (participant, legal representative or tutor), yyyy-mm-dd" - } - } - } -``` - - -### Public APIs - -The public APIs include the following endpoints: - - - `/api/public_search_fields` GET: returns `config.json` contents in a form of jsonschema. - - The response when public fields are not configured and config file is not provided: `{"message": "No public fields configured."}` - - - - `/api/public_overview` GET: returns an overview that contains counts for each field of interest. - - The response when there is no public data available and config file is not provided: `{"message": "No public data available."}` - - - - `/api/public` GET: returns a count of all individuals in database. - - The response when there is no public data available and config file is not provided: `{"message": "No public data available."}` - - The response when there is no enough data that passes the project-custom threshold: `{"message": "Insufficient data available."}` - When count is less or equal to a project's custom threshold returns message that insufficient data available. - Accepts search filters on the fields that are specified in the :code:`config.json` file and set to "queryable". - - Currently, the following search filters are written for the Individual model: - - - sex: e.g. `/api/public?sex=female` - - - age: search by age ranges e.g. `/api/public?age_range_min=20&age_range_max=30` - - - extra_properties: e.g. `/api/public?extra_properties=[{"smoking": "Non-smoker"},{"covidstatus": "positive"}]` - - The `extra_properties` is a JSONField without a schema. - To allow searching content in this field the nested fields have to be added to the `config.json` file (see the config file example above). - The query string must contain a list of objects where each object has a key-value pair representing a nested field name and a search value. - - ##### _Examples of extra properties searches_ - - Search for items that have a type of string: - - ``` - /api/public?extra_properties=[{"smoking": "Non-smoker"},{"death_dc": "deceased"},{"covidstatus": "positive"}] - ``` - Search for items that contain date ranges: - - ``` - /api/public?extra_properties=[{"date_of_consent": {"after": "2020-03-01", "before": "2021-05-01"}}] - ``` - Search for items that contain numeric ranges: - - ``` - /api/public?extra_properties=[{"lab_test_result_value": {"rangeMin": 5, "rangeMax": 900}}] - ``` - Examples of combining extra properties search with other fields: - - ``` - /api/public?sex=female&extra_properties=[{"covidstatus": "positive"}] - ``` - \ No newline at end of file +Refer to the documentation for a detailed description of the config file and +public API endpoints. From 9690726acd66a774656d3a848f2c33114960551a Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 1 Aug 2022 02:11:47 +0000 Subject: [PATCH 56/59] add tests for edge case, missing fields --- .../restapi/tests/constants.py | 39 +++++++++++++++++++ .../restapi/tests/test_api.py | 11 ++++++ 2 files changed, 50 insertions(+) diff --git a/chord_metadata_service/restapi/tests/constants.py b/chord_metadata_service/restapi/tests/constants.py index 712092ca5..4e923e9da 100644 --- a/chord_metadata_service/restapi/tests/constants.py +++ b/chord_metadata_service/restapi/tests/constants.py @@ -383,3 +383,42 @@ CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY = deepcopy(CONFIG_PUBLIC_TEST) CONFIG_PUBLIC_TEST_SEARCH_SEX_ONLY["search"][0]["fields"] = ["sex"] + +CONFIG_PUBLIC_TEST_SEARCH_UNSET_FIELDS = deepcopy(CONFIG_PUBLIC_TEST) +CONFIG_PUBLIC_TEST_SEARCH_UNSET_FIELDS["fields"].update([ + ("unset_date", + { + "mapping": "individual/extra_properties/unset_date", + "title": "Some date", + "description": "Some date", + "datatype": "date", + "config": { + "bin_by": "month" + } + }), + ("unset_numeric", + { + "mapping": "individual/extra_properties/unset_numeric", + "title": "Some measure", + "description": "Some measure", + "datatype": "number", + "config": { + "bin_size": 50, + "taper_left": 50, + "taper_right": 500, + "minimum": 0, + "maximum": 600, + "units": "mg/L" + } + }), + ("unset_category", + { + "mapping": "individual/extra_properties/unset_category", + "title": "Some things", + "description": "Some things", + "datatype": "string", + "config": { + "enum": None + } + }) +]) diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 60b59d324..066ad280e 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -20,6 +20,7 @@ from .constants import ( CONFIG_PUBLIC_TEST, + CONFIG_PUBLIC_TEST_SEARCH_UNSET_FIELDS, VALID_INDIVIDUALS, INDIVIDUALS_NOT_ACCEPTED_DATA_TYPES_LIST, INDIVIDUALS_NOT_ACCEPTED_DATA_TYPES_DICT @@ -174,6 +175,16 @@ def test_public_search_fields_not_configured(self): self.assertIsInstance(response_obj, dict) self.assertEqual(response_obj, settings.NO_PUBLIC_FIELDS_CONFIGURED) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST_SEARCH_UNSET_FIELDS) + def test_public_search_fields_missing_extra_properties(self): + response = self.client.get(reverse("public-search-fields"), content_type="application/json") + self.assertEqual(response.status_code, status.HTTP_200_OK) + response_obj = response.json() + self.assertSetEqual( + set(field["id"] for section in response_obj["sections"] for field in section["fields"]), + set(field for section in settings.CONFIG_PUBLIC["search"] for field in section["fields"]) + ) + class PublicOverviewTest(APITestCase): From bb0086dcbd952fb6cf0e7477a109410fba2cab79 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 1 Aug 2022 02:42:32 +0000 Subject: [PATCH 57/59] fix: missing date fields cause null values at end This bug was not visible until data was loaded in the test DB. The phenopacket VALID_INDIVIDUAL_1 does not have any date in extra properties. --- .../restapi/tests/test_api.py | 23 +++++++++++++++++++ chord_metadata_service/restapi/utils.py | 6 +++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/chord_metadata_service/restapi/tests/test_api.py b/chord_metadata_service/restapi/tests/test_api.py index 066ad280e..6ca2b7e26 100644 --- a/chord_metadata_service/restapi/tests/test_api.py +++ b/chord_metadata_service/restapi/tests/test_api.py @@ -157,6 +157,29 @@ def test_mcode_overview(self): class PublicSearchFieldsTest(APITestCase): + def setUp(self) -> None: + # create 2 phenopackets for 2 individuals; each individual has 1 biosample; + # one of phenopackets has 1 phenotypic feature and 1 disease + self.individual_1 = ph_m.Individual.objects.create(**ph_c.VALID_INDIVIDUAL_1) + self.metadata_1 = ph_m.MetaData.objects.create(**ph_c.VALID_META_DATA_1) + self.phenopacket_1 = ph_m.Phenopacket.objects.create( + **ph_c.valid_phenopacket(subject=self.individual_1, meta_data=self.metadata_1) + ) + self.disease = ph_m.Disease.objects.create(**ph_c.VALID_DISEASE_1) + self.procedure = ph_m.Procedure.objects.create(**ph_c.VALID_PROCEDURE_1) + self.biosample_1 = ph_m.Biosample.objects.create(**ph_c.valid_biosample_1(self.individual_1, self.procedure)) + self.phenotypic_feature = ph_m.PhenotypicFeature.objects.create( + **ph_c.valid_phenotypic_feature(self.biosample_1, self.phenopacket_1) + ) + self.phenopacket_1.biosamples.set([self.biosample_1]) + self.phenopacket_1.diseases.set([self.disease]) + + # experiments + self.instrument = exp_m.Instrument.objects.create(**exp_c.valid_instrument()) + self.experiment = exp_m.Experiment.objects.create(**exp_c.valid_experiment(self.biosample_1, self.instrument)) + self.experiment_result = exp_m.ExperimentResult.objects.create(**exp_c.valid_experiment_result()) + self.experiment.experiment_results.set([self.experiment_result]) + @override_settings(CONFIG_PUBLIC=CONFIG_PUBLIC_TEST) def test_public_search_fields_configured(self): response = self.client.get(reverse("public-search-fields"), content_type="application/json") diff --git a/chord_metadata_service/restapi/utils.py b/chord_metadata_service/restapi/utils.py index 33857ee4e..469e4249d 100644 --- a/chord_metadata_service/restapi/utils.py +++ b/chord_metadata_service/restapi/utils.py @@ -360,14 +360,16 @@ def get_month_date_range(field_props): raise NotImplementedError(msg) LENGTH_Y_M = 4 + 1 + 2 # dates stored as yyyy-mm-dd + is_not_null_filter = {f"{field_name}__isnull": False} # property may be missing: avoid handling "None" - query_set = model.objects.all()\ + query_set = model.objects\ + .filter(**is_not_null_filter)\ .values(field_name)\ + .distinct()\ .order_by(field_name) # lexicographic sort is correct with date strings like `2021-03-09` if query_set.count() == 0: return None, None - start = query_set.first()[field_name][:LENGTH_Y_M] end = query_set.last()[field_name][:LENGTH_Y_M] From 4363f184ef01fc7c1f99a32c267f83428d1af464 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Mon, 1 Aug 2022 09:24:51 -0400 Subject: [PATCH 58/59] linting change lint config to python v3.8 --- .github/workflows/lint.yml | 2 +- chord_metadata_service/patients/api_views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ef0621bd6..e84f85341 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-python@v2 name: Set up Python with: - python-version: 3.6 + python-version: 3.8 - name: Install flake8 run: python -m pip install flake8 - name: Run linter diff --git a/chord_metadata_service/patients/api_views.py b/chord_metadata_service/patients/api_views.py index d1c38fdbd..0951510d7 100644 --- a/chord_metadata_service/patients/api_views.py +++ b/chord_metadata_service/patients/api_views.py @@ -79,7 +79,7 @@ def filter_queryset(self, queryset): field_props["datatype"] == "string" and value.lower() in [o.lower() for o in options] ) \ - and not( + and not ( # no restriction when enum is not set for categories field_props["datatype"] == "string" and field_props["config"]["enum"] is None From 80c25eeaf5549b20560977f85386b237484f0976 Mon Sep 17 00:00:00 2001 From: Paul Pillot Date: Tue, 9 Aug 2022 10:24:25 -0400 Subject: [PATCH 59/59] bump version --- chord_metadata_service/package.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chord_metadata_service/package.cfg b/chord_metadata_service/package.cfg index ee4c67cba..a734df1be 100644 --- a/chord_metadata_service/package.cfg +++ b/chord_metadata_service/package.cfg @@ -1,4 +1,4 @@ [package] name = katsu -version = 2.11.0 +version = 2.12.0 authors = Ksenia Zaytseva, David Lougheed, Simon Chénard, Romain Grégoire, Paul Pillot