Ovals drawn on a layer of a map. The endpoints are served from /new_api/projects/{projectId}/maps/{mapId}/layers/{layerId}/ovals/.

1. List ovals

Returns a page of all ellipses belonging to the given layer, each with its bounding box, fill and border.

Note
The result is paged - use the page and size query parameters to walk through it.

1.1. HTTP request

GET /minerva/new_api/projects/test_project/maps/398/layers/200/ovals/ HTTP/1.1

1.2. Path Parameters

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

1.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

1.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/398/layers/200/ovals/' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

1.5. HTTP response

HTTP/1.1 200 OK

1.6. Response Fields

Path Type Description

content

Array

list of ovals on the page

content[].id

Number

unique shape 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 shape

content[].height

Number

height of the shape

content[].borderThickness

Number

thickness of the border

content[].fillColor

String

color used to fill the interior of the shape; #RRGGBBAA string

content[].borderColor

String

color used to draw the outline of the shape; #RRGGBBAA string

content[].size

Number

size (area) of the shape

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

1.7. Sample Response

{
  "content" : [ {
    "id" : 176,
    "fillColor" : "#ffffffff",
    "borderThickness" : 0.0,
    "x" : 1.0,
    "y" : 2.0,
    "width" : 3.0,
    "height" : 4.0,
    "z" : 12,
    "layer" : 200,
    "size" : 12.0,
    "borderColor" : "#ffafafff",
    "elementId" : "x=1.0;y=2.0; w=3.0, h=4.0"
  } ],
  "totalPages" : 1,
  "totalElements" : 1,
  "numberOfElements" : 1,
  "size" : 20,
  "number" : 0
}

2. Get oval

Returns a single ellipse identified by its id. The ellipse is inscribed in the bounding box given by x, y, width and height; the response also reports the fill color, the border color and thickness, and size, the area of that bounding box.

2.1. HTTP request

GET /minerva/new_api/projects/test_project/maps/396/layers/199/ovals/175 HTTP/1.1

2.2. Path Parameters

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

layerOvalId

oval identifier

2.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/396/layers/199/ovals/175' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

2.4. HTTP response

HTTP/1.1 200 OK

2.5. Response Fields

Path Type Description

id

Number

unique shape 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 shape

height

Number

height of the shape

borderThickness

Number

thickness of the border

fillColor

String

color used to fill the interior of the shape; #RRGGBBAA string

borderColor

String

color used to draw the outline of the shape; #RRGGBBAA string

size

Number

size (area) of the shape

2.6. Sample Response

{
  "id" : 175,
  "fillColor" : "#ffffffff",
  "borderThickness" : 0.0,
  "x" : 1.0,
  "y" : 2.0,
  "width" : 3.0,
  "height" : 4.0,
  "z" : 12,
  "layer" : 199,
  "size" : 12.0,
  "borderColor" : "#ffafafff",
  "elementId" : "x=1.0;y=2.0; w=3.0, h=4.0"
}

3. Add oval

Draws a new ellipse on the layer, inscribed in the bounding box given by the top left corner (x, y) and width/height, filled with fillColor and outlined with borderColor of borderThickness.

3.1. HTTP request

POST /minerva/new_api/projects/test_project/maps/394/layers/198/ovals/ HTTP/1.1

3.2. Path Parameters

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

projectId

project identifier

mapId

map identifier

layerId

layer 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 shape

height

Number

height of the shape

borderThickness

Number

thickness of the border

fillColor

String

color used to fill the interior of the shape; #RRGGBBAA string

borderColor

String

color used to draw the outline of the shape; #RRGGBBAA string

3.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/394/layers/198/ovals/' -X POST \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"borderColor":"#0000ffff","fillColor":"#ffff00ff","x":2.2,"borderThickness":5.0,"y":3.3,"width":12.1,"height":11.1,"z":5}' \
    -H 'Content-Type: application/json'

3.5. HTTP response

HTTP/1.1 201 Created

3.6. Response Fields

Path Type Description

id

Number

unique shape 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 shape

height

Number

height of the shape

borderThickness

Number

thickness of the border

fillColor

String

color used to fill the interior of the shape; #RRGGBBAA string

borderColor

String

color used to draw the outline of the shape; #RRGGBBAA string

size

Number

size (area) of the shape

3.7. Sample Response

{
  "id" : 174,
  "fillColor" : "#ffff00ff",
  "borderThickness" : 5.0,
  "x" : 2.2,
  "y" : 3.3,
  "width" : 12.1,
  "height" : 11.1,
  "z" : 5,
  "layer" : 198,
  "size" : 134.31,
  "borderColor" : "#0000ffff",
  "elementId" : "x=2.2;y=3.3; w=12.1, h=11.1"
}

4. Update oval

Replaces the geometry and the style of the ellipse - its x, y, z, width, height, fillColor, borderColor and borderThickness - so the complete set of values has to be sent.

Note
Supports optimistic locking via the If-Match header.

4.1. HTTP request

PUT /minerva/new_api/projects/test_project/maps/402/layers/202/ovals/178 HTTP/1.1

4.2. Path Parameters

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

layerOvalId

oval identifier

4.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 shape

height

Number

height of the shape

borderThickness

Number

thickness of the border

fillColor

String

color used to fill the interior of the shape; #RRGGBBAA string

borderColor

String

color used to draw the outline of the shape; #RRGGBBAA string

4.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/402/layers/202/ovals/178' -X PUT \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"borderColor":"#0000ffff","fillColor":"#ffff00ff","x":2.2,"borderThickness":2.0,"y":3.3,"width":12.1,"height":11.1,"z":5}' \
    -H 'Content-Type: application/json'

4.5. HTTP response

HTTP/1.1 200 OK

4.6. Response Fields

Path Type Description

id

Number

unique shape 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 shape

height

Number

height of the shape

borderThickness

Number

thickness of the border

fillColor

String

color used to fill the interior of the shape; #RRGGBBAA string

borderColor

String

color used to draw the outline of the shape; #RRGGBBAA string

size

Number

size (area) of the shape

4.7. Sample Response

{
  "id" : 178,
  "fillColor" : "#ffff00ff",
  "borderThickness" : 2.0,
  "x" : 2.2,
  "y" : 3.3,
  "width" : 12.1,
  "height" : 11.1,
  "z" : 5,
  "layer" : 202,
  "size" : 134.31,
  "borderColor" : "#0000ffff",
  "elementId" : "x=2.2;y=3.3; w=12.1, h=11.1"
}

5. Delete oval

Removes the ellipse from the layer; the rest of the layer content is left untouched.

Note
Supports optimistic locking via the If-Match header.

5.1. HTTP request

DELETE /minerva/new_api/projects/test_project/maps/400/layers/201/ovals/177 HTTP/1.1

5.2. Path Parameters

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

projectId

project identifier

mapId

map identifier

layerId

layer identifier

layerOvalId

oval identifier

5.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/test_project/maps/400/layers/201/ovals/177' -X DELETE \
    -H 'Authorization: Bearer xxxxxxxx'

5.4. HTTP response

HTTP/1.1 200 OK