-
Notifications
You must be signed in to change notification settings - Fork 5
rest api
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.
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
curl -X POST \
--data-binary @test/resources/F001644.mgf \
http://localhost:9000/exp/msrun/mascot:test
curl http://localhost:9000/exp/msruns
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
A match is the relation between a peptide and a spectrum (PSM), or two spectra (SSM) etc.
curl -X POST --data-binary @test/resources/M_100.mzid http://localhost:9000/search/M_100
curl http://localhost:9000/match/searches
curl http://localhost:9000/match/psms/M_100 | jq .
curl -X DELETE http://localhost:9000/match/psms/M_100
curl http://localhost:9000/search/M_100