Rest Api
Submit a job
- POST /api/v1/job/submit
Submit a job
Example request:
{ 'configuration' : { 'profile': 'bacteria-gram+' }, 'sequence': 'MKKKQTTKALLVTCITDHKQDFYRLAFSYVKNQDDALDIVQESIKKALSSVETVRNPGTIKSWFYKILVRTAIDFLRKQKKIRVMDDETIEFLSKGKEDHYKDTDLHEALDELPYRYKTIIILRFFEDLKLEEIAEITGENTNTVKTRLYRALKLMRIQLTKEDLS' }
Example response:
{ "id": "5be12dcd-f74f-41d0-9abd-41527553a13a", "created": "2019-05-14T13:58:18.892507Z", "lastUpdated": "2019-05-14T13:58:18.906208Z", "deleteAt": "2019-05-15T13:58:18.892507Z", "step": "fasta-validator", "request": { "type": "sequence", "configuration": { "profile": "bacteria-gram+" }, "sequence": "FDSJKLFJDSFKLJDFHADJKLFHDSJKLFHDAFJKLDHFJKLDASFHDJKLFHDSAJKLFHDAKLFJDHSAFKLDLSNCDJKLFENFIUPERWDJKPCNVDFPIEHFDCFJDKOWFPDJWFKLXSJFDWFIPUAENDCXAMSFNDUAFIDJFDLKSAFJDSAKFLJDSADJFDWFIPUAENDCXAMSFNDAAAAAAAAAAAFJDSAKAA\n" }, "files": [ { "location": "input.fas", "name": "input.fas", "type": "Input" } ], "state": { "name": "waiting", "type": "Waiting" } }
- Request JSON Object
sequence – The protein sequence, either raw or as fasta string
configuration.profile – The profile for the computation
source_app – An identifier of the app sends the request (optional)
- Status Codes
200 OK – no error
400 Bad Request – the request is invalid
Get job status
- GET /api/v1/job/(jobid)
Get the job object
Example request:
Example response:
{ "id": "5be12dcd-f74f-41d0-9abd-41527553a13a", "created": "2019-05-14T13:58:18.892507Z", "lastUpdated": "2019-05-14T13:58:18.906208Z", "deleteAt": "2019-05-15T13:58:18.892507Z", "step": "fasta-validator", "request": { "type": "sequence", "configuration": { "profile": "bacteria-gram+" }, "sequence": "FDSJKLFJDSFKLJDFHADJKLFHDSJKLFHDAFJKLDHFJKLDASFHDJKLFHDSAJKLFHDAKLFJDHSAFKLDLSNCDJKLFENFIUPERWDJKPCNVDFPIEHFDCFJDKOWFPDJWFKLXSJFDWFIPUAENDCXAMSFNDUAFIDJFDLKSAFJDSAKFLJDSADJFDWFIPUAENDCXAMSFNDAAAAAAAAAAAFJDSAKAA\n" }, "files": [ { "location": "input.fas", "name": "input.fas", "type": "Input" } ], "state": { "name": "waiting", "type": "Waiting" } }
- Parameters
jobid – The job id
- Status Codes
200 OK – no error
404 Not Found – the job does not exist
Delete a job
Retrieve a job file
- GET /api/v1/job/(jobid)/file/(filename)
Get the job object
Example request:
Example response:
>seq AAAA
- Parameters
jobid – The job id
filename – The filename
- Status Codes
200 OK – no error
404 Not Found – the job or file does not exist
Access the eventbus
- GET /api/v1/job/eventbus
Join the eventbus. Use the appropriate vertx library to access the eventbus.
Resolve the representations of a dbxref
- GET /api/v1/dbxref/resolve/(dbxref)
Get the locations where you can find representations of the dbxref.
Example request:
GET /api/v1/dbxref/retrieve/taxon:100 HTTP/1.1 Host: psos-staging.computational.bio Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ {"dbxref": "taxon:100", "locations": { "html": ["http://www.uniprot.org/taxonomy/100"], "json": ["https://www.ebi.ac.uk/ena/data/taxonomy/v1/taxon/tax-id/100"], "xml": ["http://www.uniprot.org/taxonomy/100.rdf"], "xml_ncbi": ["https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=100"]}, "status": "found"} ]
- Parameters
dbxref – The dbxref
- Status Codes
200 OK – no error
404 Not Found – no information about the dbxref found
Retrieve a dbxref as json
- GET /api/v1/dbxref/retrieve/(dbxref)
Retrieve a json representation of the dbxref.
Example request:
GET /api/v1/dbxref/retrieve/taxon:100 HTTP/1.1 Host: psos-staging.computational.bio Accept: application/json, text/javascript
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "id": "Taxon:100", "scientificName": "Ancylobacter aquaticus", "lineage": ["Bacteria", "Proteobacteria", "Alphaproteobacteria", "Rhizobiales", "Xanthobacteraceae", "Ancylobacter"], "rank": "species", "geneticCodes": { "geneticCode": "11" } } ]
- Parameters
dbxref – The dbxref
- Status Codes
200 OK – no error
404 Not Found – no information about the dbxref found
Redirect to a html representation of a dbxref
- GET /api/v1/dbxref/redirect/(dbxref)
Redirect to a html representation of the dbxref.
Example request:
GET /api/v1/dbxref/redirect/taxon:100 HTTP/1.1 Host: psos-staging.computational.bio Accept: application/json, text/javascript
Example response:
HTTP/1.1 303 See Other Location: http://www.uniprot.org/taxonomy/100
- Parameters
dbxref – The dbxref
- Status Codes
303 See Other – no error, html representation found
404 Not Found – database in dbxref not supported