Comments pinned to coordinates of a map, served from /new_api/projects/{projectId}/maps/{mapId}/comments.

1. Get comment

Returns info about comment.

1.1. HTTP request

GET /minerva/new_api/projects/Some_id/maps/371/comments/12 HTTP/1.1

1.2. Path Parameters

Table 1. /minerva/new_api/projects/{projectId}/maps/{mapId}/comments/{commentId}
Parameter Description

projectId

project identifier

mapId

map identifier

commentId

comment identifier

1.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/Some_id/maps/371/comments/12' -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 comment identifier

map

Number

map identifier

content

String

comment content

authorId

Number

identifier of the author

email

String

email of the author

removeReason

String

why the comment has been removed

coordinates.x

Number

x coordinate where the comment is located on map

coordinates.y

Number

y coordinate where the comment is located on map

deleted

Boolean

is comment deleted

visible

Boolean

is comment visible

1.6. Sample Response

{
  "deleted" : false,
  "id" : 12,
  "content" : "it's cool",
  "coordinates" : {
    "x" : 10.0,
    "y" : 20.0
  },
  "map" : 371,
  "visible" : false,
  "authorId" : null,
  "email" : null,
  "removeReason" : ""
}

2. Add comment

Pins a comment to a point of the map given by coordinates.x and coordinates.y - a comment is attached to a location, not to any element or reaction. Besides the content the request carries the reporter email and a visible flag deciding whether the content is shown to other users.

2.1. HTTP request

POST /minerva/new_api/projects/empty/maps/3/comments/ HTTP/1.1

2.2. Path Parameters

Table 2. /minerva/new_api/projects/{projectId}/maps/{mapId}/comments/
Parameter Description

projectId

project identifier

mapId

map identifier

2.3. Request Fields

Path Type Description

content

String

text of the comment

coordinates.x

Number

x coordinate on the map

coordinates.y

Number

y coordinate on the map

visible

Boolean

is content visible

email

String

reported email address

2.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/empty/maps/3/comments/' -X POST \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"content":"blah blah blah","email":"test@test.com","coordinates":{"x":10.0,"y":12.0},"visible":true}' \
    -H 'Content-Type: application/json'

2.5. HTTP response

HTTP/1.1 201 Created

2.6. Response Fields

Path Type Description

id

Number

unique comment identifier

map

Number

map identifier

content

String

comment content

authorId

Number

identifier of the author

email

String

email of the author

removeReason

String

why the comment has been removed

coordinates.x

Number

x coordinate where the comment is located on map

coordinates.y

Number

y coordinate where the comment is located on map

deleted

Boolean

is comment deleted

visible

Boolean

is comment visible

2.7. Sample Response

{
  "deleted" : false,
  "id" : 11,
  "content" : "blah blah blah",
  "coordinates" : {
    "x" : 10.0,
    "y" : 12.0
  },
  "map" : 3,
  "visible" : true,
  "authorId" : 1,
  "email" : "test@test.com",
  "removeReason" : ""
}

3. Delete comment

Marks the comment as removed instead of erasing it: the comment is kept with deleted set to true and the optional reason from the request body stored as removeReason. It stops being returned to ordinary users, while curators and admins can still list it.

Note
Supports optimistic locking via the If-Match header.

3.1. HTTP request

DELETE /minerva/new_api/projects/Some_id/maps/372/comments/13 HTTP/1.1

3.2. Path Parameters

Table 3. /minerva/new_api/projects/{projectId}/maps/{mapId}/comments/{commentId}
Parameter Description

projectId

project identifier

mapId

map identifier

commentId

comment identifier

3.3. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/Some_id/maps/372/comments/13' -X DELETE \
    -H 'Authorization: Bearer xxxxxxxx' \
    -d '{"reason":"xyz"}' \
    -H 'Content-Type: application/json'

3.4. HTTP response

HTTP/1.1 200 OK

4. List comments

Returns the comments pinned to the map. Ordinary users see only comments that are visible and not removed; curators and admins additionally see hidden and removed ones together with the author and removal details, and can narrow the result to one or the other with the removed query parameter.

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

4.1. HTTP request

GET /minerva/new_api/projects/Some_id/maps/373/comments/ HTTP/1.1

4.2. Path Parameters

Table 4. /minerva/new_api/projects/{projectId}/maps/{mapId}/comments/
Parameter Description

projectId

project identifier

mapId

map identifier

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

removed

filter by removal state; available only to curators and administrators, other users always see non removed comments only

4.4. CURL sample

$ curl 'https://minerva-dev.lcsb.uni.lu/minerva/new_api/projects/Some_id/maps/373/comments/' -X GET \
    -H 'Authorization: Bearer xxxxxxxx'

4.5. HTTP response

HTTP/1.1 200 OK

4.6. Response Fields

Path Type Description

content

Array

list of comments on the page

content[].id

Number

unique comment identifier

content[].map

Number

map identifier

content[].content

String

comment content

content[].authorId

Number

identifier of the author

content[].email

String

email of the author

content[].removeReason

String

why the comment has been removed

content[].coordinates.x

Number

x coordinate where the comment is located on map

content[].coordinates.y

Number

y coordinate where the comment is located on map

content[].deleted

Boolean

is comment deleted

content[].visible

Boolean

is comment visible

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

4.7. Sample Response

{
  "content" : [ {
    "deleted" : false,
    "id" : 14,
    "content" : "it's cool",
    "coordinates" : {
      "x" : 10.0,
      "y" : 20.0
    },
    "map" : 373,
    "visible" : false,
    "authorId" : null,
    "email" : null,
    "removeReason" : ""
  } ],
  "totalPages" : 1,
  "totalElements" : 1,
  "numberOfElements" : 1,
  "size" : 20,
  "number" : 0
}