1. Get comments

Get list of comments.

1.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/299/?columns=author,elementId,content' -i -X GET

1.2. Path Parameters

Table 1. /api/projects/{projectId}/comments/models/{mapId}/
Parameter Description

projectId

project identifier

mapId

map identifier

1.3. Request Parameters

Parameter Description

columns

set of columns (all by default). Available options: title, icon, type, content, removed, coord, modelId, elementId, id, pinned, email, owner, removeReason

removed

true/false/undefined - when defined comment property must match this parameter

1.4. Response Fields

Path Type Description

[]

array<Comment>

list of comments

[].owner

string

login of the user that created a comment

[].email

string

author email address

[].content

string

content

[].title

string

formatted name of the commented element

[].pinned

boolean

should the comment be visible to everybody on the map

[].removed

boolean

is the comment removed

[].removeReason

string

reason why comment was removed

[].id

integer

comment identifier

[].modelId

integer

map identifier

[].coord

point

coordinates where comment should be pinned

[].icon

string

icon that should be used to visualize this comment

[].elementId

string

element identifier

[].type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

1.5. Sample Response

[ {
  "content" : null,
  "elementId" : "10.00,20.00"
}, {
  "content" : null,
  "elementId" : "10.00,20.00"
}, {
  "content" : null,
  "elementId" : "10.00,20.00"
} ]

2. Get comments for specific reaction

2.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/303/bioEntities/reactions/152' -i -X GET

2.2. Path Parameters

Table 2. /api/projects/{projectId}/comments/models/{mapId}/bioEntities/reactions/{reactionId}
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

2.3. Request Parameters

Parameter Description

columns

set of columns (all by default). Available options: title, icon, type, content, removed, coord, modelId, elementId, id, pinned, email, owner, removeReason

removed

true/false/undefined - when defined comment property must match this parameter

2.4. Response Fields

Path Type Description

[]

array<Comment>

list of comments

[].owner

string

login of the user that created a comment

[].email

string

author email address

[].content

string

content

[].title

string

formatted name of the commented element

[].pinned

boolean

should the comment be visible to everybody on the map

[].removed

boolean

is the comment removed

[].removeReason

string

reason why comment was removed

[].id

integer

comment identifier

[].modelId

integer

map identifier

[].coord

point

coordinates where comment should be pinned

[].icon

string

icon that should be used to visualize this comment

[].elementId

string

element identifier

[].type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

2.5. Sample Response

[ {
  "title" : "Reaction path_0_re5933",
  "icon" : "icons/comment.png?v=Unknown",
  "type" : "REACTION",
  "content" : null,
  "removed" : false,
  "coord" : {
    "x" : 5.0,
    "y" : 0.0
  },
  "modelId" : 303,
  "elementId" : 152,
  "id" : 54,
  "pinned" : false,
  "email" : null,
  "owner" : null,
  "removeReason" : ""
} ]

3. Get comments for specific element

3.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/347/bioEntities/elements/851' -i -X GET

3.2. Path Parameters

Table 3. /api/projects/{projectId}/comments/models/{mapId}/bioEntities/elements/{elementId}
Parameter Description

projectId

project identifier

mapId

map identifier

elementId

element identifier

3.3. Request Parameters

Parameter Description

columns

set of columns (all by default). Available options: title, icon, type, content, removed, coord, modelId, elementId, id, pinned, email, owner, removeReason

removed

true/false/undefined - when defined comment property must match this parameter

3.4. Response Fields

Path Type Description

[]

array<Comment>

list of comments

[].owner

string

login of the user that created a comment

[].email

string

author email address

[].content

string

content

[].title

string

formatted name of the commented element

[].pinned

boolean

should the comment be visible to everybody on the map

[].removed

boolean

is the comment removed

[].removeReason

string

reason why comment was removed

[].id

integer

comment identifier

[].modelId

integer

map identifier

[].coord

point

coordinates where comment should be pinned

[].icon

string

icon that should be used to visualize this comment

[].elementId

string

element identifier

[].type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

3.5. Sample Response

[ {
  "title" : "water",
  "icon" : "icons/comment.png?v=Unknown",
  "type" : "ALIAS",
  "content" : null,
  "removed" : false,
  "coord" : {
    "x" : 60.0,
    "y" : 30.0
  },
  "modelId" : 347,
  "elementId" : 851,
  "id" : 74,
  "pinned" : false,
  "email" : null,
  "owner" : null,
  "removeReason" : ""
} ]

4. Get comments for specific point

4.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/315/points/10.00,20.00' -i -X GET

4.2. Path Parameters

Table 4. /api/projects/{projectId}/comments/models/{mapId}/points/{point}
Parameter Description

projectId

project identifier

mapId

map identifier

point

point coordinates

4.3. Request Parameters

Parameter Description

columns

set of columns (all by default). Available options: title, icon, type, content, removed, coord, modelId, elementId, id, pinned, email, owner, removeReason

removed

true/false/undefined - when defined comment property must match this parameter

4.4. Response Fields

Path Type Description

[]

array<Comment>

list of comments

[].owner

string

login of the user that created a comment

[].email

string

author email address

[].content

string

content

[].title

string

formatted name of the commented element

[].pinned

boolean

should the comment be visible to everybody on the map

[].removed

boolean

is the comment removed

[].removeReason

string

reason why comment was removed

[].id

integer

comment identifier

[].modelId

integer

map identifier

[].coord

point

coordinates where comment should be pinned

[].icon

string

icon that should be used to visualize this comment

[].elementId

string

element identifier

[].type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

4.5. Sample Response

