1. Authentication
1.1. Login
Login to the system.
1.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/doLogin' -i -X POST \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'login=user&password=passwd'
1.1.2. Request Parameters
| Parameter | Description |
|---|---|
|
login |
|
password |
1.1.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
status message |
|
|
user login |
|
|
session token |
1.1.4. Sample Request
POST /api/doLogin HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: dapi.lcsb.uni.lu
Content-Length: 26
login=user&password=passwd
1.1.5. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 56
{"info":"Login successful.","login":"user","token":"48"}
1.2. Logout
Logout from the system (invalidate session).
1.2.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/doLogout' -i -X POST
1.2.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
status message |
1.2.3. Sample Request
POST /api/doLogout HTTP/1.1
Host: dapi.lcsb.uni.lu
1.2.4. Sample Response
HTTP/1.1 200 OK
Set-Cookie: DAPI_TOKEN=; Path=/; Max-Age=0; Expires=Thu, 1 Jan 1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 15
{"status":"OK"}
1.3. Is authenticated
Check if user in the current session is authenticated. Returns 403 (FORBIDDEN) if the user is not.
1.3.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/isAuthenticated' -i -X GET
2. Configuration
2.1. Get
Obtains parameters of the DAPI instance.
2.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/configuration/' -i -X GET
2.1.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
git commit hash that was used when building DAPI |
|
|
when DAPI was built |
|
|
DAPI version |
|
|
was the build dirty (there were uncommited changes during build process) |
2.1.3. Sample Request
GET /api/configuration/ HTTP/1.1
Host: dapi.lcsb.uni.lu
2.1.4. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 160
{
"commitId" : "5eacef75bd22e2b33b223a7898f8c423a4fa0c86",
"buildTime" : "2025-01-23T07:49:17+0000",
"buildVersion" : "1.0.0-devel",
"dirty" : "false"
}
3. Drug
3.1. Get by id
Obtains chemical data from database.
3.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/test-release/drugs/DB00006' -i -X GET
3.1.2. Path Parameters
| Parameter | Description |
|---|---|
|
database name |
|
release version of the database |
|
identifier of the chemical in the database |
3.1.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
chemical name |
|
|
chemical description |
|
|
list of synonyms |
|
|
identifier referencing the entry in source database |
|
|
list of annotations of the entry in identifiers.org format |
|
|
list of drug targets |
|
|
target name |
|
|
description |
|
|
organism id |
|
|
identifier referenceing the entry in source database |
|
|
disease id associated with the chemical-target interaction |
|
|
miriam uris identifying the target |
|
|
list of miriam uris identifying publications about the target |
|
|
list of types describing the chemical-target interaction |
|
|
blood brain barrier |
|
|
is the drug approved |
|
|
brand names |
3.1.4. Sample Request
GET /api/database/DrugBank/releases/test-release/drugs/DB00006 HTTP/1.1
Host: dapi.lcsb.uni.lu
3.1.5. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1128
{
"name" : "Bivalirudin",
"description" : "Bivalirudin is a synthetic 20 residue peptide (thrombin inhibitor) which reversibly inhibits thrombin. Once bound to the active site, thrombin cannot activate fibrinogen into fibrin, the crucial step in the formation of thrombus. It is administered intravenously. Because it can cause blood stagnation, it is important to monitor changes in hematocrit, activated partial thromboplastin time, international normalized ratio and blood pressure.",
"synonyms" : [ "Bivalirudinum", "Bivalirudin", "Hirulog", "Bivalirudina" ],
"sourceIdentifier" : "drugbank:DB00006",
"annotations" : [ ],
"targets" : [ {
"name" : "Prothrombin",
"description" : null,
"organism" : "taxonomy:9606",
"sourceIdentifier" : "drugbankv4.target:BE0000048",
"associatedDisease" : null,
"identifiers" : [ "uniprot:P00734" ],
"references" : [ "pubmed:11060732", "pubmed:11929334", "pubmed:11923794", "pubmed:11504570", "pubmed:11752352", "pubmed:11833835" ],
"types" : [ "inhibitor" ]
} ],
"bloodBrainBarrier" : null,
"approved" : null,
"brandNames" : [ "Angiox" ]
}
3.2. Get all
Obtains list of all chemicals from database. List is paginated and can be filtered.
3.2.1. CURL sample with pagination
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/test-release/drugs/?size=1' -i -X GET
3.2.2. CURL sample with filtering by target id
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/test-release/drugs/?target_identifier=urn:miriam:uniprot:P30968' -i -X GET
3.2.3. CURL sample with filtering by target disease
$ curl 'http://dapi.lcsb.uni.lu/api/database/CTD/releases/test-release/drugs/?target_identifier=hgnc.symbol:MYC' -i -X GET
3.2.4. Path Parameters
| Parameter | Description |
|---|---|
|
database name |
|
release version of the database |
3.2.5. Request parameters
| Parameter | Description |
|---|---|
|
page size |
|
page number |
|
drug name (case insensitive) |
|
synonym (case insensitive) |
|
target identifier in identifiers.org format (for example: 'uniprot:P30968') |
|
target disease identifier in identifiers.org format (for example: 'mesh:D000230') |
3.2.6. Response Parameters
| Path | Type | Description |
|---|---|---|
|
|
list of drugs in the system following search criteria |
|
|
how many pages are available |
|
|
how many drugs are in the database |
|
|
how many drugs are in the result list |
|
|
page number |
|
|
size of the page |
3.2.7. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1287
{
"content" : [ {
"name" : "Bivalirudin",
"description" : "Bivalirudin is a synthetic 20 residue peptide (thrombin inhibitor) which reversibly inhibits thrombin. Once bound to the active site, thrombin cannot activate fibrinogen into fibrin, the crucial step in the formation of thrombus. It is administered intravenously. Because it can cause blood stagnation, it is important to monitor changes in hematocrit, activated partial thromboplastin time, international normalized ratio and blood pressure.",
"synonyms" : [ "Bivalirudinum", "Bivalirudin", "Hirulog", "Bivalirudina" ],
"sourceIdentifier" : "drugbank:DB00006",
"annotations" : [ ],
"targets" : [ {
"name" : "Prothrombin",
"description" : null,
"organism" : "taxonomy:9606",
"sourceIdentifier" : "drugbankv4.target:BE0000048",
"associatedDisease" : null,
"identifiers" : [ "uniprot:P00734" ],
"references" : [ "pubmed:11060732", "pubmed:11929334", "pubmed:11923794", "pubmed:11504570", "pubmed:11752352", "pubmed:11833835" ],
"types" : [ "inhibitor" ]
} ],
"bloodBrainBarrier" : null,
"approved" : null,
"brandNames" : [ "Angiox" ]
} ],
"totalPages" : 3,
"totalElements" : 3,
"numberOfElements" : 1,
"size" : 1,
"number" : 0
}
4. Database
4.1. List all
Obtains list of all databases supported by DAPI. List is paginated.
4.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/database/' -i -X GET
4.1.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of databases in the system following search criteria |
|
|
how many pages are available |
|
|
how many databases are in the database |
|
|
how many databases are in the result list |
|
|
page number |
|
|
size of the page |
|
|
database name |
4.1.3. Sample Request
GET /api/database/ HTTP/1.1
Host: dapi.lcsb.uni.lu
4.1.4. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 177
{
"content" : [ {
"name" : "DrugBank"
}, {
"name" : "CTD"
} ],
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 20,
"number" : 0
}
5. File
Most of the files that will be uploaded/stored in DAPI are big. Therefore file API requires to create File entity first and then upload file content in chunks.
5.1. Create file
Creates file entity with empty content.
5.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/files/' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"filename":"test", "length":127}'
5.1.2. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
name of the file |
|
|
expected size of the file |
5.1.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier |
|
|
file name |
|
|
size of the file (in bytes) |
5.1.4. Sample Request
POST /api/files/ HTTP/1.1
Content-Type: application/json
Host: dapi.lcsb.uni.lu
Content-Length: 33
{"filename":"test", "length":127}
5.1.5. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 55
{
"id" : 5,
"filename" : "test",
"length" : 127
}
5.2. Upload content
Appends data to file content. Data should be passed in request body.
5.2.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/files/2' -i -X PATCH \
-d 'file content'
5.2.2. Path Parameters
| Parameter | Description |
|---|---|
|
file identifier |
5.2.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier |
|
|
file name |
|
|
size of the file (in bytes) |
5.2.4. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 54
{
"id" : 2,
"filename" : "test",
"length" : 12
}
5.3. Delete file
Deletes file.
5.3.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/files/6' -i -X DELETE
5.3.2. Path Parameters
| Parameter | Description |
|---|---|
|
file id |
5.4. List all
Obtains list of all files. List is paginated and can be filtered.
5.4.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/files/' -i -X GET
5.4.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of files in the system following search criteria |
|
|
how many pages are available |
|
|
how many files are in the database |
|
|
how many files are in the result list |
|
|
page number |
|
|
size of the page |
5.4.3. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 196
{
"content" : [ {
"id" : 1,
"filename" : "non-existing-file",
"length" : 0
} ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}
6. License
6.1. Create license
Creates license.
6.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/license/' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"url":"https://creativecommons.org/licenses/by-nc/4.0/legalcode", "name":"Creative Commons Attribution-NonCommercial 4.0 International", "content": "Using Creative Commons Public Licenses\nCreative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses..."}'
6.1.2. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
name |
|
|
url where the license is located |
|
|
text of the license |
6.1.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
name |
|
|
url where the license is located |
|
|
text of the license |
|
|
license identifier |
6.1.4. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 611
{
"id" : 5,
"name" : "Creative Commons Attribution-NonCommercial 4.0 International",
"content" : "Using Creative Commons Public Licenses\nCreative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses...",
"url" : "https://creativecommons.org/licenses/by-nc/4.0/legalcode"
}
6.2. Delete license
Deletes license.
6.2.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/license/7' -i -X DELETE
6.2.2. Path Parameters
| Parameter | Description |
|---|---|
|
license id |
6.2.3. Sample Response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
6.3. Get all
Obtains list of all licenses. List is paginated.
6.3.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/license/' -i -X GET
6.3.2. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of licenses in the system following search criteria |
|
|
how many pages are available |
|
|
how many licenses are in the database |
|
|
how many licenses are in the result list |
|
|
page number |
|
|
size of the page |
|
|
name |
|
|
url where the license is located |
|
|
text of the license |
|
|
license identifier |
6.3.3. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 815
{
"content" : [ {
"id" : 1,
"name" : "test-name",
"content" : "test-content",
"url" : "http://dapi.lcsb.uni.lu/test"
}, {
"id" : 3,
"name" : "fancy name",
"content" : "Using Creative Commons Public Licenses\nCreative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses...",
"url" : "https://creativecommons.org/licenses/by-nc/4.0/legalcode"
} ],
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 20,
"number" : 0
}
7. Release
7.1. Create release
Creates release from uploaded file.
7.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"file":14, "license":11}'
7.1.2. Path Parameters
| Parameter | Description |
|---|---|
|
database name |
7.1.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
id of the file from which release will be created |
|
|
id of the license that is applicable for the release |
7.1.4. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier |
|
|
name of the release |
|
|
when it was created |
|
|
name |
|
|
url where the license is located |
|
|
text of the license |
|
|
license identifier |
7.1.5. Sample Request
POST /api/database/DrugBank/releases/ HTTP/1.1
Content-Type: application/json
Host: dapi.lcsb.uni.lu
Content-Length: 25
{"file":14, "license":11}
7.1.6. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 161
{
"id" : 6,
"name" : "5.1",
"license" : {
"id" : 11,
"name" : "n",
"content" : "",
"url" : "u"
},
"timestamp" : "12-08-2019 00:00:00"
}
7.2. Accept release license
Accepts release license for user currently logged in.
7.2.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/5.1:acceptLicense' -i -X POST
7.2.2. Path Parameters
| Parameter | Description |
|---|---|
|
database name |
|
release name |
7.3. Delete release
7.3.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/5.1' -i -X DELETE
7.3.2. Path Parameters
| Parameter | Description |
|---|---|
|
database name |
|
release identifier |
7.4. List all
Obtains list of all releases. List is paginated.
7.4.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/database/DrugBank/releases/' -i -X GET
7.4.2. Path Parameters
| Parameter | Description |
|---|---|
|
database name |
7.4.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of drugs in the system following search criteria |
|
|
how many pages are available |
|
|
how many drugs are in the database |
|
|
how many drugs are in the result list |
|
|
page number |
|
|
size of the page |
|
|
identifier |
|
|
name of the release |
|
|
when it was created |
|
|
name |
|
|
url where the license is located |
|
|
text of the license |
|
|
license identifier |
7.4.4. Sample Request
GET /api/database/DrugBank/releases/ HTTP/1.1
Host: dapi.lcsb.uni.lu
7.4.5. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 546
{
"content" : [ {
"id" : 1,
"name" : "test-release",
"license" : {
"id" : 1,
"name" : "test-name",
"content" : "test-content",
"url" : "http://dapi.lcsb.uni.lu/test"
},
"timestamp" : "23-01-2025 07:49:40"
}, {
"id" : 9,
"name" : "5.1",
"license" : {
"id" : 14,
"name" : "name",
"content" : "",
"url" : "url"
},
"timestamp" : "12-08-2019 00:00:00"
} ],
"totalPages" : 1,
"totalElements" : 2,
"numberOfElements" : 2,
"size" : 20,
"number" : 0
}
8. User
8.1. Register user
Registers new user account.
8.1.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/users/xyz' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"login":"xyz","password":"passwd","email":"piotr.gawron@uni.lu"}'
8.1.2. Path Parameters
| Parameter | Description |
|---|---|
|
user login |
8.1.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
user email address |
|
|
user login |
|
|
user password |
8.1.4. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier of the user |
|
|
user name |
|
|
user email address |
|
|
is the user deleted |
|
|
user login |
|
|
is the account enabled |
|
|
set of user privileges |
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
|
|
set of accepted release licenses |
8.1.5. Sample Request
POST /api/users/xyz HTTP/1.1
Content-Type: application/json
Host: dapi.lcsb.uni.lu
Content-Length: 65
{"login":"xyz","password":"passwd","email":"piotr.gawron@uni.lu"}
8.1.6. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 185
{
"id" : 24,
"name" : null,
"email" : "piotr.gawron@uni.lu",
"deleted" : false,
"login" : "xyz",
"enabled" : false,
"privileges" : [ ],
"acceptedReleaseLicenses" : [ ]
}
8.2. Confirm registration
Confirms account by providing url received by email.
8.2.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/registrationConfirm?token=bc04773f-d823-4a1d-8efb-00ffde281d42' -i -X GET
8.2.2. Request parameters
| Parameter | Description |
|---|---|
|
token obtained via email |
8.2.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier of the user |
|
|
user name |
|
|
user email address |
|
|
is the user deleted |
|
|
user login |
|
|
is the account enabled |
|
|
set of user privileges |
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
|
|
set of accepted release licenses |
8.2.4. Sample Request
GET /registrationConfirm?token=bc04773f-d823-4a1d-8efb-00ffde281d42 HTTP/1.1
Host: dapi.lcsb.uni.lu
8.2.5. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 184
{
"id" : 20,
"name" : null,
"email" : "piotr.gawron@uni.lu",
"deleted" : false,
"login" : "xyz",
"enabled" : true,
"privileges" : [ ],
"acceptedReleaseLicenses" : [ ]
}
8.3. Get user data
Obtains user data.
8.3.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/users/user' -i -X GET
8.3.2. Path Parameters
| Parameter | Description |
|---|---|
|
user login |
8.3.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier of the user |
|
|
user name |
|
|
user email address |
|
|
is the user deleted |
|
|
user login |
|
|
is the account enabled |
|
|
set of user privileges |
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
|
|
set of accepted release licenses |
8.3.4. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 168
{
"id" : 29,
"name" : null,
"email" : null,
"deleted" : false,
"login" : "user",
"enabled" : true,
"privileges" : [ ],
"acceptedReleaseLicenses" : [ ]
}
8.4. List all
Obtains list of all users in the system. List is paginated.
8.4.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/users/' -i -X GET
8.4.2. Request parameters
| Parameter | Description |
|---|---|
|
page size |
|
page number |
8.4.3. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of users in the system following search criteria |
|
|
how many pages are available |
|
|
how many users are in the database |
|
|
how many users are in the result list |
|
|
page number |
|
|
size of the page |
|
|
identifier of the user |
|
|
user name |
|
|
user email address |
|
|
is the user deleted |
|
|
user login |
|
|
is the account enabled |
|
|
set of user privileges |
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
|
|
set of accepted release licenses |
8.4.4. Sample Request
GET /api/users/ HTTP/1.1
Host: dapi.lcsb.uni.lu
8.4.5. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 368
{
"content" : [ {
"id" : 17,
"name" : null,
"email" : null,
"deleted" : false,
"login" : "admin",
"enabled" : true,
"privileges" : [ {
"type" : "IS_ADMIN",
"objectId" : null
} ],
"acceptedReleaseLicenses" : [ ]
} ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}
8.5. Grant privilege
Grants user a privilege and returns modified user object.
8.5.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/users/user:grantPrivilege' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"type":"IS_ADMIN","objectId":null}'
8.5.2. Path Parameters
| Parameter | Description |
|---|---|
|
user login |
8.5.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
8.5.4. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier of the user |
|
|
user name |
|
|
user email address |
|
|
is the user deleted |
|
|
user login |
|
|
is the account enabled |
|
|
set of user privileges |
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
|
|
set of accepted release licenses |
8.5.5. Sample Request
POST /api/users/user:grantPrivilege HTTP/1.1
Content-Type: application/json
Host: dapi.lcsb.uni.lu
Content-Length: 35
{"type":"IS_ADMIN","objectId":null}
8.5.6. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 221
{
"id" : 30,
"name" : null,
"email" : null,
"deleted" : false,
"login" : "user",
"enabled" : true,
"privileges" : [ {
"type" : "IS_ADMIN",
"objectId" : null
} ],
"acceptedReleaseLicenses" : [ ]
}
8.6. Revoke privilege
Revokes user a privilege and returns modified user object.
8.6.1. CURL sample
$ curl 'http://dapi.lcsb.uni.lu/api/users/user:revokePrivilege' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"type":"IS_ADMIN","objectId":null}'
8.6.2. Path Parameters
| Parameter | Description |
|---|---|
|
user login |
8.6.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
8.6.4. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
identifier of the user |
|
|
user name |
|
|
user email address |
|
|
is the user deleted |
|
|
user login |
|
|
is the account enabled |
|
|
set of user privileges |
|
|
type of the privilege |
|
|
identifier of the object that privilege refer to |
|
|
set of accepted release licenses |
8.6.5. Sample Request
POST /api/users/user:revokePrivilege HTTP/1.1
Content-Type: application/json
Host: dapi.lcsb.uni.lu
Content-Length: 35
{"type":"IS_ADMIN","objectId":null}
8.6.6. Sample Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 215
{
"id" : 28,
"name" : null,
"email" : null,
"deleted" : false,
"login" : "user",
"enabled" : true,
"privileges" : [ {
"type" : "READ",
"objectId" : 13
} ],
"acceptedReleaseLicenses" : [ ]
}