Zurück zur Übersicht » REST - Comment

REST - Comment

REST-Interface

Get comment by id

URL
GET <application-url>/api/comment/<commentId>

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Comment

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/comment/7


Get comments

URL
GET <application-url>/api/comment

Query parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.ListResult<Comment>

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/comment?contactId=2&count=true


Create comment

URL
POST <application-url>/api/comment

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Comment

Produces

application/json
application/xml

com.matterial.mtr.api.object.Comment (id only)

Permission
COMMENT

Sample
POST http://localhost:8080/mtr-backend/api/comment


Update comment

URL
PUT <application-url>/api/comment/<commentId>

Path parameter

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Comment

Produces

application/json
application/xml

com.matterial.mtr.api.object.Comment (id only)

Permission
COMMENT

Sample
PUT http://localhost:8080/mtr-backend/api/comment/8


Remove comment

URL
DELETE <application-url>/api/comment/<commentId>

Path parameter

Produces

text/plain

Integer - count of removed

Permission
COMMENT

Sample
DELETE http://localhost:8080/mtr-backend/api/comment/9