[ {
  "title" : "Comment (coord: 10.00, 20.00)",
  "icon" : "icons/comment.png?v=Unknown",
  "type" : "POINT",
  "content" : null,
  "removed" : false,
  "coord" : {
    "x" : 10.0,
    "y" : 20.0
  },
  "modelId" : 315,
  "elementId" : "10.00,20.00",
  "id" : 59,
  "pinned" : false,
  "email" : null,
  "owner" : null,
  "removeReason" : ""
} ]

5. Create element comment

5.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/307/bioEntities/elements/748' -i -X POST \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'email=a%40a.lu&content=tes+content&pinned=true&coordinates=10%2C2&modelId=307' \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx"

5.2. Path Parameters

Table 5. /api/projects/{projectId}/comments/models/{mapId}/bioEntities/elements/{elementId}
Parameter Description

projectId

project identifier

mapId

map identifier

elementId

element identifier

5.3. Request Parameters

Parameter Description

modelId

map identifier

content

content

email

user email address

coordinates

coordinates where comment should be pinned

pinned

should the comment be visible to everybody

5.4. Response Fields

Path Type Description

owner

string

login of the user that created a comment

email

string

author email address

content

string

content

title

string

formatted name of the commented element

pinned

boolean

should the comment be visible to everybody on the map

removed

boolean

is the comment removed

removeReason

string

reason why comment was removed

id

integer

comment identifier

modelId

integer

map identifier

coord

point

coordinates where comment should be pinned

icon

string

icon that should be used to visualize this comment

elementId

string

element identifier

type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

5.5. Sample Response

{
  "title" : "water",
  "icon" : "icons/comment.png?v=Unknown",
  "type" : "ALIAS",
  "content" : "tes content",
  "removed" : false,
  "coord" : {
    "x" : 60.0,
    "y" : 30.0
  },
  "modelId" : 307,
  "elementId" : 748,
  "id" : 56,
  "pinned" : true,
  "email" : "a@a.lu",
  "owner" : "test_user",
  "removeReason" : ""
}

6. Create reaction comment

6.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/375/bioEntities/reactions/188' -i -X POST \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'email=a%40a.lu&content=tes+content&pinned=true&coordinates=10%2C2&modelId=375' \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx"

6.2. Path Parameters

Table 6. /api/projects/{projectId}/comments/models/{mapId}/bioEntities/reactions/{reactionId}
Parameter Description

projectId

project identifier

mapId

map identifier

reactionId

reaction identifier

6.3. Request Parameters

Parameter Description

modelId

map identifier

content

content

email

user email address

coordinates

coordinates where comment should be pinned

pinned

should the comment be visible to everybody

6.4. Response Fields

Path Type Description

owner

string

login of the user that created a comment

email

string

author email address

content

string

content

title

string

formatted name of the commented element

pinned

boolean

should the comment be visible to everybody on the map

removed

boolean

is the comment removed

removeReason

string

reason why comment was removed

id

integer

comment identifier

modelId

integer

map identifier

coord

point

coordinates where comment should be pinned

icon

string

icon that should be used to visualize this comment

elementId

string

element identifier

type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

6.5. Sample Response

{
  "title" : "Reaction path_0_re5933",
  "icon" : "icons/comment.png?v=Unknown",
  "type" : "REACTION",
  "content" : "tes content",
  "removed" : false,
  "coord" : {
    "x" : 5.0,
    "y" : 0.0
  },
  "modelId" : 375,
  "elementId" : 188,
  "id" : 94,
  "pinned" : true,
  "email" : "a@a.lu",
  "owner" : "test_user",
  "removeReason" : ""
}

7. Create coordinates comment

7.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/models/367/points/10,2' -i -X POST \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'email=a%40a.lu&content=tes+content&pinned=true&modelId=367' \
    --cookie "MINERVA_AUTH_TOKEN=xxxxxxxx"

7.2. Path Parameters

Table 7. /api/projects/{projectId}/comments/models/{mapId}/points/{point}
Parameter Description

projectId

project identifier

mapId

map identifier

point

point coordinates

7.3. Request Parameters

Parameter Description

modelId

map identifier

content

content

email

user email address

coordinates

coordinates where comment should be pinned

pinned

should the comment be visible to everybody

7.4. Response Fields

Path Type Description

owner

string

login of the user that created a comment

email

string

author email address

content

string

content

title

string

formatted name of the commented element

pinned

boolean

should the comment be visible to everybody on the map

removed

boolean

is the comment removed

removeReason

string

reason why comment was removed

id

integer

comment identifier

modelId

integer

map identifier

coord

point

coordinates where comment should be pinned

icon

string

icon that should be used to visualize this comment

elementId

string

element identifier

type

string

type of the element that was commented on. Available options ALIAS, POINT, REACTION

7.5. Sample Response

{
  "title" : "Comment (coord: 10.00, 2.00)",
  "icon" : "icons/comment.png?v=Unknown",
  "type" : "POINT",
  "content" : "tes content",
  "removed" : false,
  "coord" : {
    "x" : 10.0,
    "y" : 2.0
  },
  "modelId" : 367,
  "elementId" : "10.00,2.00",
  "id" : 86,
  "pinned" : true,
  "email" : "a@a.lu",
  "owner" : "test_user",
  "removeReason" : ""
}

8. Delete comment

8.1. CURL sample

$ curl 'https://minerva-service.lcsb.uni.lu/minerva/api/projects/test_project/comments/49/' -i -X DELETE

8.2. Path Parameters

Table 8. /api/projects/{projectId}/comments/{commentId}/
Parameter Description

projectId

project identifier

commentId

comment identifier