Examples
Simple properties
Comparison
Invalid calls
Web API help
This web page shows how you can access Proteax® functionality over the Internet through a simple Web API. The Web API lets you access all Proteax functions via simple GET or POST HTTP requests and retrieve the results as either plain text or XML.
You can find a list of all available functions via this link.
Usage of this Web API is for non-profit or demonstration purposes only. Commercial usage will require a license agreement with Biochemfusion. You are welcome to contact Biochemfusion if you have licensing questions.
Calling conventions
The Web API accepts requests on the URL form .../webapi.py/calculate? followed by the following request parameters:
- function_name - name of one of the valid Proteax functions
- p1, p2, ... - parameter one, two, ... depending on the number of parameters that function_name requires / accepts
- output_format - determines the output format which can be 'XML' or 'TEXT' (case-insensitive)
To calculate the average molecular weight of the molecule H-AS[Gla]FW-OH you would use the URL:
.../webapi.py/calculate?function_name=mw_avg&p1=H-AS[Gla]FW-OH
To compare the protein entries H-ASEWF-OH and H-ASDEF-OH and get the result back as plain text you would use the URL:
.../webapi.py/calculate?function_name=dernot_diff&p1=H-ASEWF-OH&p2=H-ASDEF-OH&output_format=text
The examples listed to the left use this approach.
You may also call the Web API by POSTing the request parameters to the URL .../webapi.py/calculate. This is preferable if your input is very long or you have multi-line input, e.g. UniProt or GPMAW input. The form below shows an interactive example of using POST.
Error handling
In case of errors the Web API will always return a plain text error message starting with the text 'ERROR'. The HTTP return code will be 500 (Internal server error) instead of the normal 200 (OK).