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

Table 1. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/images/{imageId}
Parameter Description

projectId

project identifier

mapId

map identifier

layerId

layer identifier

imageId

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

id

Number

unique layer identifier

layer

Number

layer identifier

x

Number

x coordinate of the top left corner

y

Number

y coordinate of the top left corner

z

Number

z coordinate (z-index)

width

Number

width of the image

height

Number

height of the image

glyph

Number

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

Table 2. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/images/
Parameter Description

projectId

project identifier

mapId

map identifier

layerId

layer identifier

2.3. Request Fields

Path Type Description

x

Number

x coordinate of the top left corner

y

Number

y coordinate of the top left corner

z

Number

z coordinate (z-index)

width

Number

width of the image

height

Number

height of the image

glyph

Number

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

id

Number

unique layer identifier

layer

Number

layer identifier

x

Number

x coordinate of the top left corner

y

Number

y coordinate of the top left corner

z

Number

z coordinate (z-index)

width

Number

width of the image

height

Number

height of the image

glyph

Number

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

Table 3. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/images/{imageId}
Parameter Description

projectId

project identifier

mapId

map identifier

layerId

layer identifier

imageId

image identifier

3.3. Request Fields

Path Type Description

x

Number

x coordinate of the top left corner

y

Number

y coordinate of the top left corner

z

Number

z coordinate (z-index)

width

Number

width of the image

height

Number

height of the image

glyph

Number

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

id

Number

unique layer identifier

layer

Number

layer identifier

x

Number

x coordinate of the top left corner

y

Number

y coordinate of the top left corner

z

Number

z coordinate (z-index)

width

Number

width of the image

height

Number

height of the image

glyph

Number

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

Table 4. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/images/{imageId}
Parameter Description

projectId

project identifier

mapId

map identifier

layerId

layer identifier

imageId

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

Table 5. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/images/
Parameter Description

projectId

project identifier

mapId

map identifier

layerId

layer identifier

5.3. Query Parameters

Parameter Description

page

index of the page to fetch, counted from 0; 0 by default

size

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

content

Array

list of layer images on the page

content[].id

Number

unique layer identifier

content[].layer

Number

layer identifier

content[].x

Number

x coordinate of the top left corner

content[].y

Number

y coordinate of the top left corner

content[].z

Number

z coordinate (z-index)

content[].width

Number

width of the image

content[].height

Number

height of the image

content[].glyph

Number

glyph identifier

totalPages

Number

total number of pages

totalElements

Number

total number of elements

numberOfElements

Number

number of elements on this page

size

Number

page size

number

Number

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
}