REST - Comment

REST-Interface

Get comment by id

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

Path parameter

  • commentId

Produces

application/json
application/xml

com.matterial.mtr.api.object.Comment

  • 200 OK
  • 400 BAD_REQUEST
  • 404 NOT_FOUND
  • 500 INTERNAL_SERVER_ERROR

Permission
Login

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


Get comments

URL
GET <application-url>/api/comment

Query parameter

  • documentId Id of a document
  • documentLanguageVersionId The id of a document language version
  • contactId Id of a contact
  • mentionedAccountId Id of an account, that was mentioned wihton a comment
  • languageKey possible: de, en, fr, it, ... default: de The requested language
  • count possible: true, false default: false additionally loading count of comments
  • orderBy possible: createtime default: createtime the order by
  • orderDir possible: asc, desc default: desc the ordering direction
  • offset
  • limit

Produces

application/json
application/xml

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

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

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)

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
COMMENT

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


Update comment

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

Path parameter

  • commentId

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Comment

Produces

application/json
application/xml

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

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission
COMMENT

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


Remove comment

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

Path parameter

  • commentId

Produces

text/plain

Integer - count of removed

  • 200 OK
  • 400 BAD_REQUEST
  • 404 NOT_FOUND
  • 500 INTERNAL_SERVER_ERROR

Permission
COMMENT

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

×
Peter's Problem.