CHORD API¶
Data types endpoints¶
Projects
api/projects
GET: list of Projects
api/projects/{id}
GET: single Project
Datasets
api/datasets
GET: list of Datasets
api/datasets/{id}
GET: single Dataset
Table ownerships
api/table_ownership
GET: list of Table ownerships
api/table_ownership/{id}
GET: single Table ownership
Tables
api/tables
GET: list of Tables
api/tables/{id}
GET: single Table
or
tables
GET: list of Tables
tables/{id}
GET: single Table
tables/{id}/summary
GET: summary about data in the table
tables/{id}/search
POST: query data in the table
Schemas for Data types¶
data-types
GET: list of all data types available for ingestion
data-types/{data_type_name}
GET: single data type schema
For example: data-types/experiment
data-types/{data_type_name}/schema
GET: same as above but just data type schema, without data type id
Private search endpoints¶
private/search
POST: returns phenopackets that fit the conditions, works on all phenopackets in database
private/tables/{id}/search
POST: returns phenopackets from a specified table that fit the conditions
Example of POST request to search for all phenopackets that have disease Carcinoma
{
"data_type": "phenopacket",
"query": ["#ico", ["#resolve", "diseases", "[item]", "term", "label"], "Carcinoma"]
}
Example of POST request to search for all experiments that have experiments results in VCF format
{
"data_type": "experiment",
"query": ["#eq", ["#resolve", "experiment_results", "[item]", "file_format"], "VCF"]
}
Ingest endpoint¶
private/ingest
POST: ingests data to database
Example of POST request to ingest phenopackets file
{
"table_id": "{table_id}",
"workflow_id": "phenopackets_json",
"workflow_params": {
"phenopacket_json.json_document": "path/phenopackets.json"
},
"workflow_outputs": {
"json_document": "path/path.json"
}
}
Example of POST request to ingest experiments file
{
"table_id": "{table_id}",
"workflow_id": "experiments_json",
"workflow_params": {
"experiments_json.json_document": "path/experiments.json"
},
"workflow_outputs": {
"json_document": "path/experiments.json"
}
}
Example of POST request to ingest mcodepackets file
{
"table_id": "{table_id}",
"workflow_id": "mcode_json",
"workflow_params": {
"mcode_json.json_document": "path/mcodepackets.json"
},
"workflow_outputs": {
"json_document": "path/mcodepackets.json"
}
}
Export endpoint¶
private/export
POST: retrieves data from database
Example of POST request to retrieve data formatted in cbioportal format
{
"format": "cbioportal",
"object_type": "dataset",
"object_id": "{dataset_id}",
"output_path": "{path_to_local_directory_optional}"
}
Workflows endpoints¶
workflows
GET: list of all available workflows
workflows/{slug:workflow_id}
GET: single workflow schema
workflows/{slug:workflow_id}.wdl
GET: returns a wdl file for a given workflow