Text boxes placed on a layer of a map, served from
/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/texts.
1. Get layer text
Returns info about layer text.
1.1. HTTP request
GET /minerva/new_api/projects/test_project/maps/416/layers/209/texts/204 HTTP/1.1
1.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
text identifier |
1.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/416/layers/209/texts/204' -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 text area |
|
|
height of the text area |
|
|
text |
|
|
size of the font used to draw the text |
|
|
font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL) |
|
|
enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP |
|
|
enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT |
|
|
text color; |
|
|
color used to fill the text area; |
|
|
border color of the text area; |
|
|
thickness of the border drawn around the text area |
|
|
font weight for the element label, one of: NORMAL, BOLD (default: NORMAL) |
|
|
font style for the element label, one of: NORMAL, ITALIC (default: NORMAL) |
1.6. Sample Response
{
"id" : 204,
"color" : "#000000ff",
"backgroundColor" : "#ffffffff",
"borderColor" : "#000000ff",
"borderThickness" : 1.0,
"x" : 1.0,
"y" : 2.0,
"z" : 12,
"width" : 3.0,
"height" : 4.0,
"notes" : "Hello world!",
"fontSize" : 10.0,
"layer" : 209,
"verticalAlign" : "TOP",
"horizontalAlign" : "LEFT",
"fontName" : "ARIAL",
"fontWeight" : "NORMAL",
"fontStyle" : "NORMAL"
}
2. Add layer text
Adds a text box to the layer: the string is given in notes and is laid out inside the box
defined by x, y, width and height according to horizontalAlign and verticalAlign.
fontSize, color, borderColor and borderThickness control how it is rendered.
2.1. HTTP request
POST /minerva/new_api/projects/test_project/maps/414/layers/208/texts/ 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 text area |
|
|
height of the text area |
|
|
size of the font used to draw the text |
|
|
font name, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL) |
|
|
font weight, one of: BOLD, NORMAL (default: NORMAL) |
|
|
font style, one of: ITALIC, NORMAL (default: NORMAL) |
|
|
text |
|
|
enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP |
|
|
enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT |
|
|
text color; |
|
|
border color of the text area; |
|
|
thickness of the border drawn around the text area |
2.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/414/layers/208/texts/' -X POST \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"color":"#0000ffff","borderColor":"#c0c0c0ff","borderThickness":7.0,"x":2.2,"y":3.3,"width":12.1,"height":11.1,"z":5,"fontSize":4,"fontName":"TIMES_NEW_ROMAN","fontWeight":"BOLD","fontStyle":"ITALIC","notes":"not a note","verticalAlign":"MIDDLE","horizontalAlign":"CENTER"}' \
-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 text area |
|
|
height of the text area |
|
|
text |
|
|
size of the font used to draw the text |
|
|
font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL) |
|
|
enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP |
|
|
enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT |
|
|
text color; |
|
|
color used to fill the text area; |
|
|
border color of the text area; |
|
|
thickness of the border drawn around the text area |
|
|
font weight for the element label, one of: NORMAL, BOLD (default: NORMAL) |
|
|
font style for the element label, one of: NORMAL, ITALIC (default: NORMAL) |
2.7. Sample Response
{
"id" : 203,
"color" : "#0000ffff",
"backgroundColor" : "#c0c0c0ff",
"borderColor" : "#c0c0c0ff",
"borderThickness" : 7.0,
"x" : 2.2,
"y" : 3.3,
"z" : 5,
"width" : 12.1,
"height" : 11.1,
"notes" : "not a note",
"fontSize" : 4.0,
"layer" : 208,
"verticalAlign" : "MIDDLE",
"horizontalAlign" : "CENTER",
"fontName" : "TIMES_NEW_ROMAN",
"fontWeight" : "BOLD",
"fontStyle" : "ITALIC"
}
3. Update layer text
Replaces the text box as a whole - notes, the x, y, z, width and height geometry, both
alignments, fontSize, color, borderColor and borderThickness must all be present or the
request is rejected. Background color, font weight and font style cannot be changed through this
endpoint.
|
Note
|
Supports optimistic locking via the If-Match header.
|
3.1. HTTP request
PUT /minerva/new_api/projects/test_project/maps/422/layers/212/texts/207 HTTP/1.1
3.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
text 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 text area |
|
|
height of the text area |
|
|
size of the font used to draw the text |
|
|
font name, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL) |
|
|
font weight, one of: BOLD, NORMAL (default: NORMAL) |
|
|
font style, one of: ITALIC, NORMAL (default: NORMAL) |
|
|
text |
|
|
enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP |
|
|
enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT |
|
|
text color; |
|
|
border color of the text area; |
|
|
thickness of the border drawn around the text area |
3.4. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/422/layers/212/texts/207' -X PUT \
-H 'Authorization: Bearer xxxxxxxx' \
-d '{"color":"#0000ffff","borderColor":"#c0c0c0ff","borderThickness":4.0,"x":2.2,"y":3.3,"width":12.1,"height":11.1,"z":5,"fontSize":4,"fontName":"TIMES_NEW_ROMAN","fontWeight":"BOLD","fontStyle":"ITALIC","notes":"not a note","verticalAlign":"MIDDLE","horizontalAlign":"CENTER"}' \
-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 text area |
|
|
height of the text area |
|
|
text |
|
|
size of the font used to draw the text |
|
|
font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL) |
|
|
enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP |
|
|
enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT |
|
|
text color; |
|
|
color used to fill the text area; |
|
|
border color of the text area; |
|
|
thickness of the border drawn around the text area |
|
|
font weight for the element label, one of: NORMAL, BOLD (default: NORMAL) |
|
|
font style for the element label, one of: NORMAL, ITALIC (default: NORMAL) |
3.7. Sample Response
{
"id" : 207,
"color" : "#0000ffff",
"backgroundColor" : "#ffffffff",
"borderColor" : "#c0c0c0ff",
"borderThickness" : 4.0,
"x" : 2.2,
"y" : 3.3,
"z" : 5,
"width" : 12.1,
"height" : 11.1,
"notes" : "not a note",
"fontSize" : 4.0,
"layer" : 212,
"verticalAlign" : "MIDDLE",
"horizontalAlign" : "CENTER",
"fontName" : "TIMES_NEW_ROMAN",
"fontWeight" : "BOLD",
"fontStyle" : "ITALIC"
}
4. Delete layer text
Removes a single text box from the layer, leaving the layer and everything else drawn on it in place.
|
Note
|
Supports optimistic locking via the If-Match header.
|
4.1. HTTP request
DELETE /minerva/new_api/projects/test_project/maps/420/layers/211/texts/206 HTTP/1.1
4.2. Path Parameters
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
text identifier |
4.3. CURL sample
$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/420/layers/211/texts/206' -X DELETE \
-H 'Authorization: Bearer xxxxxxxx'
4.4. HTTP response
HTTP/1.1 200 OK
5. List layer texts
Returns the text boxes of a single layer. Every
entry comes with the complete rendering information - the box geometry, notes, alignments, font
size, weight and style, and the text, background and border colors.
|
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/418/layers/210/texts/ 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/418/layers/210/texts/' -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 texts 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 text area |
|
|
height of the text area |
|
|
text |
|
|
size of the font used to draw the text |
|
|
font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL) |
|
|
enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP |
|
|
enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT |
|
|
text color; |
|
|
color used to fill the text area; |
|
|
border color of the text area; |
|
|
thickness of the border drawn around the text area |
|
|
font weight for the element label, one of: NORMAL, BOLD (default: NORMAL) |
|
|
font style for the element label, one of: NORMAL, ITALIC (default: NORMAL) |
|
|
total number of pages |
|
|
total number of elements |
|
|
number of elements on this page |
|
|
page size |
|
|
page number |
5.7. Sample Response
{
"content" : [ {
"id" : 205,
"color" : "#000000ff",
"backgroundColor" : "#ffffffff",
"borderColor" : "#000000ff",
"borderThickness" : 1.0,
"x" : 1.0,
"y" : 2.0,
"z" : 12,
"width" : 3.0,
"height" : 4.0,
"notes" : "Hello world!",
"fontSize" : 10.0,
"layer" : 210,
"verticalAlign" : "TOP",
"horizontalAlign" : "LEFT",
"fontName" : "ARIAL",
"fontWeight" : "NORMAL",
"fontStyle" : "NORMAL"
} ],
"totalPages" : 1,
"totalElements" : 1,
"numberOfElements" : 1,
"size" : 20,
"number" : 0
}