From 6ee5810042f53023a261aae85df3be3adb16147b Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 20 Jul 2020 12:14:07 +0100 Subject: Adding an endpoint for documentation --- test/rest-api.html | 110 ++++++++++++++++++++++++++++++++++++++++++++++------- test/rest-api.org | 4 +- 2 files changed, 98 insertions(+), 16 deletions(-) (limited to 'test') diff --git a/test/rest-api.html b/test/rest-api.html index e0a10c7..c50d116 100644 --- a/test/rest-api.html +++ b/test/rest-api.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +Here we document the public REST API that comes with PubSeq. The tests @@ -266,8 +266,8 @@ for running the tests inside emacs.
We built a REST API for COVID-19 PubSeq. The API source code can be @@ -299,11 +299,39 @@ assert response_body["service"] == "PubSeq", "PubSeq API not found" response_body
service | +: | +PubSeq | +version | +: | +0.1 | +
PubSeq provides an API that is used to export formats that are @@ -315,12 +343,66 @@ documented requests.get("http://covid19.genenetwork.org/api/ebi/sample-MT32690.1.xml").text
+<?xml version="1.0" encoding="UTF-8"?> +<SAMPLE_SET> + <SAMPLE alias="MT32690.1" center_name="COVID-19 PubSeq"> + <TITLE>COVID-19 PubSeq Sample</TITLE> + <SAMPLE_NAME> + <TAXON_ID>2697049</TAXON_ID> + <SCIENTIFIC_NAME>Severe acute respiratory syndrome coronavirus 2</SCIENTIFIC_NAME> + <COMMON_NAME>SARS-CoV-2</COMMON_NAME> + </SAMPLE_NAME> + <SAMPLE_ATTRIBUTES> + <SAMPLE_ATTRIBUTE> + <TAG>investigation type</TAG> + <VALUE></VALUE> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>sequencing method</TAG> + <VALUE></VALUE> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>collection date</TAG> + <VALUE></VALUE> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>geographic location (latitude)</TAG> + <VALUE></VALUE> + <UNITS>DD</UNITS> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>geographic location (longitude)</TAG> + <VALUE></VALUE> + <UNITS>DD</UNITS> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>geographic location (country and/or sea)</TAG> + <VALUE></VALUE> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>geographic location (region and locality)</TAG> + <VALUE></VALUE> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>environment (material)</TAG> + <VALUE></VALUE> + </SAMPLE_ATTRIBUTE> + <SAMPLE_ATTRIBUTE> + <TAG>ENA-CHECKLIST</TAG> + <VALUE>ERC000011</VALUE> + </SAMPLE_ATTRIBUTE> + </SAMPLE_ATTRIBUTES> + </SAMPLE> +</SAMPLE_SET> +
Execute a code @@ -346,7 +428,7 @@ To skip confirmations you may also want to set