You are in REST API » v14.0 || Go to



Rest API

Introduction

Rest API is located in /api/ path of the deployed application. For instance, Rest API of pdmap project that can be browsed using https://pdmap.uni.lu/minerva/ will be located here: https://pdmap.uni.lu/minerva/api/

Rest API tries to follow API Design Guide by Google.

All API calls (except login) must include MINERVA_AUTH_TOKEN obtained due login process.

QuickStart guide

Here is sample example that shows information about all projects accessible by guest account (anonymous user):

curl -X GET https://minerva-dev.lcsb.uni.lu/minerva/api/projects/

If we are interested in the API calls that require more privileges than anonymous user we need to login first:

curl -X POST -c - --data "login=anonymous&password=" https://minerva-dev.lcsb.uni.lu/minerva/api/doLogin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    55    0    55    0     0   1774      0 --:--:-- --:--:-- --:--:--  1774
{"info":"Login successful. TOKEN returned as a cookie"}
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

#HttpOnly_minerva-dev.lcsb.uni.lu	FALSE	/minerva/	FALSE	0	MINERVA_AUTH_TOKEN      xxxxxxxx

The response creates an authentication token and puts it into a cookie MINERVA_AUTH_TOKEN=xxxxxxxx. When using console curl command this cookie must be attached to every query that follows. When we have authentication token we can access information about specific project on the server:

curl -X GET --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx" https://minerva-dev.lcsb.uni.lu/minerva/api/projects/PD_150625_3/

Categories

  • Authentication
  • Projects - set of methods allowing to obtain information about projects and allowing to create new project and modifying existing ones
  • Configuration - set of methods allowing to obtain configuration information from server and updating it with proper privileges
  • Converter - Conversion API provides access to MINERVA’s ability to convert between different systems biology network formats and to export of layouts to different graphical formats
  • Users - set of methods allowing to obtain and manage users and their access control
  • Files - methods that allow to upload files into the system
  • Plugins (BETA) - methods allowing to store some data for plugin infrastructure
  • Genomics - methods allowing to access genome data
  • Mesh - methods allowing to access info about mesh data
  • Taxonomy - methods allowing to access info about taxonomy data