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

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

textId

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

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 text area

height

Number

height of the text area

notes

String

text

fontSize

Number

size of the font used to draw the text

fontName

String

font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL)

verticalAlign

String

enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP

horizontalAlign

String

enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT

color

String

text color; #RRGGBBAA string

backgroundColor

String

color used to fill the text area; #RRGGBBAA string

borderColor

String

border color of the text area; #RRGGBBAA string

borderThickness

Number

thickness of the border drawn around the text area

fontWeight

String

font weight for the element label, one of: NORMAL, BOLD (default: NORMAL)

fontStyle

String

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

Table 2. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/texts/
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 text area

height

Number

height of the text area

fontSize

Number

size of the font used to draw the text

fontName

String

font name, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL)

fontWeight

String

font weight, one of: BOLD, NORMAL (default: NORMAL)

fontStyle

String

font style, one of: ITALIC, NORMAL (default: NORMAL)

notes

String

text

verticalAlign

String

enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP

horizontalAlign

String

enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT

color

String

text color; #RRGGBBAA string

borderColor

String

border color of the text area; #RRGGBBAA string

borderThickness

Number

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

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 text area

height

Number

height of the text area

notes

String

text

fontSize

Number

size of the font used to draw the text

fontName

String

font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL)

verticalAlign

String

enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP

horizontalAlign

String

enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT

color

String

text color; #RRGGBBAA string

backgroundColor

String

color used to fill the text area; #RRGGBBAA string

borderColor

String

border color of the text area; #RRGGBBAA string

borderThickness

Number

thickness of the border drawn around the text area

fontWeight

String

font weight for the element label, one of: NORMAL, BOLD (default: NORMAL)

fontStyle

String

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

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

textId

text 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 text area

height

Number

height of the text area

fontSize

Number

size of the font used to draw the text

fontName

String

font name, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL)

fontWeight

String

font weight, one of: BOLD, NORMAL (default: NORMAL)

fontStyle

String

font style, one of: ITALIC, NORMAL (default: NORMAL)

notes

String

text

verticalAlign

String

enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP

horizontalAlign

String

enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT

color

String

text color; #RRGGBBAA string

borderColor

String

border color of the text area; #RRGGBBAA string

borderThickness

Number

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

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 text area

height

Number

height of the text area

notes

String

text

fontSize

Number

size of the font used to draw the text

fontName

String

font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL)

verticalAlign

String

enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP

horizontalAlign

String

enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT

color

String

text color; #RRGGBBAA string

backgroundColor

String

color used to fill the text area; #RRGGBBAA string

borderColor

String

border color of the text area; #RRGGBBAA string

borderThickness

Number

thickness of the border drawn around the text area

fontWeight

String

font weight for the element label, one of: NORMAL, BOLD (default: NORMAL)

fontStyle

String

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

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

textId

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

Table 5. /minerva/new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/texts/
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/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

content

Array

list of layer texts 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 text area

content[].height

Number

height of the text area

content[].notes

String

text

content[].fontSize

Number

size of the font used to draw the text

content[].fontName

String

font name used for the text, one of: ARIAL, COURIER_NEW, GEORGIA, HELVETICA, TIMES_NEW_ROMAN, VERDANA (default: ARIAL)

content[].verticalAlign

String

enum describing vertical alignment, available values: BOTTOM, MIDDLE, TOP

content[].horizontalAlign

String

enum describing horizontal alignment, available values: CENTER, LEFT, RIGHT

content[].color

String

text color; #RRGGBBAA string

content[].backgroundColor

String

color used to fill the text area; #RRGGBBAA string

content[].borderColor

String

border color of the text area; #RRGGBBAA string

content[].borderThickness

Number

thickness of the border drawn around the text area

content[].fontWeight

String

font weight for the element label, one of: NORMAL, BOLD (default: NORMAL)

content[].fontStyle

String

font style for the element label, one of: NORMAL, ITALIC (default: NORMAL)

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" : 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
}