JAL-3982 todo notes
[jalview.git] / doc / api_specification.md
1 # Jalview Rest(-like) API
2
3 ## Launch Jalview with API active on specified port
4
5 `java -jar jalview_all.jar -nosplash -nowebservicediscovery -startapi -serverport 2021`
6 (-nosplash and -nowebservicediscovery just to save time/output)
7
8 ## Open a MSA window with existing data
9
10 `*POST* http://localhost:2021/jalview/api/inputalignment`
11 with body of HTTP request being content of file (automatic parsing by Jalview)
12
13 `*GET* http://localhost:2021/jalview/api/inputalignment?data=<data>`
14 with <data> being content of file (limited size)
15
16 `*GET* http://localhost:2021/jalview/api/inputalignment?file=<fileURI>`
17 with <fileURI> being a file
18
19 `*GET* http://localhost:2021/jalview/api/inputalignment?url=<URL>`
20 with <URL> being a URL to a file
21
22 ## Open a MSA window with online resource fetch
23
24 `http://localhost:2021/jalview/api/fetchsequences/<resource name>/<sequence ids>`
25 <resource name> is one of "ensemble", "pdb", "ensembl-tr", "ensembl-gn", ["uniprotkb/swiss-prot", "uniprotkb/trembl", ""uniprot/sptrembl", "uniprot/swissprot" not yet implemented]
26 <sequence ids> ids for fetch
27
28 ### optional parameters
29 `id=<your specified id for this request>`
30
31 ### Returns (as key=value pairs in the body of the response)
32 ```
33 id=<the given id for this request>
34 status=<STARTED|IN_PROGRESS|FINISHED|ERROR|NOT_RUN>
35
36
37
38
39
40