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
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
1.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 |
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 |
|---|---|---|
|
|
list of ovals on the page |
|
|
unique shape identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the shape |
|
|
height of the shape |
|
|
thickness of the border |
|
|
color used to fill the interior of the shape; |
|
|
color used to draw the outline of the shape; |
|
|
size (area) of the shape |
|
|
total number of pages |
|
|
total number of elements |
|
|
number of elements on this page |
|
|
page size |
|
|
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
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
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 |
|---|---|---|
|
|
unique shape identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the shape |
|
|
height of the shape |
|
|
thickness of the border |
|
|
color used to fill the interior of the shape; |
|
|
color used to draw the outline of the shape; |
|
|
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
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer 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 shape |
|
|
height of the shape |
|
|
thickness of the border |
|
|
color used to fill the interior of the shape; |
|
|
color used to draw the outline of the shape; |
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 |
|---|---|---|
|
|
unique shape identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the shape |
|
|
height of the shape |
|
|
thickness of the border |
|
|
color used to fill the interior of the shape; |
|
|
color used to draw the outline of the shape; |
|
|
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
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
oval identifier |
4.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 shape |
|
|
height of the shape |
|
|
thickness of the border |
|
|
color used to fill the interior of the shape; |
|
|
color used to draw the outline of the shape; |
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 |
|---|---|---|
|
|
unique shape identifier |
|
|
layer identifier |
|
|
x coordinate of the top left corner |
|
|
y coordinate of the top left corner |
|
|
z coordinate (z-index) |
|
|
width of the shape |
|
|
height of the shape |
|
|
thickness of the border |
|
|
color used to fill the interior of the shape; |
|
|
color used to draw the outline of the shape; |
|
|
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
| Parameter | Description |
|---|---|
|
project identifier |
|
map identifier |
|
layer identifier |
|
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