Create Export Definition

post

/HSDataService-web/api/3.2.0/exports

This endpoint supports the creation of Export Definition by Query Name, Study Names and other inputs.

Request

Supported Media Types
  • application/json
  • application/xml
Body Parameter
Root Schema : OmicsExportDefinition
Type: object
Nested Schema : anatomicalSiteCodes
Type: array
List of anatomical site codes.
Nested Schema : fileWids
Type: array
List of file load record ids.
Nested Schema : geneHugoNames
Type: array
List of gene hugo names. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Nested Schema : geneSetIds
Type: array
List of gene set ids. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Nested Schema : genomicPosition
Type: array
Genomic positions. CHROMOSOME ID, START POSITION, END POSITION. START POSITION, END POSITION are optional. Can be sourced from Gene reference APIs or Genomic position APIs. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Nested Schema : OdbIdentifier
Type: object
Identifier assigned by a given system
Nested Schema : pathwayNames
Type: array
List of pathway names. Export definition must have either allDataOption or genomicPosition/bedFileNameUploadService or set of genes (geneHugoNames, pathwayNames, geneSetIds).
Nested Schema : patientSubjectId
Type: array
List of patient or subject record ids. The export definition must have either a source of patients/subjects or a source of specimens. If both are provided the specimen source takes precedence
Nested Schema : OracleDBQueryDS
Type: object
Contains all the Query Criteria
Nested Schema : specimenIdsCdm
Type: array
List of specimen ids from CDM schema. The export definition must have either a source of patients/subjects or a source of specimens. If both are provided the specimen source takes precedence
Nested Schema : specimenIdsOdb
Type: array
List of specimen ids from ODB schema. The export definition must have either a source of patients/subjects or a source of specimens. If both are provided the specimen source takes precedence
Nested Schema : specimenTypeCodes
Type: array
List of specimen type codes.
Nested Schema : studyNames
Type: array
List of study names.
Nested Schema : GenomicPositionFileExport
Type: object
Nested Schema : allCriteriaList
Type: array
Minimum Number of Items: 1
Maximum Number of Items: 2147483647
List of Criteria Eg.DemographicsCriteria,MedicationCriteria,DiagnosisCriteria,SequenceVariantsCriteria,ConsentCriteria,DiagnosisCriteria,EncounterCriteria,ObservationCriteria,HistoryCriteria,ProceduresCriteria,SpecimenCriteria,StudyCriteria,MicroarrayExpressionCriteria,RNASeqExpressionCriteria,CopyNumberVariationCriteria,RelativeTimeEventsCriteria
Nested Schema : criteria
Type: object
Discriminator: type

Response

Supported Media Types
  • application/json
  • application/xml
200 Response
successful operation
Body
Root Schema : FileExportDefResponse
Type: object
Nested Schema : bedFileParsingErrors
Type: array
Will appear if bedFileNameUploadService is input and there are errors.
Nested Schema : Identifier
Type: object
Identifier assigned by a given system

Examples

The following example submits a POST request. See the Criteria Classes for this endpoint.

API URL

http://localhost:7001/HSDataService-web/api/3.2.0/exports

Example 1 of Request Body — (List of genomicPosition, serviceProviderIdentifier, patientSubjectCohortListId, anatomicalSiteCodes, specimenTypeCodes)

{
    "context": "SUBJECT",
    "genomicPosition": [{
        "chromosomeId": 10,
        "startPosition": 89682891,
        "endPosition": 100682893
    }, {
        "chromosomeId": 7,
        "startPosition": 89682891
    }, {
        "chromosomeId": 5
    }],
    "alignmentId": 1,
    "serviceProviderIdentifier": "vcf",
    "patientSubjectCohortListId": 10000000635009,
    "anatomicalSiteCodes": ["SPCMN_ANA_SITE_CD_CODE_7", "SPCMN_ANA_SITE_CD_CODE_4"],
    "specimenTypeCodes": ["SPCMN_TYP_CD_FECAL", "SPCMN_TYP_CD_URNE"]
}

Example 2 of Request Body — (queryCriteria with a single geneHugoNames item)

{
    "context": "patient",
    "geneHugoNames": ["CASZ1"],
    "alignmentId": 1,
    "queryCriteria": {
        "allCriteriaList": [{
            "type": "DemographicsCriteria",
            "patientIdList": ["1", "2"],
            "ageRange": {
                "value": 60,
                "secondValue": 80,
                "op": {
                    "code": "COMP_OP_BETWEEN"
                }
            }
        }, {
            "type": "DiagnosisCriteria",
            "diagnosisNameList": ["D1", "D2"],
            "onsetDateRange": {
                "value": "01/30/2016",
                "secondValue": "01/30/2017",
                "op": {
                    "code": "COMP_OP_BETWEEN"
                }
            }
        }]
    }
}

Example 3 of Request Body — (queryName with geneHugoNames)

{
  "context" : "patient",
  "alignmentId" : 1,
  "geneHugoNames": ["CASZ1","CAMTA1-IT1","RP3-453P22.2"],
  "queryName" : "Variant_multipleRegions"
}

Example 4 of Request Body — (bedFileNameUploadService with {bucket name}/{object name} format)

{
  "context" : "patient",
  "alignmentId" : 1,
  "specimenIdsOdb" : [63],
  "bedFileNameUploadService" : "julian-test/julian-chrMT-test.txt"
}

Example 5 of Request Body — (bedFileNameUploadService with {file name} format)

{
  "context" : "patient",
  "alignmentId" : 1,
  "specimenIdsOdb" : [63],
  "bedFileNameUploadService" : "julian-chrMT-test.txt"
}

Example 6 of Request Body — (patientSubjectId with allDataOption)

{
  "context" : "patient",
  "alignmentId" : 1,
  "patientSubjectId" : [1,2],
  "allDataOption" : true
}

Example of Response Body

The following example shows the response in JSON format.

{
  "exportDefId": {
    "system": "ODB",
    "value": "10605"
  },
    "link": {
    "rel": "SUBMITJOB",
    "href": "/HSDataService-web/api/3.2.0/exports/10605/jobs"
  }
}

Example of Request Body — (with bedFileParsingErrors)

The following example shows the response in JSON format.

Note:

bedFileParsingErrors will only appear if bedFileNameUploadService is input and there are errors.

{
  "exportDefId": {
    "system": "ODB",
    "value": "10605"
  },
  "bedFileParsingErrors": [
    "Problem converting line 15 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "Problem converting line 18 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "Problem converting line 19 from BED file /u01/app/file_uploads/BedFileReaderUtilTest.txt to valid name, start position, end position.",
    "For bed file [/u01/app/file_uploads/BedFileReaderUtilTest.txt] cannot find chromosome id for chromosome names [12345 CHR ]"
  ],
  "link": {
    "rel": "SUBMITJOB",
    "href": "/HSDataService-web/api/3.2.0/exports/10605/jobs"
  }
}