Layers of a map, served from /new_api/projects/{projectId}/maps/{mapId}/layers.
1. Images
A picture positioned and sized on the map, referencing the uploaded image to display.
See full documentation.
2. Texts
A positioned text box on the map with its own font, color, background and border styling.
See full documentation.
3. Lines
A polyline (ordered sequence of points) drawn on the map.
See full documentation.
4. Ovals
An ellipse drawn on the map, defined by a bounding box, fill color and border.
See full documentation.
5. Rectangles
A rectangle drawn on the map, defined by a bounding box, fill color and border.
See full documentation.
6. Get layer
Returns info about layer.
6.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/378/layers/187 HTTP/1.1
6.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
6.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/378/layers/187' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
6.4. HTTP response
HTTP/1.1 200 OK
6.5. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique layer identifier |
|
|
z index (order of layers) |
|
|
name of the layer presented to the user |
|
|
is layer visible |
|
|
can layer be edited |
6.6. Sample Response
{
"id" : 187,
"name" : "Chase Johnson",
"visible" : true,
"locked" : false,
"z" : 28
}
7. Add layer
Creates an empty graphical overlay on the map that images, texts, lines, ovals and rectangles are
then added to. The layer carries a name, a z index deciding the drawing order against other
layers, a visible flag and a locked flag that blocks editing of its content.
7.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/377/layers/ HTTP/1.1
7.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
7.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
name of the layer presented to the user |
|
|
z index (order of layers) |
|
|
is layer visible |
|
|
can layer be edited |
7.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/377/layers/' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"name":"Sebastian Bednar","visible":false,"locked":false,"z":46}' \
-H 'Content-Type: application/json'
7.5. HTTP response
HTTP/1.1 201 Created
7.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique layer identifier |
|
|
z index (order of layers) |
|
|
name of the layer presented to the user |
|
|
is layer visible |
|
|
can layer be edited |
7.7. Sample Response
{
"id" : 186,
"name" : "Sebastian Bednar",
"visible" : false,
"locked" : false,
"z" : 46
}
8. Update layer
Replaces the whole layer definition: name and z are required, and visible and locked fall
back to false when they are not sent, so always pass the complete set of values rather than only
the changed ones. The shapes drawn on the layer are left untouched.
|
Note
|
Supports optimistic locking via the If-Match header.
|
8.1. HTTP request
PUT /minerva/new_api/projects/test_project/maps/376/layers/184 HTTP/1.1
8.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
8.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
name of the layer presented to the user |
|
|
z index (order of layers) |
|
|
is layer visible |
|
|
can layer be edited |
8.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/376/layers/184' -X PUT \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"name":"Concha Wyman","visible":false,"locked":false,"z":3}' \
-H 'Content-Type: application/json'
8.5. HTTP response
HTTP/1.1 200 OK
8.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique layer identifier |
|
|
z index (order of layers) |
|
|
name of the layer presented to the user |
|
|
is layer visible |
|
|
can layer be edited |
8.7. Sample Response
{
"id" : 184,
"name" : "Concha Wyman",
"visible" : false,
"locked" : false,
"z" : 3
}
9. Delete layer
Removes the layer together with everything drawn on it - its images, texts, lines, ovals and rectangles are deleted as well. Glyphs uploaded to the project are not affected, only the placements referencing them.
|
Note
|
Supports optimistic locking via the If-Match header.
|
9.1. HTTP request
DELETE /minerva/new_api/projects/test_project/maps/375/layers/183 HTTP/1.1
9.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
9.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/375/layers/183' -X DELETE \
-H 'Authorization: Bearer xxxxxxxx'
9.4. HTTP response
HTTP/1.1 200 OK
10. List layers
Returns the layers of the map. Only the layer properties are returned - the shapes placed on a layer are read from the per-shape endpoints.
|
Note
|
The result is paged - use the page and size query parameters to
walk through it.
|
10.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/374/layers/ HTTP/1.1
10.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
10.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 |
10.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/374/layers/' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
10.5. HTTP response
HTTP/1.1 200 OK
10.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of layers on the page |
|
|
unique layer identifier |
|
|
z index (order of layers) |
|
|
name of the layer presented to the user |
|
|
is layer visible |
|
|
can layer be edited |
|
|
total number of pages |
|
|
total number of elements |
|
|
number of elements on this page |
|
|
page size |
|
|
page number |
10.7. Sample Response
{
"content" : [ {
"id" : 182,
"name" : "Harlan Langworth",
"visible" : true,
"locked" : false,
"z" : 29
} ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}