Images placed on a layer of a map, served from
/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/images.
1. Get layer image
Returns info about layer image.
1.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/383/layers/192/images/20 HTTP/1.1
1.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
image identifier |
1.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/383/layers/192/images/20' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
1.4. HTTP response
HTTP/1.1 200 OK
1.5. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique layer identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the image |
|
|
height of the image |
|
|
glyph identifier |
1.6. Sample Response
{
"id" : 20,
"x" : 10.0,
"y" : 10.0,
"z" : 0,
"width" : 100.0,
"height" : 100.0,
"glyph" : 40,
"layer" : 192
}
2. Add layer image
Places an already uploaded image (referenced by its glyph id) on the layer at the given
position and size. The image itself is not sent here - only the reference to the glyph and the
x, y, z, width, height it should be drawn with.
2.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/380/layers/189/images/ HTTP/1.1
2.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
2.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the image |
|
|
height of the image |
|
|
glyph id |
2.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/380/layers/189/images/' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"x":2.2,"y":3.3,"width":12.1,"height":11.1,"z":5,"glyph":34}' \
-H 'Content-Type: application/json'
2.5. HTTP response
HTTP/1.1 201 Created
2.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique layer identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the image |
|
|
height of the image |
|
|
glyph identifier |
2.7. Sample Response
{
"id" : 17,
"x" : 2.2,
"y" : 3.3,
"z" : 5,
"width" : 12.1,
"height" : 11.1,
"glyph" : 34,
"layer" : 189
}
3. Update layer image
Moves, resizes or re-points the placement: x, y, z, width and height are all required,
while glyph is optional - sending another glyph id swaps the displayed picture, omitting it
detaches the placement from any glyph.
|
Note
|
Supports optimistic locking via the If-Match header.
|
3.1. HTTP request
PUT /minerva/new_api/projects/test_project/maps/382/layers/191/images/19 HTTP/1.1
3.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
image identifier |
3.3. Request Fields
| Path | Type | Description |
|---|---|---|
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the image |
|
|
height of the image |
|
|
glyph id |
3.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/382/layers/191/images/19' -X PUT \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"x":2.2,"y":3.3,"width":12.1,"height":11.1,"z":5,"glyph":38}' \
-H 'Content-Type: application/json'
3.5. HTTP response
HTTP/1.1 200 OK
3.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
unique layer identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the image |
|
|
height of the image |
|
|
glyph identifier |
3.7. Sample Response
{
"id" : 19,
"x" : 2.2,
"y" : 3.3,
"z" : 5,
"width" : 12.1,
"height" : 11.1,
"glyph" : 38,
"layer" : 191
}
4. Delete layer image
Removes only the placement from the layer; the uploaded glyph it referenced stays in the project and can still be used by other images.
|
Note
|
Supports optimistic locking via the If-Match header.
|
4.1. HTTP request
DELETE /minerva/new_api/projects/test_project/maps/381/layers/190/images/18 HTTP/1.1
4.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
image identifier |
4.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/381/layers/190/images/18' -X DELETE \
-H 'Authorization: Bearer xxxxxxxx'
4.4. HTTP response
HTTP/1.1 200 OK
5. List layer images
Returns the images placed on a single layer.
Each entry gives the position and size of the placement plus the glyph id of the picture drawn;
the picture bytes themselves are served by the glyph endpoints.
|
Note
|
The result is paged - use the page and size query parameters to
walk through it.
|
5.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/379/layers/188/images/ HTTP/1.1
5.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
5.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 |
5.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/379/layers/188/images/' -X GET \
-H 'Authorization: Bearer xxxxxxxx'
5.5. HTTP response
HTTP/1.1 200 OK
5.6. Response Fields
| Path | Type | Description |
|---|---|---|
|
|
list of layer images on the page |
|
|
unique layer identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the image |
|
|
height of the image |
|
|
glyph identifier |
|
|
total number of pages |
|
|
total number of elements |
|
|
number of elements on this page |
|
|
page size |
|
|
page number |
5.7. Sample Response
{
"content" : [ {
"id" : 15,
"x" : 10.0,
"y" : 10.0,
"z" : 0,
"width" : 100.0,
"height" : 100.0,
"glyph" : 32,
"layer" : 188
} ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}