Skip to content
Trinidad Martín edited this page May 21, 2015 · 7 revisions

#REST API The most common way to interact with MSViz backend is via the REST API. The full documentation is described by swagger under http://YOUR_HOST/docs/index.html. Nevertheless, here are the main command, given that your server is in development mode.

Sequences

There are two very close url: /sequences for command outching several entries at once (all of a source, for example) or /sequence for the one targeting more precisely an entry

####Load a fasta file

curl -X POST                                   \
     --data-binary=@test/resources/M_100.fasta  \
     http://localhost:9000/sequences/M_100/fasta

####List all sources All the source tags (from the source argument in the load call).

curl http://localhost:9000/sequences/list-sources

####Get a protein

curl http://localhost:9000/sequence/M_100/Q09666

####Delete a whole source

curl -X DELETE http://localhost:9000/sequences/M_100

Experimental data

Load an mgf file as a run

curl -X POST                                   \
     --data-binary @test/resources/F001644.mgf  \
     http://localhost:9000/exp/msrun/mascot:test

List runs

curl http://localhost:9000/exp/msruns

Delete a run

All experimental data related to a run mascot-test can be deleted by the url:

curl -X DELETE http://localhost:9000/exp/msrun/mascot:test

Matches

A match is the relation between a peptide and a spectrum (PSM), or two spectra (SSM) etc.

Load an mzid

curl  -X POST --data-binary @test/resources/M_100.mzid  http://localhost:9000/search/M_100

List all searchids

curl http://localhost:9000/match/searches

List all PSMs

curl http://localhost:9000/match/psms/M_100 | jq .

delete a list of psms

curl -X DELETE http://localhost:9000/match/psms/M_100

List search info by searchID

curl http://localhost:9000/search/M_100