Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Comment

Jonathan Payne edited this page Feb 23, 2015 · 2 revisions

The API exposes a representation of comments on concepts, collections, and repository resources similar to a discussion board.

URI: /rest/comment

Example:

POST /rest/comment
Body content:
{
  "username": "judy",
  "conceptid": "concept-uuid",
  "comment": "body of the comment goes here..."
}

Core properties

uuid
username
comment
dateCreated
lastUpdated

Comment URIs

URL Description Response Code
GET /rest/comment Get/search all comments OK
Success
Not Found
GET /rest/comment/[uuid] Get the specified comment OK
Success
Not Found
GET /rest/comment?concept=123 Get all comments for a specific concept OK
Success
Not Found
GET /rest/comment?collection=123 Get all comments for a specific collection OK
Success
Not Found
GET /rest/comment?username=jdoe&concept=123 Returns the comment status of the concept 123 by user Judy OK
Success
Not Found
GET /rest/comment?username=jdoe&collection=123 Returns the comment status of the collection 123 by user Judy OK
Success
Not Found
GET /rest/comment?username={username} Gets all comments created by the specified user OK
Success
Not Found
POST /rest/comment Post a new comment based on the message contents OK
Success
PUT /rest/comment/{uuid} Update a specific comment based on the message contents OK
Success
Not Found
DELETE /rest/comment/{uuid} Delete a specific comment OK
Success
Not Found

Additional Filters

GET /rest/comment?type={concept/collection}   # filter comments by the type of object
GET /rest/comment?source={source}             # filter comments by source

Examples

POST /rest/comment
{
  "conceptid": {conceptid},
  "username": {username},
  "comment": "...comment body..."
}

DELETE /rest/comment/uuid
Clone this wiki locally