Unsplashed background img 1
  • code Information about REST API

    • codeWhat is a REST API?

      REST is an abbriviation for representational state transfer. It can be used to retrive data from AraPheno using certain URLs. You also can write custom scripts (e.g. in Python, Pearl, Java etc.) to request and download the information you need.

      All REST commands will start with the following prefix: /rest/

      More information can be found at Wikipedia: What is REST?

    • codeHow to get a list of all phenotypes?

      You can use one of the following URL to retrive a list of phenotypes.

      For CSV format: http://arapheno.1001genomes.org/rest/phenotype/list.csv

      For JSON format: http://arapheno.1001genomes.org/rest/phenotype/list.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get details for a certain phenotype?

      You can use either the primary id or DOI to access certain details for a phenotype. Just replace <q> with the phenotype id or DOI.

      For CSV format: http://arapheno.1001genomes.org/rest/phenotype/<q>.csv

      For JSON format: http://arapheno.1001genomes.org/rest/phenotype/<q>.json

      Example: http://arapheno.1001genomes.org/rest/phenotype/1.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get all phenotype values and accession information for a certain phenotype?

      You can use either the primary id or DOI to get all phenotype values for a certain phenotype. Just replace <q> with the study id or DOI and extend URL with /phenotypes and extend the URL with /values

      For CSV format: http://arapheno.1001genomes.org/rest/phenotype/<q>/values.csv

      For JSON format: http://arapheno.1001genomes.org/rest/phenotype/<q>/values.json

      Example: http://arapheno.1001genomes.org/rest/phenotype/1/values.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get a list of all studies?

      You can use one of the following URL to retrive a list of studies.

      For CSV format: http://arapheno.1001genomes.org/rest/study/list.csv

      For JSON format: http://arapheno.1001genomes.org/rest/study/list.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get details for a certain study?

      You can use either the primary id or DOI to access certain details for a study. Just replace <q> with the study id or DOI.

      For CSV format: http://arapheno.1001genomes.org/rest/study/<q>.csv

      For JSON format: http://arapheno.1001genomes.org/rest/study/<q>.json

      Example: http://arapheno.1001genomes.org/rest/study/1.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get all phenotypes for a certain study?

      You can use either the primary id or DOI to access a list of all phenotypes for a study. Just replace <q> with the study id or DOI and extend URL with /phenotypes.

      For CSV format: http://arapheno.1001genomes.org/rest/study/<q>/phenotypes.csv

      For JSON format: http://arapheno.1001genomes.org/rest/study/<q>/phenotypes.json

      Example: http://arapheno.1001genomes.org/rest/study/1/phenotypes.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get a list of all accessions?

      You can use one of the following URL to retrive a list of accessions.

      For CSV format: http://arapheno.1001genomes.org/rest/accession/list.csv

      For JSON format: http://arapheno.1001genomes.org/rest/accession/list.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get details for a certain accession?

      You can use the accession id to access certain details for an accession. Just replace <q> with the accession id.

      For CSV format: http://arapheno.1001genomes.org/rest/accession/<q>.csv

      For JSON format: http://arapheno.1001genomes.org/rest/accession/<q>.json

      Example: http://arapheno.1001genomes.org/accession/study/6074.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get all phenotypes for a certain accession?

      You can use the accession id to access a list of all phenotypes for this accession. Just replace <q> with the accession id and extend URL with /phenotypes.

      For CSV format: http://arapheno.1001genomes.org/rest/accession/<q>/phenotypes.csv

      For JSON format: http://arapheno.1001genomes.org/rest/accession/<q>/phenotypes.json

      Example: http://arapheno.1001genomes.org/rest/accession/6074/phenotypes.json

      A more detailed API description can be found here: API Documentation

    • codeHow to get all phenotypes for a list of accessions?

      You send a POST request with a list of accession ids (comma seperated) and the REST endpoint will return a map with accession_id -> list of phenotypes.
      Example (cURL): curl --request POST --url http://arapheno.1001genomes.org/rest/accession/phenotypes/ --header 'content-type: text/plain' --data '9434,6073'

      The response will contain a JSON dict with the information in following format:

          {
              "6909": [
                  {"name":"FT10","id":261,....},
                  {"name":"LD","id":123},...
              ],
              "8123": [
                  {
                  {"name":"FT16","id":262,....},
                  {"name":"LI7","id":150},...
              ]...
          }
                              

      A more detailed API description can be found here: API Documentation

    • codeHow to do a database search with REST?

      You can use the following URL to perform a search. Just replace <query> with your search query (e.g. with a phenotype name). If the search query is empty you will get a list with all phenotypes and studies.

      For CSV format: http://arapheno.1001genomes.org/rest/search/<query>.csv

      For JSON format: http://arapheno.1001genomes.org/rest/search/<query>.json

      Example: http://arapheno.1001genomes.org/rest/search/at.json

      A more detailed API description can be found here: API Documentation

    • codeHow to retrive phenotype correlations via REST?

      You can use the following URL to compute phenotype-phenotype correlations. Just replace <query> with a comma sperated list oh phenotype ids. Note, that for this query we only support JSON as output format.

      http://arapheno.1001genomes.org/rest/correlation/<query>/

      Example: http://arapheno.1001genomes.org/rest/correlation/6,29,30,31,49,102,99,53,86,39/

      A more detailed API description can be found here: API Documentation

    • codeHow to submit your study via REST?

      You can submit a study by sending a POST request containing the study file in ISA-TAB or PLINK format and additional form fields (i.e. firstname. lastname, email) to the following url: http://arapheno.1001genomes.org/rest/submission/
      The response will contain information about the submission (see below)

      Example (cURL): curl -X POST -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "file=@" -F "firstname=John" -F "lastname=Doe" -F "email=john@doe.com" "http://arapheno.1001genomes.org/rest/submission/"

      A more detailed API description can be found here: API Documentation

    • codeHow to get details for a submission?

      You can use the submission_id to view details such as status and curation about the submission. Just replace <q> with the submission_id:

      http://arapheno.1001genomes.org/rest/submission/<q>.json

      A more detailed API description can be found here: API Documentation

    • codeHow to delete a submission?

      You can use the submission_id to delete by sending a DELETE request. Just replace <q> with the submission_id:

      http://arapheno.1001genomes.org/rest/submission/<q>/delete

      Example (cURL): curl -X DELETE -H "Cache-Control: no-cache" "http://arapheno.1001genomes.org/rest/submission/[SUBMISSION_ID]/delete"

      A more detailed API description can be found here: API Documentation