1. Login
Login to the system. If credentials are invalid response with 403 status code will be returned. Token will be valid for the next 120 minutes.
1.1. CURL sample
$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/doLogin' -X POST \
-d 'login=admin&password=admin' \
-H 'Content-Type: application/x-www-form-urlencoded'
1.2. Request Parameters
| Parameter | Description |
|---|---|
|
login |
|
password |
1.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
status message |
|
|
user login |
|
|
session token |
1.4. Sample Response
{
"info" : "Login successful.",
"login" : "admin",
"token" : "92"
}
2. Logout
Logout from the system.
2.1. CURL sample
$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/doLogout' -X POST \
--cookie 'MINERVA_AUTH_TOKEN=xxxxxxxx' \
-H 'Content-Type: application/x-www-form-urlencoded'
2.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
status message |
2.3. Sample Response
{
"status" : "OK"
}
3. Check if session is still valid
Sometimes there is need for verification if user is authenticated in the current session (for instance we might need this information to check if our session did not expire). This API call returns information if the session is still valid.
3.1. CURL sample
$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/users/isSessionValid' -X GET \
--cookie "MINERVA_AUTH_TOKEN=xxxxxxxx" \
-H 'Content-Type: application/x-www-form-urlencoded'
3.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
user login of the session owner |
|
|
authentication token |
3.3. Sample Response
{
"login" : "admin",
"token" : "89"
}