API Documentation
RaftProt V2 offers a RESTful API to allow users to interact programmatically with the database. The API has several endpoints to extract data related to studies, experiments, proteins or tissues.
Calling the API
-
Choose endpoint:
First, choose the endpoint (listed below) depending on the information you want to extract. You should decide whether you want to get data list matching a criteria (ex: studies published in 2015, experiments performed for a specific organism), or get details about a certain entry (ex: details about a certain protein).
-
Choose filters for lists:
These are matching criteria for your search. Using the same example (studies published in 2015), we should choose the year=2015 filter.
Filters can also be combined with operators other than equality (=). We can get studies published '2015 or later' 2015 using 'gte' operator (Greater Than or Equal), so the query will be (/studies.json?year__gte=2015).
A full list of useful operators can be found here
-
Choose output format:
Most endpoints support JSON, CSV, XML and HTML formats. You can specify the format by either passing it as parameter (?format=json) or adding a suffix to the endpoint (/studies.json, /experiments/exp001.xml).