Rest API (version 12.1.x)

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

To use API first we need to login:

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
  • 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