An element can be drawn as a picture instead of its default shape by assigning it a glyph - one of
the images uploaded to the project, listed by Glyphs.
The endpoints are served from
/new_api/projects/{projectId}/maps/{mapId}/bio_entities/elements/{id}/glyph.
1. Get element glyph
Returns the glyph assigned to an element, or null if no glyph is set.
1.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/233/bio_entities/elements/626/glyph 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. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/233/bio_entities/elements/626/glyph' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
1.4. HTTP response
HTTP/1.1 200 OK
1.5. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique glyph identifier |
|
|
attached file identifier |
|
|
attached file name |
1.6. Sample Response
{
"id" : 30,
"file" : 202
}
2. Set element glyph
Assigns a glyph to an element by its id, taken from the glyphs uploaded to the project, or clears
the assignment when id is null.
|
Note
|
Supports optimistic locking via the If-Match header.
|
2.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/232/bio_entities/elements/624/glyph 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 |
|---|---|---|
|
|
identifier of the glyph to assign, or null to remove the glyph |
2.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/232/bio_entities/elements/624/glyph' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"id":29}' \
-H 'Content-Type: application/json'
2.5. HTTP response
HTTP/1.1 200 OK
2.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique glyph identifier |
|
|
attached file identifier |
|
|
attached file name |
2.7. Sample Response
{
"id" : 29,
"file" : 201
}