Alternative names of the element.
The endpoints are served from /new_api/projects/{projectId}/maps/{mapId}/bio_entities/elements/{id}/synonyms.
1. List synonyms
Returns a page of synonyms of the element.
|
Note
|
The result is paged - use the page and size query parameters to
walk through it.
|
1.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/238/bio_entities/elements/641/synonyms/ HTTP/1.1
1.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
1.3. Query Parameters
| Parameter | Description |
|---|---|
|
index of the page to fetch, counted from 0; 0 by default |
|
number of entries on a page; 20 by default, 10000 at most |
1.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/238/bio_entities/elements/641/synonyms/' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
1.5. HTTP response
HTTP/1.1 200 OK
1.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of synonyms of the element |
|
|
total number of pages |
|
|
total number of elements |
|
|
number of elements on this page |
|
|
page size |
|
|
page number |
1.7. Sample Response
{
"content" : [ "my synonym" ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}
2. Add synonym
Adds a synonym to the element.
2.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/240/bio_entities/elements/652/synonyms/ HTTP/1.1
2.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
2.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
synonym to be added |
2.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/240/bio_entities/elements/652/synonyms/' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"synonym":"Synonym 11"}' \
-H 'Content-Type: application/json'
2.5. HTTP response
HTTP/1.1 201 Created
2.6. Sample Response
{
"synonym" : "Synonym 11"
}
3. Delete synonym
Removes a synonym from the element.
3.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/236/bio_entities/elements/637/synonyms:delete HTTP/1.1
3.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
unique element identifier (the numeric "id" field of the element, not the "elementId" taken from the source file) |
3.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
synonym to be removed |
3.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/236/bio_entities/elements/637/synonyms:delete' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"synonym":"my synonym"}' \
-H 'Content-Type: application/json'
3.5. HTTP response
HTTP/1.1 200 OK