From 5b6a0829691db987481f5b365799842a1935ab0a Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 22 Sep 2021 20:02:10 +0100 Subject: [PATCH] JAL-3851 api_specification.md in progress --- doc/api_specification.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 doc/api_specification.md diff --git a/doc/api_specification.md b/doc/api_specification.md new file mode 100644 index 0000000..8ec1baa --- /dev/null +++ b/doc/api_specification.md @@ -0,0 +1,40 @@ +# Jalview Rest(-like) API + +## Launch Jalview with API active on specified port + +`java -jar jalview_all.jar -nosplash -nowebservicediscovery -startapi -serverport 2021` +(-nosplash and -nowebservicediscovery just to save time/output) + +## Open a MSA window with existing data + +`*POST* http://localhost:2021/jalview/api/inputalignment` +with body of HTTP request being content of file (automatic parsing by Jalview) + +`*GET* http://localhost:2021/jalview/api/inputalignment?data=` +with being content of file (limited size) + +`*GET* http://localhost:2021/jalview/api/inputalignment?file=` +with being a file + +`*GET* http://localhost:2021/jalview/api/inputalignment?url=` +with being a URL to a file + +## Open a MSA window with online resource fetch + +`http://localhost:2021/jalview/api/fetchsequences//` + is one of "ensemble", "pdb", "ensembl-tr", "ensembl-gn", ["uniprotkb/swiss-prot", "uniprotkb/trembl", ""uniprot/sptrembl", "uniprot/swissprot" not yet implemented] + ids for fetch + +### optional parameters +`id=` + +### Returns (as key=value pairs in the body of the response) +``` +id= +status= + + + + + + -- 1.7.10.2